Skip to content

Commit

Permalink
Fix multiline LLDP Neighbor entries for cisco_nxos_show_lldp_neighbor…
Browse files Browse the repository at this point in the history
…s - issue#1166 (#1586)

* fix issue#1166 - multiline lldp neighbor entry

* handle condition where lldp neighbor name has a trailing space
  • Loading branch information
mjbear authored Jan 8, 2024
1 parent 5ee7aad commit d8e2d68
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Start
^Device.*ID -> LLDP

LLDP
^${NEIGHBOR}$$
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+(\w+?\s)+\s+${NEIGHBOR_INTERFACE} -> Record
^\s+${LOCAL_INTERFACE}\s+\d+\s+(\w+?\s)+\s+${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+(\w+?\s+)?${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR}\s*$$
^\s+${LOCAL_INTERFACE}\s+\d+\s+(\w+?\s+)?${NEIGHBOR_INTERFACE} -> Record
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
parsed_sample:
- neighbor: "nx-osv9000-3-long-name.com"
local_interface: "Eth1/1"
- local_interface: "Eth1/1"
neighbor: "nx-osv9000-3-long-name.com"
neighbor_interface: "Ethernet1/1"
- neighbor: "nx-osv9000-4-extremely-long-name"
local_interface: "Eth1/2"
- local_interface: "Eth1/2"
neighbor: "nx-osv9000-4-extremely-long-name"
neighbor_interface: "Ethernet1/1"
- neighbor: "nx-osv9000-2"
local_interface: "Eth1/3"
- local_interface: "Eth1/3"
neighbor: "nx-osv9000-2"
neighbor_interface: "Ethernet1/3"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
r1-services# show lldp neighbor
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
dcx3.org.local
mgmt0 120 B Gi1/0/37
r2-services Eth1/1 120 BR Eth1/1
dx1.org.local
Eth1/3 120 B Te1/1/1
fw1-clinical-partner
Eth1/5 120 ethernet1/9
fw1-clinical-partner
Eth1/6 120 ethernet1/10
fw2-clinical-partner
Eth1/7 120 ethernet1/9
fw2-clinical-partner
Eth1/8 120 ethernet1/10
cr-ebc.org.local Eth3/1 120 BR Fo1/0/8
r2-services Eth3/13 120 BR Eth3/13
fw1-services Eth3/23 120 ethernet1/21
fw2-services Eth3/24 120 ethernet1/23
cr-park.org.local
Eth4/1 120 BR Fo1/0/8
r2-services Eth4/13 120 BR Eth4/13
fw1-services Eth4/23 120 ethernet1/22
fw2-services Eth4/24 120 ethernet1/24
Total entries displayed: 15
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
parsed_sample:
- local_interface: "mgmt0"
neighbor: "dcx3.org.local"
neighbor_interface: "Gi1/0/37"
- local_interface: "Eth1/1"
neighbor: "r2-services"
neighbor_interface: "Eth1/1"
- local_interface: "Eth1/3"
neighbor: "dx1.org.local"
neighbor_interface: "Te1/1/1"
- local_interface: "Eth1/5"
neighbor: "fw1-clinical-partner"
neighbor_interface: "ethernet1/9"
- local_interface: "Eth1/6"
neighbor: "fw1-clinical-partner"
neighbor_interface: "ethernet1/10"
- local_interface: "Eth1/7"
neighbor: "fw2-clinical-partner"
neighbor_interface: "ethernet1/9"
- local_interface: "Eth1/8"
neighbor: "fw2-clinical-partner"
neighbor_interface: "ethernet1/10"
- local_interface: "Eth3/1"
neighbor: "cr-ebc.org.local"
neighbor_interface: "Fo1/0/8"
- local_interface: "Eth3/13"
neighbor: "r2-services"
neighbor_interface: "Eth3/13"
- local_interface: "Eth3/23"
neighbor: "fw1-services"
neighbor_interface: "ethernet1/21"
- local_interface: "Eth3/24"
neighbor: "fw2-services"
neighbor_interface: "ethernet1/23"
- local_interface: "Eth4/1"
neighbor: "cr-park.org.local"
neighbor_interface: "Fo1/0/8"
- local_interface: "Eth4/13"
neighbor: "r2-services"
neighbor_interface: "Eth4/13"
- local_interface: "Eth4/23"
neighbor: "fw1-services"
neighbor_interface: "ethernet1/22"
- local_interface: "Eth4/24"
neighbor: "fw2-services"
neighbor_interface: "ethernet1/24"

0 comments on commit d8e2d68

Please sign in to comment.