Customizing MapOS.xml
The MapOS.xml file is used by Auto-Discovery to map a unique string obtained from the CLI to that device's operating system.
Before you begin
About this task
This task requires that you become familiar with the XML tags described in the following table:
XML tag | Description |
---|---|
|
The MapOS.xml file contains |
Procedure
- Open the MapOS.xml file for editing.
- Edit the XML tags according to your needs. Use the Example section as a guide.
- When you are satisfied with your edits, save and exit the MapOS.xml file.
Example
Consider the following XML tags in a sample MapOS.xml file:
<vendorlist>
<vendor name="Cisco"> 1
<os name="10.5"> 2
<output>10.3</output> 3
</os>
</vendor>
</vendorlist>
Now consider the following return from the Auto-Discovery tool when it uses a RegexList.xml file to parse the CISCO CLI:
vendor=Cisco 1
model=2651
os=12.4(5A) 2
The Auto-Discovery tool:
- Compares the value
Cisco
returned tovendor
with the value specified in thename
attribute of the<vendor>
tag. The values match. - Compares the value
12.4(5A)
returned toos
with the value specified in thename
attribute of the<os>
tag. These values do not match. - Returns the value specified in the
<output>
tag, if the values inos
and<os>
match.Because the values specified in
os
and<os>
do not match, the Auto-Discovery tool performs no mapping for a CISCO device with an os string of12.4(5A)
. Thus, the os number remains as it is.
Consider the following XML tags for Juniper in a sample MapOS.xml file:
<vendor name="Juniper"> 1
<model name="M4"> 2
<output>M40</output> 3
</model>
</vendor>
</vendorlist>
<vendorlist>
<vendor name="Juniper"> 1
<os name="6.2R2.4"> 2
<output>6.0</output> 3
</os>
</vendor>
</vendorlist>
Now consider the following return from the Auto-Discovery tool when it uses a RegexList.xml file to parse the Juniper CLI:
vendor=Juniper 1
model=M40
os=6.2R2.4 2
The Auto-Discovery tool:
- Compares the value
Juniper
returned tovendor
with the value specified in thename
attribute of the<vendor>
tag. The values match. - Compares the value
6.2R2.4
returned toos
with the value specified in thename
attribute of the<os>
tag. These values match. - Returns the value specified in the
<output>
tag (in this case6.0
), because the values inos
and<os>
match.Thus, the Auto-Discovery tool performs a mapping of the os numbers for a Juniper device because the values specified in
os
and<os>
match.
What to do next
To study a complete working example of a MapOS.xml file, see MapOS.xml example.