Skip to content

Commit

Permalink
Merge pull request #3 from jmcgill298/hilash-cisco-ios
Browse files Browse the repository at this point in the history
Add matches for uninteresting data in ios_lldp_neighbors_detail
  • Loading branch information
hilash authored Jul 17, 2018
2 parents ae923bc + c965ed4 commit ef40adf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 21 deletions.
50 changes: 32 additions & 18 deletions templates/cisco_ios_show_lldp_neighbors_detail.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,43 @@ Value NEIGHBOR_INTERFACE (\S+)
Value NEIGHBOR (\S+)
Value SYSTEM_DESCRIPTION (.*)
Value CAPABILITIES (.*)
Value MANAGEMENT_IP (\d+\.\d+\.\d+\.\d+|\w+\.\w+\.\w+)
Value MANAGEMENT_IP (\S+)
Value VLAN (\d+)

Start
^Local Intf: ${LOCAL_INTERFACE}$$
^Chassis id: ${CHASSIS_ID}$$
^Port id: ${NEIGHBOR_PORT_ID}$$
^Port Description: ${NEIGHBOR_INTERFACE}$$
^System Name - not advertised${NEIGHBOR}$$
^System Name: ${NEIGHBOR}$$
^System Description: -> GetDescription
^Enabled Capabilities: ${CAPABILITIES}$$
^Management Addresses: -> GetIP
^Vlan ID: ${VLAN}$$
^Local\s+Intf:\s+${LOCAL_INTERFACE}\s*$$
^Chassis\s+id:\s+${CHASSIS_ID}\s*$$
^Port\s+id:\s+${NEIGHBOR_PORT_ID}\s*$$
^Port\s+Description:\s+${NEIGHBOR_INTERFACE}\s*$$
^System\s+Name(?::\s+${NEIGHBOR}|\s+-\s+not\s+advertised)\s*$$
^System\s+Description -> GetDescription
^Time
^System\s+Capabilities
^Enabled\s+Capabilities:\s+${CAPABILITIES}\s*$$
^Management\s+Addresses
^\s+OID
^\s+[\d+\.]{8,}
^.*IP:\s+${MANAGEMENT_IP}
^Auto\s+Negotiation
^Physical\s+media
^\s+.+\(\S+\)\s*$$
^\s*[MEDmed]+
^\s+Inventory
^\s+Capabilities
^\s+Device\s+type
^\s+Network\s+Policies
^\s+Power\s+requirements
^\s+Location
^Vlan\s+ID:\s+(?:${VLAN}|-\s+not\s+advertised)\s*$$
^\s+\(\S+\)
^(?:PoE|\s+Power)
^-+ -> Record
^\s*$$
^Total entries displayed -> Continue.Record
^\s*$$ -> Continue
^\S*$$ -> Error

^\s*Total\s+entries\s+displayed -> Record
^\s*$$
^.*$$ -> Error

GetDescription
^${SYSTEM_DESCRIPTION} -> Start

GetIP
^.*IP: ${MANAGEMENT_IP} -> Start
^\s*$$
^.*$$ -> Error
7 changes: 4 additions & 3 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ def test_index_ordering():
'brocade_fastiron', 'brocade_netiron', 'brocade_nos', 'brocade_vdx', 'brocade_vyos',
'checkpoint_gaia', 'cisco_asa', 'cisco_ios', 'cisco_nxos', 'cisco_s300', 'cisco_wlc',
'cisco_xe', 'cisco_xr', 'dell_force10', 'enterasys', 'extreme', 'f5_ltm', 'fortinet',
'hp_comware', 'hp_procurve', 'huawei', 'juniper', 'juniper_junos', 'alcatel_sros',
'linux', 'ovs_linux', 'paloalto_panos', 'quanta_mesh', 'vmware_nsxv', 'vyatta_vyos', 'vyos'
]
'hp_comware', 'hp_procurve', 'huawei', 'juniper', 'juniper_junos', 'juniper_screenos',
'alcatel_sros', 'linux', 'ovs_linux', 'paloalto_panos', 'quanta_mesh', 'vmware_nsxv',
'vyatta_vyos', 'vyos'
]

prior_os = ""
prior_len = 0
Expand Down

0 comments on commit ef40adf

Please sign in to comment.