Skip to content

Commit

Permalink
Enhancement: IOS lldp neighbors - add capabilities capture group (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewmanthei authored and jmcgill298 committed Dec 5, 2019
1 parent f7487f3 commit 327f6d2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions templates/cisco_ios_show_lldp_neighbors.textfsm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Value Required NEIGHBOR (\S{0,20})
Value Required LOCAL_INTERFACE (\S+)
Value CAPABILITIES (\S*)
Value Required NEIGHBOR_INTERFACE (\S+)

Start
Expand All @@ -9,6 +10,6 @@ Start
^Time\s+source\s+is

LLDP
^${NEIGHBOR}\s*${LOCAL_INTERFACE}\s+\d+\s+(\S+)*\s+${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR}\s*${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITIES}\s+${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR}
^\s+${LOCAL_INTERFACE}\s+\d+\s+(\S+)*\s+${NEIGHBOR_INTERFACE} -> Record
^\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITIES}\s+${NEIGHBOR_INTERFACE} -> Record
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
---
parsed_sample:
- neighbor: "S2"
- capabilities: "B"
local_interface: "Fa0/13"
neighbor: "S2"
neighbor_interface: "Gi0/13"
- neighbor: "Cisco-switch-1"
- capabilities: ""
local_interface: "Gi1/0/7"
neighbor: "Cisco-switch-1"
neighbor_interface: "Gi0/1"
- neighbor: "Juniper-switch1"
- capabilities: "B,R"
local_interface: "Gi2/0/1"
neighbor: "Juniper-switch1"
neighbor_interface: "666"
- neighbor: "Juniper-switch1"
- capabilities: "B,R"
local_interface: "Gi1/0/1"
neighbor: "Juniper-switch1"
neighbor_interface: "531"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
parsed_sample:
- neighbor: "long_name_swt.josh-v"
local_interface: "Gi0/2"
capabilities: "R"
neighbor_interface: "Gi0/0"

0 comments on commit 327f6d2

Please sign in to comment.