From 62858ff23b39ef7a8887618c854c60add5d1f9e4 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Sat, 9 Apr 2022 17:14:09 +0200 Subject: [PATCH] fix not advertised vlan (#1114) fix not advertised vlan --- ...co_nxos_show_lldp_neighbors_detail.textfsm | 2 +- ...cisco_nxos_show_lldp_neighbors_detail2.raw | 34 +++++++++++++++++++ ...cisco_nxos_show_lldp_neighbors_detail2.yml | 18 ++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.raw create mode 100644 tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.yml diff --git a/ntc_templates/templates/cisco_nxos_show_lldp_neighbors_detail.textfsm b/ntc_templates/templates/cisco_nxos_show_lldp_neighbors_detail.textfsm index aa5e8bb1ce..9d7e09f3ac 100644 --- a/ntc_templates/templates/cisco_nxos_show_lldp_neighbors_detail.textfsm +++ b/ntc_templates/templates/cisco_nxos_show_lldp_neighbors_detail.textfsm @@ -9,7 +9,6 @@ Value VLAN ([0-9]+) Start - ^.*not advertised ^[Cc]hassis\s[idID]{2}\:\s${CHASSIS_ID}$$ ^[Pp]ort\s[idID]{2}\:\s${NEIGHBOR_INTERFACE}$$ ^[Ll]ocal\s[Pp]ort\s[idID]{2}\:\s${LOCAL_INTERFACE}$$ @@ -18,3 +17,4 @@ Start ^[Ee]nabled\s[Cc]apabilities\:\s${CAPABILITIES}$$ ^[Mm]anagement\s[Aa]ddress\:\s${MGMT_ADDRESS}$$ ^[Vv]lan\s[idID]{2}\:\s${VLAN}$$ -> Record + ^[Vv]lan\s[idID]{2}\:\snot advertised -> Record diff --git a/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.raw b/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.raw new file mode 100644 index 0000000000..8a75e4fcb9 --- /dev/null +++ b/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.raw @@ -0,0 +1,34 @@ +Capability codes: + (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device + (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other +Device ID Local Intf Hold-time Capability Port ID + +Chassis id: 3473.2d00.0001 +Port id: Ethernet1/52 +Local Port id: Eth1/52 +Port Description: SW-NEXUS-UPLINK +System Name: SW-NEXUS +System Description: Cisco Nexus Operating System (NX-OS) Software 9.3(8) +TAC support: http://www.cisco.com/tac +Copyright (c) 2002-2021, Cisco Systems, Inc. All rights reserved. +Time remaining: 97 seconds +System Capabilities: B, R +Enabled Capabilities: B, R +Management Address: 192.168.1.2 +Management Address IPV6: not advertised +Vlan ID: not advertised + + +Chassis id: 24a9.3700.0001 +Port id: 1a51.4800.0001 +Local Port id: Eth101/1/10 +Port Description: eth0 +System Name: pure-storage +System Description: FlashArray FA-X20R3 pure-storage +Time remaining: 3 seconds +System Capabilities: B, W, R, S +Enabled Capabilities: B +Management Address: not advertised +Management Address IPV6: not advertised +Vlan ID: 0 + diff --git a/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.yml b/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.yml new file mode 100644 index 0000000000..044375b72b --- /dev/null +++ b/tests/cisco_nxos/show_lldp_neighbors_detail/cisco_nxos_show_lldp_neighbors_detail2.yml @@ -0,0 +1,18 @@ +--- +parsed_sample: + - neighbor: "SW-NEXUS" + local_interface: "Eth1/52" + neighbor_interface: "Ethernet1/52" + chassis_id: "3473.2d00.0001" + mgmt_address: "192.168.1.2" + system_description: "Cisco Nexus Operating System (NX-OS) Software 9.3(8)" + capabilities: "B, R" + vlan: "" + - neighbor: "pure-storage" + local_interface: "Eth101/1/10" + neighbor_interface: "1a51.4800.0001" + chassis_id: "24a9.3700.0001" + mgmt_address: "" + system_description: "FlashArray FA-X20R3 pure-storage" + capabilities: "B" + vlan: "0"