You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
' Mac Address Table\n-------------------------------------------\n\nVlan Mac Address Type Ports\n---- ----------- -------- -----\n All 0100.0ccc.cccc STATIC CPU\n All 0100.0ccc.cccd STATIC CPU\n All 0180.c200.0000 STATIC CPU\n All 0180.c200.0001 STATIC CPU\n All 0180.c200.0002 STATIC CPU\n All 0180.c200.0003 STATIC CPU\n All 0180.c200.0004 STATIC CPU\n All 0180.c200.0005 STATIC CPU\n All 0180.c200.0006 STATIC CPU\n All 0180.c200.0007 STATIC CPU\n All 0180.c200.0008 STATIC CPU\n All 0180.c200.0009 STATIC CPU\n All 0180.c200.000a STATIC CPU\n All 0180.c200.000b STATIC CPU\n All 0180.c200.000c STATIC CPU\n All 0180.c200.000d STATIC CPU\n All 0180.c200.000e STATIC CPU\n All 0180.c200.000f STATIC CPU\n All 0180.c200.0010 STATIC CPU\n All ffff.ffff.ffff STATIC CPU\n 100 0060.0180.4ab4 DYNAMIC Po1\n 100 38c9.860d.f347 DYNAMIC Gi1/0/13\n 100 70db.9808.d3d1 DYNAMIC Po1\n 100 985a.ebcf.36ed DYNAMIC Po1\n 100 985a.ebd1.aa2a DYNAMIC Po1\n 100 985a.ebd6.d9f9 DYNAMIC Po1\n 100 f80b.cbce.0f81 DYNAMIC Po1\n 101 0004.f2f0.bcbe DYNAMIC Po1\n 101 70db.9808.d3c1 DYNAMIC Po1\n 101 f80b.cbce.0f81 DYNAMIC Po1\n 103 70db.9808.d3dd DYNAMIC Po1\n 103 f80b.cbce.0f81 DYNAMIC Po1\n 105 0010.7f5b.bfe8 DYNAMIC Po1\n 105 0050.6083.adcd DYNAMIC Po1\n 105 0090.5e18.2aab DYNAMIC Po1\n 105 70db.9808.d3f9 DYNAMIC Po1\n 105 e4c7.2269.a822 DYNAMIC Po1\n 105 f80b.cbce.0f81 DYNAMIC Po1\n 111 70db.9808.d3dd DYNAMIC Po1\n 111 f80b.cbce.0f81 DYNAMIC Po1\n 255 70db.9808.d381 DYNAMIC Po1\n 255 f80b.cbce.0f81 DYNAMIC Po1\nTotal Mac Addresses for this criterion: 42'
SUMMARY
Exception error is as it fails on the last line: textfsm.parser.TextFSMError: State Error raised. Rule Line: 45. Input Line: Total Mac Addresses for this criterion: 42
STEPS TO REPRODUCE
Issue is reproducible passing parse_ouput output from netmiko with Cisco switch running:
Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 15.0(2)SE10a, RELEASE SOFTWARE (fc3)
ISSUE TYPE
TEMPLATE USING
Value DESTINATION_ADDRESS ([0-9a-fA-F]{4}.[0-9a-fA-F]{4}.[0-9a-fA-F]{4})
Value TYPE (\w+)
Value VLAN (\w+)
Value DESTINATION_PORT (\S+)
Start
^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port -> TYPE1
^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports -> TYPE2
^\s+vlan\s+mac address\s+type\s+protocols\s+port -> TYPE3
^Vlan\s+Mac Address\s+Type\s+Ports -> TYPE4
Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
TYPE1
^${DESTINATION_ADDRESS}\s+${TYPE}\s+${VLAN}\s+${DESTINATION_PORT} -> Record
^-+\s+-+
^Displaying\s+entries
^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port
^\s*$$
^. -> Error
TYPE2
^[*|\s]\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+${DESTINATION_PORT} -> Record
^-++-+
^Displaying\s+entries
^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports
^\s*$$
^. -> Error
TYPE3
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+${DESTINATION_PORT} -> Record
^-++-+
^Displaying\s+entries
^\s+vlan\s+mac address\s+type\s+protocols\s+port
^\s*$$
^. -> Error
TYPE4
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT} -> Record
^-+\s+-+
^Displaying\s+entries
^Vlan\s+Mac Address\s+Type\s+Ports
^\s*$$
^. -> Error
SAMPLE COMMAND OUTPUT
' Mac Address Table\n-------------------------------------------\n\nVlan Mac Address Type Ports\n---- ----------- -------- -----\n All 0100.0ccc.cccc STATIC CPU\n All 0100.0ccc.cccd STATIC CPU\n All 0180.c200.0000 STATIC CPU\n All 0180.c200.0001 STATIC CPU\n All 0180.c200.0002 STATIC CPU\n All 0180.c200.0003 STATIC CPU\n All 0180.c200.0004 STATIC CPU\n All 0180.c200.0005 STATIC CPU\n All 0180.c200.0006 STATIC CPU\n All 0180.c200.0007 STATIC CPU\n All 0180.c200.0008 STATIC CPU\n All 0180.c200.0009 STATIC CPU\n All 0180.c200.000a STATIC CPU\n All 0180.c200.000b STATIC CPU\n All 0180.c200.000c STATIC CPU\n All 0180.c200.000d STATIC CPU\n All 0180.c200.000e STATIC CPU\n All 0180.c200.000f STATIC CPU\n All 0180.c200.0010 STATIC CPU\n All ffff.ffff.ffff STATIC CPU\n 100 0060.0180.4ab4 DYNAMIC Po1\n 100 38c9.860d.f347 DYNAMIC Gi1/0/13\n 100 70db.9808.d3d1 DYNAMIC Po1\n 100 985a.ebcf.36ed DYNAMIC Po1\n 100 985a.ebd1.aa2a DYNAMIC Po1\n 100 985a.ebd6.d9f9 DYNAMIC Po1\n 100 f80b.cbce.0f81 DYNAMIC Po1\n 101 0004.f2f0.bcbe DYNAMIC Po1\n 101 70db.9808.d3c1 DYNAMIC Po1\n 101 f80b.cbce.0f81 DYNAMIC Po1\n 103 70db.9808.d3dd DYNAMIC Po1\n 103 f80b.cbce.0f81 DYNAMIC Po1\n 105 0010.7f5b.bfe8 DYNAMIC Po1\n 105 0050.6083.adcd DYNAMIC Po1\n 105 0090.5e18.2aab DYNAMIC Po1\n 105 70db.9808.d3f9 DYNAMIC Po1\n 105 e4c7.2269.a822 DYNAMIC Po1\n 105 f80b.cbce.0f81 DYNAMIC Po1\n 111 70db.9808.d3dd DYNAMIC Po1\n 111 f80b.cbce.0f81 DYNAMIC Po1\n 255 70db.9808.d381 DYNAMIC Po1\n 255 f80b.cbce.0f81 DYNAMIC Po1\nTotal Mac Addresses for this criterion: 42'
SUMMARY
Exception error is as it fails on the last line: textfsm.parser.TextFSMError: State Error raised. Rule Line: 45. Input Line: Total Mac Addresses for this criterion: 42
STEPS TO REPRODUCE
Issue is reproducible passing parse_ouput output from netmiko with Cisco switch running:
Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 15.0(2)SE10a, RELEASE SOFTWARE (fc3)
cmd = 'show mac address-table'
output = device.send_command(cmd)
mac_address_output = parse_output("cisco_ios", cmd, output)
EXPECTED RESULTS
Structured data to be returned
ACTUAL RESULTS
Returned exception: textfsm.parser.TextFSMError: State Error raised. Rule Line: 45. Input Line: Total Mac Addresses for this criterion: 42
Exception error listed above.
The text was updated successfully, but these errors were encountered: