forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hp_comware_display_lldp_neighbor-information_list with production… (
networktocode#1340) * Fix hp_comware_display_lldp_neighbor-information_list with production outputs * cosmetic
- Loading branch information
Showing
5 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
16 changes: 13 additions & 3 deletions
16
ntc_templates/templates/hp_comware_display_lldp_neighbor-information_list.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
6 changes: 6 additions & 0 deletions
6
...lay_lldp_neighbor-information_list/hp_comware_display_lldp_neighbor-information_list1.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
10 changes: 10 additions & 0 deletions
10
...lay_lldp_neighbor-information_list/hp_comware_display_lldp_neighbor-information_list1.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
5 changes: 5 additions & 0 deletions
5
...lay_lldp_neighbor-information_list/hp_comware_display_lldp_neighbor-information_list2.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
14 changes: 14 additions & 0 deletions
14
...lay_lldp_neighbor-information_list/hp_comware_display_lldp_neighbor-information_list2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "-" |