Customizing MapModel.xml
The MapModel.xml file is used by Auto-Discovery to map a unique string obtained from the CLI to the model number of a device.
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 MapModel.xml file contains |
Procedure
- Open the MapModel.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 MapModel.xml file.
Example
Consider the following XML tags in a sample MapModel.xml file:
<vendorlist>
<vendor name="Cisco"> 1
<model name="UBR7246VXR"> 2
<output>7246</output> 3
</model>
</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 2
os=12.4(5A)
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
2651
returned tomodel
with the value specified in thename
attribute of the<model>
tag. These values do not match. - Returns the value specified in the
<output>
tag, if the values inmodel
and<model>
match.Because the values specified in
model
and<model>
do not match, the Auto-Discovery tool performs no mapping of the model numbers for a CISCO device. Thus, the model number remains as it is.
Consider the following XML tags for Juniper in a sample MapModel.xml file:
<vendor name="Juniper"> 1
<model name="OLIVE"> 2
<output>M40</output> 3
</model>
</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=OLIVE 2
os=6.2R2.4
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
OLIVE
returned tomodel
with the value specified in thename
attribute of the<model>
tag. These values match. - Returns the value specified in the
<output>
tag (in this case M40), because the values inmodel
and<model>
match.Thus, the Auto-Discovery tool performs a mapping of the model numbers for a Juniper device because the values specified in
model
and<model>
match.
What to do next
You can now configure the MapType.xml file.
For instructions on how to configure the MapType.xml file, see Customizing MapType.xml.
To study a complete working example of a MapModel.xml file, see MapModel.xml example.