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

Fix hp_comware_display_lldp_neighbor-information_list with production… #1340

Merged
merged 2 commits into from
Mar 29, 2023
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
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
Value Required LOCAL_INTERFACE (\S+)
Value Required CHASSIS_ID (\S+)
Value Required NEIGHBOR_INTERFACE (\S+)
Value Required NEIGHBOR_INTERFACE ((\S+)|(Port\s\d+))
Value Required NEIGHBOR (\S+)

Start
^.*Nearest\s+nontpmr\s+bridge\s+neighbor
^.*Nearest\s+customer\s+bridge\s+neighbor
^.*Nearest\s+bridge\s+neighbor
^System\s+Name
^\s*${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s*$$ -> Record Start
^System\s+Name -> Format1
^Local\s+Interface -> Format2
^. -> Error

Format1
^\s*${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s*$$ -> Record Format1
# Dropping long hostnames
^\s*\S+\s*$$
^. -> Error

Format2
^\s*${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s+${NEIGHBOR}\s*$$ -> Record Format2
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Chassis ID : * -- -- Nearest nontpmr bridge neighbor
# -- -- Nearest customer bridge neighbor
Default -- -- Nearest bridge neighbor
Local Interface Chassis ID Port ID System Name
XGE1/0/0/1 bcea-fa00-0033 Ten-GigabitEthernet1/0/47 SWITCH01
XGE1/0/0/2 bcea-fa00-0033 Ten-GigabitEthernet2/0/47 SWITCH01
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- local_interface: "XGE1/0/0/1"
chassis_id: "bcea-fa00-0033"
neighbor_interface: "Ten-GigabitEthernet1/0/47"
neighbor: "SWITCH01"
- local_interface: "XGE1/0/0/2"
chassis_id: "bcea-fa00-0033"
neighbor_interface: "Ten-GigabitEthernet2/0/47"
neighbor: "SWITCH01"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
System Name Local Interface Chassis ID Port ID
SEP0000000000A0.exam GE1/0/24 10.1.2.3 AABBCCDDEEFF:P1
ple.com
SWITCH01 XGE1/0/29 bcea-fa00-0033 Ten-GigabitEthernet1/0/17
- GE2/0/45 SEP0000000000A0 Port 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- local_interface: "GE1/0/24"
chassis_id: "10.1.2.3"
neighbor_interface: "AABBCCDDEEFF:P1"
neighbor: "SEP0000000000A0.exam"
- local_interface: "XGE1/0/29"
chassis_id: "bcea-fa00-0033"
neighbor_interface: "Ten-GigabitEthernet1/0/17"
neighbor: "SWITCH01"
- local_interface: "GE2/0/45"
chassis_id: "SEP0000000000A0"
neighbor_interface: "Port 1"
neighbor: "-"