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
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value VLAN (\d+|routed|trunk|--)
Value DUPLEX (\S+)
Value SPEED (\S+)
Value TYPE (\S+(\s\S+)*)
Start
^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s+${TYPE}\s*$$ -> Record
^[Pp]ort\s+[Nn]ame\s+[Ss]tatus\s+[Vv]lan\s+[Dd]uplex\s+[Ss]peed\s+[Tt]ype\s*$$
^-+
^\s*$$
^. -> Error
SAMPLE COMMAND OUTPUT
--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
Eth1/1 -- connected trunk full 10G 10Gbase-SR
Eth1/3 -- connected trunk full 10G 10Gbase-LR
Eth1/5 -- connected trunk full 10G SFP-H10GB-C
Eth1/7 -- connected 1 full 10G Fabric Exte
Eth1/35 -- sfpAbsent 1 full 10G --
Eth101/1/1 -- connected 101 full 1000 10/100/1000
Eth105/1/1 -- notconnec 101 full 1000
SUMMARY
If there is no Type value the script aborts.
STEPS TO REPRODUCE
Use ssh_con.send_command('show interface status', use_textfsm=True) with a Cisco N2K-C2248TP-E-1GE connected.
EXPECTED RESULTS
That an empty string is returned for interfaces without type.
ACTUAL RESULTS
The scripts aborts.
textfsm.parser.TextFSMError: State Error raised. Rule Line: 14. Input Line: Eth105/1/1 -- notconnec 201 full 1000
The text was updated successfully, but these errors were encountered:
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value VLAN (\d+|routed|trunk|--)
Value DUPLEX (\S+)
Value SPEED (\S+)
Value TYPE (\S+(\s\S+)*)
Start
^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}(?:\s+${TYPE})?\s*$$ -> Record
^[Pp]ort\s+[Nn]ame\s+[Ss]tatus\s+[Vv]lan\s+[Dd]uplex\s+[Ss]peed\s+[Tt]ype\s*$$
^-+
^\s*$$
^. -> Error
This fixes it if you want to set Et105/1/1 as having a type of "".
ISSUE TYPE
TEMPLATE USING
cisco_nxos_show_interface_status.textfsm
SAMPLE COMMAND OUTPUT
SUMMARY
If there is no Type value the script aborts.
STEPS TO REPRODUCE
Use
ssh_con.send_command('show interface status', use_textfsm=True)
with a Cisco N2K-C2248TP-E-1GE connected.EXPECTED RESULTS
That an empty string is returned for interfaces without type.
ACTUAL RESULTS
The scripts aborts.
The text was updated successfully, but these errors were encountered: