diff --git a/ntc_templates/templates/cisco_nxos_show_interface_status.textfsm b/ntc_templates/templates/cisco_nxos_show_interface_status.textfsm index ce1ce42425..5069ddf4b7 100644 --- a/ntc_templates/templates/cisco_nxos_show_interface_status.textfsm +++ b/ntc_templates/templates/cisco_nxos_show_interface_status.textfsm @@ -1,6 +1,6 @@ Value PORT (\S+) Value NAME (.*?) -Value STATUS (\S+) +Value STATUS (connected|notconnec|down|disabled|sfpAbsent|xcvrAbsen|channelDo|noOperMem) Value VLAN_ID (\d+|routed|trunk|f-path|--) Value DUPLEX (\S+) Value SPEED (\S+) @@ -9,6 +9,9 @@ Value TYPE (\S+(\s\S+)*) Start ^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN_ID}\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*$$ + ^Interface\s+Name\s+Status\s+(Reason\s+){2}description\s*$$ + ^${PORT}\s+${NAME}\s+${STATUS}\s+admin\s+down\s+\S+\s+\S+\s*$$ -> Record + ^${PORT}\s+${NAME}\s+${STATUS}\s+\S+(\s+\S+)?\s+.*?\s*$$ -> Record ^-+ ^\s*$$ ^. -> Error diff --git a/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.raw b/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.raw new file mode 100644 index 0000000000..60d8cb6d61 --- /dev/null +++ b/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.raw @@ -0,0 +1,17 @@ + +-------------------------------------------------------------------------------- +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 down admin down Administratively down +Tunnel41 Test Tun41 down sourceNotConfigure tunnel source is not configured +Tunnel42 Test Tun42 down destinationNotConf tunnel destination is not configured + \ No newline at end of file diff --git a/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.yml b/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.yml new file mode 100644 index 0000000000..aebf6aa28a --- /dev/null +++ b/tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status_tunnel.yml @@ -0,0 +1,58 @@ +--- +parsed_sample: + - duplex: "full" + name: "--" + port: "mgmt0" + speed: "a-1000" + status: "connected" + type: "--" + vlan_id: "routed" + - duplex: "full" + name: "TEST1" + port: "Eth1/1" + speed: "a-10G" + status: "connected" + type: "10Gbase-SR" + vlan_id: "routed" + - duplex: "full" + name: "TEST2" + port: "Eth1/2" + speed: "a-10G" + status: "connected" + type: "10Gbase-SR" + vlan_id: "trunk" + - duplex: "auto" + name: "TEST3" + port: "Eth1/3" + speed: "auto" + status: "disabled" + type: "10Gbase-SR" + vlan_id: "routed" + - duplex: "" + name: "Test Tun13" + port: "Tunnel13" + speed: "" + status: "connected" + type: "" + vlan_id: "" + - duplex: "" + name: "Test Tun40" + port: "Tunnel40" + speed: "" + status: "down" + type: "" + vlan_id: "" + - duplex: "" + name: "Test Tun41" + port: "Tunnel41" + speed: "" + status: "down" + type: "" + vlan_id: "" + - duplex: "" + name: "Test Tun42" + port: "Tunnel42" + speed: "" + status: "down" + type: "" + vlan_id: ""