From 4b6773517271a94a98ef440723bbe668980e2add Mon Sep 17 00:00:00 2001 From: Thomas Ruchaud <40502697+Kortzy@users.noreply.github.com> Date: Fri, 26 Jul 2024 19:36:10 +0300 Subject: [PATCH] cisco nxos show interface description for nexus without mgmt port (#1785) --- ...co_nxos_show_interface_description.textfsm | 2 +- ...cisco_nxos_show_interface_description2.raw | 126 +++++ ...cisco_nxos_show_interface_description2.yml | 442 ++++++++++++++++++ 3 files changed, 569 insertions(+), 1 deletion(-) create mode 100644 tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.raw create mode 100644 tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.yml diff --git a/ntc_templates/templates/cisco_nxos_show_interface_description.textfsm b/ntc_templates/templates/cisco_nxos_show_interface_description.textfsm index 74aae50935..c5c02199bf 100644 --- a/ntc_templates/templates/cisco_nxos_show_interface_description.textfsm +++ b/ntc_templates/templates/cisco_nxos_show_interface_description.textfsm @@ -4,7 +4,7 @@ Value SPEED (\d+G?) Value DESCRIPTION (\S.*?) Start - ^Interface\s+Description\s*$$ -> Begin + ^(Interface\s+Description|Port\s+Type\s+Speed\s+Description)\s*$$ -> Begin Begin ^-+ diff --git a/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.raw b/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.raw new file mode 100644 index 0000000000..1634ad5b79 --- /dev/null +++ b/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.raw @@ -0,0 +1,126 @@ + +------------------------------------------------------------------------------- +Port Type Speed Description +------------------------------------------------------------------------------- +Eth4/1 eth 10G -- +Eth4/2 eth 1000 -- +Eth4/3 eth 10G This is a test description +Eth4/4 eth 10G This is a test description +Eth4/5 eth 10G This is a test description +Eth4/6 eth 1000 This is a test description +Eth4/7 eth 10G This is a test description +Eth4/8 eth 1000 This is a test description +Eth4/9 eth 10G This is a test description +Eth4/10 eth 10G This is a test description +Eth4/11 eth 10G This is a test description +Eth4/12 eth 10G This is a test description +Eth4/13 eth 1000 This is a test description +Eth4/14 eth 10G -- +Eth4/15 eth 10G This is a test description +Eth4/16 eth 10G This is a test description +Eth4/17 eth 1000 This is a test description +Eth4/18 eth 10G This is a test description +Eth4/19 eth 1000 This is a test description +Eth4/20 eth 10G This is a test description +Eth4/21 eth 10G This is a test description +Eth4/22 eth 10G This is a test description +Eth4/23 eth 10G This is a test description +Eth4/24 eth 10G This is a test description +Eth6/1 eth 10G This is a description on line card 6 +Eth6/2 eth 10G This is a description on line card 6 +Eth6/3 eth 1000 This is a description on line card 6 +Eth6/4 eth 1000 This is a description on line card 6 +Eth6/5 eth 10G This is a description on line card 6 +Eth6/6 eth 1000 This is a description on line card 6 +Eth6/7 eth 10G This is a description on line card 6 +Eth6/8 eth 10G This is a description on line card 6 +Eth6/9 eth 10G This is a description on line card 6 +Eth6/10 eth 10G This is a description on line card 6 +Eth6/11 eth 10G This is a description on line card 6 +Eth6/12 eth 10G This is a description on line card 6 +Eth6/13 eth 10G This is a description on line card 6 +Eth6/14 eth 10G This is a description on line card 6 +Eth6/15 eth 10G This is a description on line card 6 +Eth6/16 eth 1000 This is a description on line card 6 +Eth6/17 eth 10G This is a description on line card 6 +Eth6/18 eth 1000 This is a description on line card 6 +Eth6/19 eth 10G This is a description on line card 6 +Eth6/20 eth 10G This is a description on line card 6 +Eth6/21 eth 10G This is a description on line card 6 +Eth6/22 eth 10G This is a description on line card 6 +Eth6/23 eth 10G This is a description on line card 6 +Eth6/24 eth 10G This is a description on line card 6 +Eth6/25 eth 1000 This is a description on line card 6 +Eth6/26 eth 1000 This is a description on line card 6 +Eth6/27 eth 10G This is a description on line card 6 +Eth6/28 eth 1000 This is a description on line card 6 +Eth6/29 eth 10G This is a description on line card 6 +Eth6/30 eth 10G This is a description on line card 6 +Eth6/31 eth 10G This is a description on line card 6 +Eth6/32 eth 10G This is a description on line card 6 +Eth6/33 eth 10G This is a description on line card 6 +Eth6/34 eth 1000 This is a description on line card 6 +Eth6/35 eth 10G This is a description on line card 6 +Eth6/36 eth 1000 This is a description on line card 6 +Eth6/37 eth 10G This is a description on line card 6 +Eth6/38 eth 10G This is a description on line card 6 +Eth6/39 eth 1000 This is a description on line card 6 +Eth6/40 eth 10G This is a description on line card 6 +Eth6/41 eth 10G This is a description on line card 6 +Eth6/42 eth 10G This is a description on line card 6 +Eth6/43 eth 10G This is a description on line card 6 +Eth6/44 eth 10G This is a description on line card 6 +Eth6/45 eth 10G This is a description on line card 6 +Eth6/46 eth 10G This is a description on line card 6 +Eth6/47 eth 10G This is a description on line card 6 +Eth6/48 eth 10G This is a description on line card 6 + +------------------------------------------------------------------------------- +Interface Description +------------------------------------------------------------------------------- +Po10 This is a portchannel +Po20 This is a portchannel +Po25 This is a portchannel +Po300 This is a portchannel + +------------------------------------------------------------------------------- +Interface Description +------------------------------------------------------------------------------- +Lo0 This is a loopback +Lo1 This is a loopback +Lo2 This is a loopback +Lo20 -- +Lo30 -- +Vlan1 -- +Vlan9 Nice little VLAN interface here +Vlan10 Nice little VLAN interface here +Vlan20 Nice little VLAN interface here +Vlan30 Nice little VLAN interface here + +------------------------------------------------------------------------------- +Port Type Speed Description +------------------------------------------------------------------------------- +Eth100/1/1 eth 1000 This is another description +Eth100/1/2 eth 1000 This is another description +Eth100/1/3 eth 1000 This is another description +Eth100/1/4 eth 1000 This is another description +Eth100/1/5 eth 1000 This is another description +Eth100/1/6 eth 1000 This is another description +Eth100/1/7 eth 1000 This is another description +Eth100/1/8 eth 1000 This is another description +Eth100/1/9 eth 1000 This is another description +Eth100/1/10 eth 1000 This is another description +Eth100/1/11 eth 1000 This is another description +Eth100/1/12 eth 1000 This is another description +Eth100/1/13 eth 1000 This is another description +Eth100/1/14 eth 1000 This is another description +Eth100/1/15 eth 1000 This is another description +Eth100/1/16 eth 1000 This is another description +Eth100/1/17 eth 1000 This is another description +Eth100/1/18 eth 1000 This is another description +Eth100/1/19 eth 1000 This is another description +Eth100/1/20 eth 1000 This is another description +Eth100/1/21 eth 1000 This is another description +Eth100/1/22 eth 1000 This is another description +Eth100/1/23 eth 1000 This is another description +Eth100/1/24 eth 1000 This is another description diff --git a/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.yml b/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.yml new file mode 100644 index 0000000000..5587e3542a --- /dev/null +++ b/tests/cisco_nxos/show_interface_description/cisco_nxos_show_interface_description2.yml @@ -0,0 +1,442 @@ +--- +parsed_sample: + - port: "Eth4/1" + type: "eth" + speed: "10G" + description: "--" + - port: "Eth4/2" + type: "eth" + speed: "1000" + description: "--" + - port: "Eth4/3" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/4" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/5" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/6" + type: "eth" + speed: "1000" + description: "This is a test description" + - port: "Eth4/7" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/8" + type: "eth" + speed: "1000" + description: "This is a test description" + - port: "Eth4/9" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/10" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/11" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/12" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/13" + type: "eth" + speed: "1000" + description: "This is a test description" + - port: "Eth4/14" + type: "eth" + speed: "10G" + description: "--" + - port: "Eth4/15" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/16" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/17" + type: "eth" + speed: "1000" + description: "This is a test description" + - port: "Eth4/18" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/19" + type: "eth" + speed: "1000" + description: "This is a test description" + - port: "Eth4/20" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/21" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/22" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/23" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth4/24" + type: "eth" + speed: "10G" + description: "This is a test description" + - port: "Eth6/1" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/2" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/3" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/4" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/5" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/6" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/7" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/8" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/9" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/10" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/11" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/12" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/13" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/14" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/15" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/16" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/17" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/18" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/19" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/20" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/21" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/22" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/23" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/24" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/25" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/26" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/27" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/28" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/29" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/30" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/31" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/32" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/33" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/34" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/35" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/36" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/37" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/38" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/39" + type: "eth" + speed: "1000" + description: "This is a description on line card 6" + - port: "Eth6/40" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/41" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/42" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/43" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/44" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/45" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/46" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/47" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Eth6/48" + type: "eth" + speed: "10G" + description: "This is a description on line card 6" + - port: "Po10" + type: "" + speed: "" + description: "This is a portchannel" + - port: "Po20" + type: "" + speed: "" + description: "This is a portchannel" + - port: "Po25" + type: "" + speed: "" + description: "This is a portchannel" + - port: "Po300" + type: "" + speed: "" + description: "This is a portchannel" + - port: "Lo0" + type: "" + speed: "" + description: "This is a loopback" + - port: "Lo1" + type: "" + speed: "" + description: "This is a loopback" + - port: "Lo2" + type: "" + speed: "" + description: "This is a loopback" + - port: "Lo20" + type: "" + speed: "" + description: "--" + - port: "Lo30" + type: "" + speed: "" + description: "--" + - port: "Vlan1" + type: "" + speed: "" + description: "--" + - port: "Vlan9" + type: "" + speed: "" + description: "Nice little VLAN interface here" + - port: "Vlan10" + type: "" + speed: "" + description: "Nice little VLAN interface here" + - port: "Vlan20" + type: "" + speed: "" + description: "Nice little VLAN interface here" + - port: "Vlan30" + type: "" + speed: "" + description: "Nice little VLAN interface here" + - port: "Eth100/1/1" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/2" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/3" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/4" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/5" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/6" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/7" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/8" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/9" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/10" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/11" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/12" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/13" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/14" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/15" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/16" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/17" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/18" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/19" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/20" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/21" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/22" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/23" + type: "eth" + speed: "1000" + description: "This is another description" + - port: "Eth100/1/24" + type: "eth" + speed: "1000" + description: "This is another description"