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
About this task
This task requires that you become familiar with the XML tags described in the following table:
XML tag | Description |
---|---|
|
The MapType.xml file contains |
Procedure
- Open the MapType.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 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:
- 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 match. - Returns the value specified in the
<type>
tag, if the values inmodel
and<model>
match.Because the values specified in
model
and<model>
match, the Auto-Discovery tool returns the device type ofRouter
(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:
- Compares the value
Juniper
returned tovendor
with the value specified in thename
attribute of the<vendor>
tag. The values match. - Compares the value
M40
returned tomodel
with the value specified in thename
attribute of the<model>
tag. These values match. - Returns the value specified in the
<type>
tag, if the values inmodel
and<model>
match.Because the values specified in
model
and<model>
match, the Auto-Discovery tool returns the device type ofRouter
(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.