From f72a71fc0af8dfacdbb267204e3b2c3410d7019a Mon Sep 17 00:00:00 2001 From: Josh VanDeraa Date: Fri, 19 Jul 2019 16:17:16 -0500 Subject: [PATCH] =?UTF-8?q?Fixes=20374=20-=20Adds=20example=20of=20Other/u?= =?UTF-8?q?nknown=20media=20on=20LLDP=20for=20a=20device=20=E2=80=A6=20(#3?= =?UTF-8?q?77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated cisco_ios_show_lldp_neighbor_detail template with lenient accountancy for physical media capabilities --- ...co_ios_show_lldp_neighbors_detail.template | 4 ++- ...sco_ios_show_lldp_neighbors_detail4.parsed | 11 ++++++++ .../cisco_ios_show_lldp_neighbors_detail4.raw | 25 ++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/templates/cisco_ios_show_lldp_neighbors_detail.template b/templates/cisco_ios_show_lldp_neighbors_detail.template index 930e9a0163..936e798293 100644 --- a/templates/cisco_ios_show_lldp_neighbors_detail.template +++ b/templates/cisco_ios_show_lldp_neighbors_detail.template @@ -29,7 +29,9 @@ Start ^.*IP:\s+${MANAGEMENT_IP} ^Auto\s+Negotiation ^Physical\s+media - ^\s+.+\(\S+\)\s*$$ + # Removed \(\s+\) from the template - The line 'Other/unknown' would not be captured + # Now looks for any text beginning with any space + ^\s+.+\s*$$ ^Media\s+Attachment ^\s+Inventory ^\s+Capabilities diff --git a/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.parsed b/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.parsed index 6f5f5aeb3d..307bfc8f02 100644 --- a/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.parsed +++ b/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.parsed @@ -9,3 +9,14 @@ parsed_sample: capabilities: 'T' management_ip: '' vlan: '' + +- local_interface: 'Te1/1/1' + chassis_id: '2c33.1100.a6c0' + neighbor_port_id: 'Te1/2/13' + neighbor_interface: 'asw22' + neighbor: 'dsw01' + system_description: 'Cisco IOS Software, s6t64 Software (s6t64-ADVENTERPRISEK9-M), Version 15.4(1)SY3, RELEASE SOFTWARE (fc4)' + capabilities: 'B,R' + management_ip: '172.16.0.10' + vlan: '1' + diff --git a/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.raw b/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.raw index 9257dcb5d6..7c00d5a9b9 100644 --- a/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.raw +++ b/tests/cisco_ios/show_lldp_neighbors_detail/cisco_ios_show_lldp_neighbors_detail4.raw @@ -41,6 +41,29 @@ MED Information: PD device, Power source: PSE, Power Priority: High, Wattage: 4.0 Location - not advertised +------------------------------------------------ +Local Intf: Te1/1/1 +Chassis id: 2c33.1100.a6c0 +Port id: Te1/2/13 +Port Description: asw22 +System Name: dsw01 + +System Description: +Cisco IOS Software, s6t64 Software (s6t64-ADVENTERPRISEK9-M), Version 15.4(1)SY3, RELEASE SOFTWARE (fc4) +Technical Support: http://www.cisco.com/techsupport +Copyright (c) 1986-2017 by Cisco Systems, Inc. +Compiled Fri 27-Oct-17 23:06 by prod_rel_team + +Time remaining: 110 seconds +System Capabilities: B,R +Enabled Capabilities: B,R +Management Addresses: + IP: 172.16.0.10 +Auto Negotiation - supported, enabled +Physical media capabilities: + Other/unknown +Media Attachment Unit type - not advertised +Vlan ID: 1 -Total entries displayed: 1 +Total entries displayed: 2