cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1745
Views
0
Helpful
0
Replies

Spec file ODM

roussy.josiane
Level 1
Level 1

I'm trying to get some output in XML format in cisco IOS with odm file.

 

With the "show format" I saw that some are already defined. I successfully add "show arp" and "show version" to a custom.odm file but "show interfaces description" is empty. Can someone help me with that?

 

###
show interfaces description
<?xml version="1.0" encoding="UTF-8"?>
<ODMSpec>
<Command><Name>show interfaces description</Name></Command>
<DataModel>
<Container name="ShowIntDesc">
<Table name="INTDesc">
<Header name="Interface" type="String" start="0" end="30"/>
<Header name="Status" type="String" start="31" end="46"/>
<Header name="Protocol" type="String" start="47" end="55"/>
<Header name="Description" type="String" start="56" end="-1"/>
</Table>
</Container>
</DataModel>
</ODMSpec>
WS-C6506-E#show interfaces description | format disk1:custom.odm
<?xml version="1.0" encoding="UTF-8"?>
<ShowIntDesc xmlns="ODM://disk1:custom.odm//show_interfaces_description">
</ShowIntDesc>
WS-C6506-E#
WS-C6506-E#show interfaces description
Interface                      Status         Protocol Description
Gi1/1                          down           down    
Gi1/2                          up             up
Gi1/3                          down           down     NXLAB02
Gi1/3.1378                     down           down
Gi1/3.1382                     down           down
Gi1/3.1726                     down           down
Gi1/4                          down           down     Libre
Gi1/4.1719                     down           down
Gi1/4.1725                     down           down
Gi1/5                          down           down     libre
Gi1/6                          down           down
0 Replies 0