Customizing MapType.xml

The MapType.xml file is used by Auto-Discovery to determine a device type, after having determined the device model.

Before you begin

Before editing the MapType.xml file, you must be familiar with XML. You should also have edited a MapModel.xml file.

About this task

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

XML tag Description

<vendorlist>

The MapType.xml file contains <vendorlist> tags. Embedded inside are <vendor>, <model>, and <type> 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. The type tag specifies the type of the device.

Procedure

  1. Open the MapType.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 MapType.xml file.

Example

Consider the following XML tags in a sample MapType.xml file:

<vendorlist>
<vendor name="Cisco">  1 
<model name="2621">  2 
<type>Router</type>  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 match.
  3. Returns the value specified in the <type> tag, if the values in model and <model> match.

    Because the values specified in model and <model> match, the Auto-Discovery tool returns the device type of Router (the value specified in the <type> tag).

Consider the following XML tags for Juniper in a sample MapType.xml file:

<vendor name="Juniper">  1 
<model name="M40">  2 
<type>Router</type>  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=M40  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 M40 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 <type> tag, if the values in model and <model> match.

    Because the values specified in model and <model> match, the Auto-Discovery tool returns the device type of Router (the value specified in the <type> tag).

What to do next

You can now configure the MapOS.xml file.

For instructions on how to configure the MapOS.xml file, see Customizing MapOS.xml.

To study a complete working example of a MapType.xml file, see MapType.xml example.