-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hp_comware_display_bgp_peer_ipv4 (#2020)
- Loading branch information
1 parent
54c5988
commit 14c5e22
Showing
6 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
ntc_templates/templates/hp_comware_display_bgp_peer_ipv4.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Value Filldown LOCAL_ROUTER_ID (\d{1,3}(?:\.\d{1,3}){3}) | ||
Value Filldown LOCAL_AS_NUMBER (\d+) | ||
Value Required,Key PEER (\d{1,3}(?:\.\d{1,3}){3}) | ||
Value Required REMOTE_ASN (\d+) | ||
Value MESSAGES_RECEIVED (\d+) | ||
Value MESSAGES_SENT (\d+) | ||
Value OUTPUT_QUEUE (\d+) | ||
Value PREFIXES_RECEIVED (\d+) | ||
Value UP_DOWN (\S+) | ||
Value STATE (\S+) | ||
|
||
Start | ||
^\s*BGP\s+local\s+router\s+ID:\s+${LOCAL_ROUTER_ID} | ||
^\s+Local\s+AS\s+number:\s+${LOCAL_AS_NUMBER} | ||
^\s+Total\s+number\s+of\s+peers:\s+(\d+)\s+Peers\s+in\s+established\s+state:\s+(\d+) | ||
^\s*\*\s+-\s+Dynamically\s+created\s+peer | ||
^\s*Peer\s+AS\s+MsgRcvd\s+MsgSent\s+OutQ\s+PrefRcv\s+Up\/Down\s+State | ||
^\s{2}${PEER}\s+${REMOTE_ASN}\s+${MESSAGES_RECEIVED}\s+${MESSAGES_SENT}\s+${OUTPUT_QUEUE}\s+${PREFIXES_RECEIVED}\s+${UP_DOWN}\s+${STATE}\s*$$ -> Record | ||
^. -> Error | ||
|
||
EOF |
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
13 changes: 13 additions & 0 deletions
13
tests/hp_comware/display_bgp_peer_ipv4/hp_comware_display_bgp_peer_ipv4.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,13 @@ | ||
|
||
BGP local router ID: 1.2.3.4 | ||
Local AS number: 4259844162 | ||
Total number of peers: 5 Peers in established state: 3 | ||
|
||
* - Dynamically created peer | ||
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State | ||
|
||
12.123.123.189 100 101225 113460 0 1 0286h47m Established | ||
2.114.82.34 100 0 0 0 0 0129h15m Connect | ||
2.114.82.38 100 0 0 0 0 0129h15m Connect | ||
2.114.82.42 100 45618 50575 0 1 0129h14m Established | ||
2.114.82.46 100 45619 56743 0 1 0129h14m Established |
52 changes: 52 additions & 0 deletions
52
tests/hp_comware/display_bgp_peer_ipv4/hp_comware_display_bgp_peer_ipv4.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,52 @@ | ||
--- | ||
parsed_sample: | ||
- local_as_number: "4259844162" | ||
local_router_id: "1.2.3.4" | ||
messages_received: "101225" | ||
messages_sent: "113460" | ||
output_queue: "0" | ||
peer: "12.123.123.189" | ||
prefixes_received: "1" | ||
remote_asn: "100" | ||
state: "Established" | ||
up_down: "0286h47m" | ||
- local_as_number: "4259844162" | ||
local_router_id: "1.2.3.4" | ||
messages_received: "0" | ||
messages_sent: "0" | ||
output_queue: "0" | ||
peer: "2.114.82.34" | ||
prefixes_received: "0" | ||
remote_asn: "100" | ||
state: "Connect" | ||
up_down: "0129h15m" | ||
- local_as_number: "4259844162" | ||
local_router_id: "1.2.3.4" | ||
messages_received: "0" | ||
messages_sent: "0" | ||
output_queue: "0" | ||
peer: "2.114.82.38" | ||
prefixes_received: "0" | ||
remote_asn: "100" | ||
state: "Connect" | ||
up_down: "0129h15m" | ||
- local_as_number: "4259844162" | ||
local_router_id: "1.2.3.4" | ||
messages_received: "45618" | ||
messages_sent: "50575" | ||
output_queue: "0" | ||
peer: "2.114.82.42" | ||
prefixes_received: "1" | ||
remote_asn: "100" | ||
state: "Established" | ||
up_down: "0129h14m" | ||
- local_as_number: "4259844162" | ||
local_router_id: "1.2.3.4" | ||
messages_received: "45619" | ||
messages_sent: "56743" | ||
output_queue: "0" | ||
peer: "2.114.82.46" | ||
prefixes_received: "1" | ||
remote_asn: "100" | ||
state: "Established" | ||
up_down: "0129h14m" |
10 changes: 10 additions & 0 deletions
10
tests/hp_comware/display_bgp_peer_ipv4/hp_comware_display_bgp_peer_ipv4_low_uptime.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,10 @@ | ||
BGP local router ID: 1.2.3.74 | ||
Local AS number: 4259844944 | ||
Total number of peers: 3 Peers in established state: 3 | ||
|
||
* - Dynamically created peer | ||
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State | ||
|
||
2.2.2.129 100 1058340 1101538 0 1 2998h36m Established | ||
2.2.2.133 100 1058338 1124484 0 1 2998h36m Established | ||
2.2.2.30 200 1180 1221 0 1 08:30:47 Established |
32 changes: 32 additions & 0 deletions
32
tests/hp_comware/display_bgp_peer_ipv4/hp_comware_display_bgp_peer_ipv4_low_uptime.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,32 @@ | ||
--- | ||
parsed_sample: | ||
- local_as_number: "4259844944" | ||
local_router_id: "1.2.3.74" | ||
messages_received: "1058340" | ||
messages_sent: "1101538" | ||
output_queue: "0" | ||
peer: "2.2.2.129" | ||
prefixes_received: "1" | ||
remote_asn: "100" | ||
state: "Established" | ||
up_down: "2998h36m" | ||
- local_as_number: "4259844944" | ||
local_router_id: "1.2.3.74" | ||
messages_received: "1058338" | ||
messages_sent: "1124484" | ||
output_queue: "0" | ||
peer: "2.2.2.133" | ||
prefixes_received: "1" | ||
remote_asn: "100" | ||
state: "Established" | ||
up_down: "2998h36m" | ||
- local_as_number: "4259844944" | ||
local_router_id: "1.2.3.74" | ||
messages_received: "1180" | ||
messages_sent: "1221" | ||
output_queue: "0" | ||
peer: "2.2.2.30" | ||
prefixes_received: "1" | ||
remote_asn: "200" | ||
state: "Established" | ||
up_down: "08:30:47" |