Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s300 lldp neighbors allow for multiline values #1820

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ntc_templates/templates/cisco_s300_show_lldp_neighbors.textfsm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Value NEIGHBOR_NAME (\S+)
Value List NEIGHBOR_NAME (\S+)
Value LOCAL_INTERFACE (\S+)
Value NEIGHBOR_INTERFACE (\S+)
Value List NEIGHBOR_INTERFACE (\S+)
Value CHASSIS_ID (([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))

Start
Expand All @@ -11,7 +11,11 @@ Start
^. -> Error

Begin
^\S+ -> Continue.Record
^${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s+(${NEIGHBOR_NAME})?\s+\S+\s+\d+
^\s{28}${NEIGHBOR_INTERFACE}\s*$$
^\s{42}${NEIGHBOR_NAME}\s*$$
^\s{28}${NEIGHBOR_INTERFACE}\s+${NEIGHBOR_NAME}\s*$$
^-+
^${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s+${NEIGHBOR_NAME}.+ -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
parsed_sample:
- chassis_id: "00:08:32:0f:1e:bd"
local_interface: "gi27"
neighbor_interface: "gi27"
neighbor_name: "prsw03freeporil"
neighbor_interface:
- "gi27"
neighbor_name:
- "prsw03freeporil"
- chassis_id: "00:08:32:0f:04:cc"
local_interface: "gi28"
neighbor_interface: "gi28"
neighbor_name: "prsw01freeportin"
neighbor_interface:
- "gi28"
neighbor_name:
- "prsw01freeportin"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
System capability legend:
B - Bridge; R - Router; W - Wlan Access Point; T - telephone;
D - DOCSIS Cable Device; H - Host; r - Repeater;
TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other

Port Device ID Port ID System Name Capabilities TTL
--------- ----------------- ------------- ----------------- ------------ -----
gi10 f8:b1:56:ac:07:64 f8:b1:56:ac:0 O 3482
7:64
gi21 28:6f:7f:0b:75:a0 Gi0 Fjallarodgardsfor B 105
skola-AP03.net.no
rob.se
gi22 a0:e0:af:ec:e9:d0 a0:e0:af:ec:e Fjallarodgardsfor B 118
9:d0 skola-AP01.net.no
rob.se
gi23 a0:e0:af:b1:c8:a0 Gi0 Fjallarodgardsfor B 105
skola-AP04.net.no
rob.se
gi24 a0:e0:af:22:3d:40 Gi0 Fjallarodgardsfor B 114
skola-AP02.net.no
rob.se
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
parsed_sample:
- chassis_id: "f8:b1:56:ac:07:64"
local_interface: "gi10"
neighbor_interface:
- "f8:b1:56:ac:0"
- "7:64"
neighbor_name:
- "None"
- chassis_id: "28:6f:7f:0b:75:a0"
local_interface: "gi21"
neighbor_interface:
- "Gi0"
neighbor_name:
- "Fjallarodgardsfor"
- "skola-AP03.net.no"
- "rob.se"
- chassis_id: "a0:e0:af:ec:e9:d0"
local_interface: "gi22"
neighbor_interface:
- "a0:e0:af:ec:e"
- "9:d0"
neighbor_name:
- "Fjallarodgardsfor"
- "skola-AP01.net.no"
- "rob.se"
- chassis_id: "a0:e0:af:b1:c8:a0"
local_interface: "gi23"
neighbor_interface:
- "Gi0"
neighbor_name:
- "Fjallarodgardsfor"
- "skola-AP04.net.no"
- "rob.se"
- chassis_id: "a0:e0:af:22:3d:40"
local_interface: "gi24"
neighbor_interface:
- "Gi0"
neighbor_name:
- "Fjallarodgardsfor"
- "skola-AP02.net.no"
- "rob.se"
Loading