TextFSM version == 2.1.0
ntc-templates version == 8.1.0
python version == 3.13.2
When running a show interface status on a Cisco Nexus switch, if there are Tunnel interfaces present, Cisco NXOS changes the column headers for those Tunnel interfaces in the same output. For example:
nexusswitch# show interface status
--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
mgmt0 -- connected routed full a-1000 --
Eth1/1 TEST1 connected routed full a-10G 10Gbase-SR
Eth1/2 TEST2 connected trunk full a-10G 10Gbase-SR
Eth1/3 TEST3 disabled routed auto auto 10Gbase-SR
...
...
-------------------------------------------------------------------------------
Interface Name Status Reason Reason description
-------------------------------------------------------------------------------
Tunnel13 Test Tun13 connected none none
Tunnel40 Test Tun40 connected none none
Tunnel41 Test Tun41 connected none none
Tunnel42 Test Tun42 connected none none
This is causing the following error in the TextFSM module:
File "C:\Users\player1\AppData\Local\Programs\Python\Python313\Lib\site-packages\textfsm\clitable.py", line 278, in ParseCmd
self.table = self._ParseCmdItem(self.raw, template_file=template_files[0])
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\player1\AppData\Local\Programs\Python\Python313\Lib\site-packages\textfsm\clitable.py", line 312, in _ParseCmdItem
for record in fsm.ParseText(cmd_input):
~~~~~~~~~~~~~^^^^^^^^^^^
File "C:\Users\player1\AppData\Local\Programs\Python\Python313\Lib\site-packages\textfsm\parser.py", line 912, in ParseText
self._CheckLine(line)
~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\player1\AppData\Local\Programs\Python\Python313\Lib\site-packages\textfsm\parser.py", line 961, in _CheckLine
if self._Operations(rule, line):
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "C:\Users\player1\AppData\Local\Programs\Python\Python313\Lib\site-packages\textfsm\parser.py", line 1043, in _Operations
raise TextFSMError(
...<2 lines>...
)
textfsm.parser.TextFSMError: State Error raised. Rule Line: 14. Input Line: Interface Name Status Reason Reason description
I have no idea why Cisco NXOS is changing column headers mid output (smh), and it looks like TextFSM is just as confused as I am. :(
TextFSM version ==
2.1.0ntc-templates version ==
8.1.0python version ==
3.13.2When running a
show interface statuson a Cisco Nexus switch, if there are Tunnel interfaces present, Cisco NXOS changes the column headers for those Tunnel interfaces in the same output. For example:This is causing the following error in the TextFSM module:
I have no idea why Cisco NXOS is changing column headers mid output (smh), and it looks like TextFSM is just as confused as I am. :(