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)2The Auto-Discovery tool:
- Compares the value
Ciscoreturned tovendorwith the value specified in thenameattribute of the<vendor>tag. The values match. - Compares the value
12.4(5A)returned tooswith the value specified in thenameattribute of the<os>tag. These values do not match. - Returns the value specified in the
<output>tag, if the values inosand<os>match.Because the values specified in
osand<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 2The Auto-Discovery tool:
- Compares the value
Juniperreturned tovendorwith the value specified in thenameattribute of the<vendor>tag. The values match. - Compares the value
6.2R2.4returned tooswith the value specified in thenameattribute of the<os>tag. These values match. - Returns the value specified in the
<output>tag (in this case6.0), because the values inosand<os>match.Thus, the Auto-Discovery tool performs a mapping of the os numbers for a Juniper device because the values specified in
osand<os>match.
What to do next
To study a complete working example of a MapOS.xml file, see MapOS.xml example.