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

Before editing the MapModel.xml file, you must be familiar with XML.

About this task

This task requires that you become familiar with the XML tags described in the following table:

XML tag Description

<vendorlist>

The MapModel.xml file contains <vendorlist> tags. Embedded inside are <vendor>, <model>, and <output> tags. The name attribute in the <vendor> tags indicates that everything enclosed within these tags apply to the specified vendor, which in this example are CISCO and Juniper devices only. The name attribute in each <model> tag is used to match the model number returned in a CLI call.

Procedure

  1. Open the MapModel.xml file for editing.
  2. Edit the XML tags according to your needs. Use the Example section as a guide.
  3. 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:

  1. Compares the value Cisco returned to vendor with the value specified in the name attribute of the <vendor> tag. The values match.
  2. Compares the value 2651 returned to model with the value specified in the name attribute of the <model> tag. These values do not match.
  3. Returns the value specified in the <output> tag, if the values in model 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:

  1. Compares the value Juniper returned to vendor with the value specified in the name attribute of the <vendor> tag. The values match.
  2. Compares the value OLIVE returned to model with the value specified in the name attribute of the <model> tag. These values match.
  3. Returns the value specified in the <output> tag (in this case M40), because the values in model 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.