-
Notifications
You must be signed in to change notification settings - Fork 785
Open
Labels
Description
ISSUE TYPE
- Template Issue with error and raw data
TEMPLATE USING
aruba_aoscx_show_lldp_neighbors-info_detail.textfsm:
Value Required LOCAL_INTERFACE (\S+)
Value Required CHASSIS_ID (\S+)
Value NEIGHBOR_NAME (\S+)
Value NEIGHBOR_DESCRIPTION (.+)
Value CAPABILITIES_SUPPORTED (.+)
Value CAPABILITIES (.+)
Value MGMT_ADDRESS (\S+)
Value NEIGHBOR_PORT_ID (\S+)
Value NEIGHBOR_INTERFACE (\S+)
Start
^Port\s*:\s*${LOCAL_INTERFACE}
^Neighbor\s*(Chassis|System)-Name\s*:\s*${NEIGHBOR_NAME}
^Neighbor\s*(Chassis|System)-Description\s*:\s*${NEIGHBOR_DESCRIPTION}
^Neighbor\s*Chassis-ID\s*:\s*${CHASSIS_ID}
^Neighbor\s*Management-Address\s*:\s*${MGMT_ADDRESS}
^Chassis\s*Capabilities\s*Available\s*:\s*${CAPABILITIES_SUPPORTED}
^Chassis\s*Capabilities\s*Enabled\s*:\s*${CAPABILITIES}
^Neighbor\s*Port-ID\s*:\s*${NEIGHBOR_PORT_ID}
^Neighbor\s*Port-Desc\s*:\s*${NEIGHBOR_INTERFACE}
^-+$$ -> Record
^Neighbor\.*
^TTL\.*
^P[D|SE]\.*
^Power\.*
^MED\s+capabilities
^\s+ -> Next
^\S+#\.* -> Next
^LLDP\.*
^Link\s+aggregation
^Aggregation\s+port
^Total\.*
^=+
^. -> Error
SAMPLE COMMAND OUTPUT
Example output from running device (truncated):
pas-mdf-core-sw01-1# show lldp neighbor-info detail
LLDP Neighbor Information
=========================
Total Neighbor Entries : 27
Total Neighbor Entries Deleted : 7
Total Neighbor Entries Dropped : 0
Total Neighbor Entries Aged-Out : 7
--------------------------------------------------------------------------------
Port : 1/1/17
Neighbor Entries : 1
Neighbor Entries Deleted : 1
Neighbor Entries Dropped : 0
Neighbor Entries Aged-Out : 1
Neighbor System-Name : PAS-IDF17-SW01.internal.domain.tld
Neighbor System-Description : Cisco IOS Software, S5400 Software (S5400-UNIVERSALK9-M), Version 15.2(8)E2, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2022 by Cisco Systems, Inc.
Compiled Thu 16-Jun-22 07:59 by mcpre
Neighbor Chassis-ID : e4:8e:bb:0c:bb:80
Neighbor Management-Address : 10.24.94.73
Chassis Capabilities Available : Bridge, Router
Chassis Capabilities Enabled : Bridge
Neighbor Port-ID : Gi1/1
Neighbor Port-Desc : Uplink to Core
Neighbor Port VLAN ID :
Neighbor Port VLAN Name :
Neighbor Port MFS : 0
Link aggregation supported :
Link aggregation enabled :
Aggregation port ID :
TTL : 120
Neighbor Mac-Phy details
Neighbor Auto-neg Supported : false
Neighbor Auto-Neg Enabled : true
Neighbor Auto-Neg Advertised : 1000 BASE_XFD
Neighbor MAU type : 1000 BASESXFD
Neighbor EEE information : DOT3
Neighbor TX Wake time : 0 us
Neighbor RX Wake time : 0 us
Neighbor Fallback time : 0 us
Neighbor TX Echo time : 0 us
Neighbor RX Echo time : 0 us
--------------------------------------------------------------------------------
Port : 1/1/18
Neighbor Entries : 1
Neighbor Entries Deleted : 1
Neighbor Entries Dropped : 0
Neighbor Entries Aged-Out : 1
Neighbor System-Name : PAS-IDF18-SW01.internal.domain.tld
Neighbor System-Description : Cisco IOS Software, S5400 Software (S5400-UNIVERSALK9-M), Version 15.2(8)E1, RELEASE SOFTWARE (fc8)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2021 by Cisco Systems, Inc.
Compiled Tue 12-Oct-21 03:50 by mcpre
Neighbor Chassis-ID : e4:8e:bb:0d:e6:00
Neighbor Management-Address : 10.24.94.74
Chassis Capabilities Available : Bridge, Router
Chassis Capabilities Enabled : Bridge
Neighbor Port-ID : Gi1/1
Neighbor Port-Desc : Uplink to IDF05
Neighbor Port VLAN ID :
Neighbor Port VLAN Name :
Neighbor Port MFS : 0
Link aggregation supported :
Link aggregation enabled :
Aggregation port ID :
TTL : 120
Neighbor Mac-Phy details
Neighbor Auto-neg Supported : false
Neighbor Auto-Neg Enabled : true
Neighbor Auto-Neg Advertised : 1000 BASE_XFD
Neighbor MAU type : 1000 BASESXFD
Neighbor EEE information : DOT3
Neighbor TX Wake time : 0 us
Neighbor RX Wake time : 0 us
Neighbor Fallback time : 0 us
Neighbor TX Echo time : 0 us
Neighbor RX Echo time : 0 us
--------------------------------------------------------------------------------
SUMMARY
LLDP Neighbor Descriptions may contain multi-line text. Subsequent lines will not be prepended with Neighbor System-Description : (or any other predictable text) and will produce a State Error.
STEPS TO REPRODUCE
- Execute the
aruba_aoscx_show_lldp_neighbors-info_detail.textfsmtemplate against a device that has a LLDP Neighbor which returns multiple lines for its description.
EXPECTED RESULTS
LLDP Neighbor information is parsed successfully.
ACTUAL RESULTS
Error received:
Parsing failed for 'show lldp neighbor-info detail' command:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/nautobot_device_onboarding/nornir_plays/command_getter.py", line 181, in netmiko_send_commands
parsed_output = parse_output(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ntc_templates/parse.py", line 77, in parse_output
cli_table.ParseCmd(data, attrs)
File "/usr/local/lib/python3.12/site-packages/textfsm/clitable.py", line 278, in ParseCmd
self.table = self._ParseCmdItem(self.raw, template_file=template_files[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/textfsm/clitable.py", line 312, in _ParseCmdItem
for record in fsm.ParseText(cmd_input):
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/textfsm/parser.py", line 912, in ParseText
self._CheckLine(line)
File "/usr/local/lib/python3.12/site-packages/textfsm/parser.py", line 961, in _CheckLine
if self._Operations(rule, line):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/textfsm/parser.py", line 1043, in _Operations
raise TextFSMError(
textfsm.parser.TextFSMError: State Error raised. Rule Line: 35. Input Line: Technical Support: http://www.cisco.com/techsupport
mjbear