From 41a5e1d33436e5f109c2a743baaa4c8dca4c0865 Mon Sep 17 00:00:00 2001 From: Maxim Shpak Date: Mon, 11 Dec 2023 19:34:25 +0300 Subject: [PATCH] Fix template for Cisco IOS command 'show interfaces description' --- .../templates/cisco_ios_show_interfaces_description.textfsm | 2 +- .../cisco_ios_show_interfaces_description.raw | 5 +++-- .../cisco_ios_show_interfaces_description.yml | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_interfaces_description.textfsm b/ntc_templates/templates/cisco_ios_show_interfaces_description.textfsm index 040aa3d013..451946bd74 100644 --- a/ntc_templates/templates/cisco_ios_show_interfaces_description.textfsm +++ b/ntc_templates/templates/cisco_ios_show_interfaces_description.textfsm @@ -1,5 +1,5 @@ Value PORT (\S+) -Value STATUS (up|down|deleted|admin\s+down) +Value STATUS (up|down|deleted|admin\s+down|reset) Value PROTOCOL (up|down) Value DESCRIP (\S.*?) diff --git a/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.raw b/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.raw index 45a5dea3f8..d9975a2ff6 100644 --- a/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.raw +++ b/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.raw @@ -1,5 +1,5 @@ Interface Status Protocol Description -Vl1 admin down down +Vl1 admin down down Vl99 up up 10.20.99.0_Switch_mgmt_VLAN Gi0/1 down down D3 USER Gi0/2 down down D3 USER @@ -9,7 +9,8 @@ Gi0/5 down down D3 USER Gi0/6 down down D3 USER Gi0/7 down down D3 USER Gi0/8 up up MERAKI TEST AP -Gi0/9 admin down down +Gi0/9 admin down down Gi0/10 up up UPLINK TO TULCCD3S01P Gi0/10.10 deleted down Gi0/10.20 up up Carrier VLAN +Gi0/10.30 reset down Garbage diff --git a/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.yml b/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.yml index 8654451669..1fec37a0be 100644 --- a/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.yml +++ b/tests/cisco_ios/show_interfaces_description/cisco_ios_show_interfaces_description.yml @@ -56,3 +56,7 @@ parsed_sample: status: "up" protocol: "up" descrip: "Carrier VLAN" + - port: "Gi0/10.30" + status: "reset" + protocol: "down" + descrip: "Garbage"