Skip to content

Commit 5a61736

Browse files
jorlandobrmjbear
andauthored
Add values to cisco_xr bgp vrf all ipv4 uni sum (#2175)
* Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.textfsm Added capture of values of interest. * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.yml Added values of interest. * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.yml Added values of interest * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.yml Added values of interest * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.yml Added values of interest * Replace a few literal spaces with regex * Replace single space with multi on local AS line * Remove trailing whitespace on BGP neigh Value line * Create cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary_literal.raw Raw data with string at St/PfxRcd field * Generate structured yaml test data * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary_literal.raw * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary_literal.yml * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary_literal.raw * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary_literal.yml * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.textfsm * Update cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.textfsm --------- Co-authored-by: Michael Bear <[email protected]>
1 parent a904f6c commit 5a61736

File tree

4 files changed

+375
-10
lines changed

4 files changed

+375
-10
lines changed

ntc_templates/templates/cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.textfsm

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@ Value Required VRF (\S+)
22
Value RD (\S+)
33
Value STATE (\w+)
44
Value LOCAL_AS_NUMBER (\S+)
5+
Value List BGP_NEIGHBOR (\d+\.\d+\.\d+\.\d+)
6+
Value List NEIGHBOR_AS (\d+)
7+
Value List MESSAGES_RECEIVED (\d+)
8+
Value List MESSAGES_SENT (\d+)
9+
Value List TABLE_VERSION (\d+)
10+
Value List INPUT_QUEUE (\d+)
11+
Value List OUTPUT_QUEUE (\d+)
12+
Value List UP_DOWN (\S+)
13+
Value List STATE_OR_PREFIXES_RECEIVED (\S+)
14+
Value List SPK (\d+)
515

616
Start
717
^BGP\s+VRF\s+${VRF},\s+state:\s+${STATE}
8-
^BGP Route Distinguisher:\s+${RD}
9-
^.*,\slocal\sAS\snumber\s${LOCAL_AS_NUMBER} -> Record
18+
^BGP\s+Route\s+Distinguisher:\s+${RD}
19+
^.*,\s+local\s+AS\s+number\s+${LOCAL_AS_NUMBER}
20+
^Neighbor\s+Spk\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up/Down\s+St/PfxRcd\s*$$
21+
^${BGP_NEIGHBOR}\s+${SPK}\s+${NEIGHBOR_AS}\s+${MESSAGES_RECEIVED}\s+${MESSAGES_SENT}\s+${TABLE_VERSION}\s+${INPUT_QUEUE}\s+${OUTPUT_QUEUE}\s+${UP_DOWN}\s+${STATE_OR_PREFIXES_RECEIVED}\s*$$ -> Continue
22+
^VRF: -> Record
Lines changed: 88 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,106 @@
11
---
22
parsed_sample:
3-
- vrf: "DR"
3+
- bgp_neighbor: []
4+
input_queue: []
5+
local_as_number: "15005"
6+
messages_received: []
7+
messages_sent: []
8+
neighbor_as: []
9+
output_queue: []
410
rd: "10.1.1.1:5"
11+
spk: []
512
state: "Active"
13+
state_or_prefixes_received: []
14+
table_version: []
15+
up_down: []
16+
vrf: "DR"
17+
- bgp_neighbor:
18+
- "10.10.10.10"
19+
input_queue:
20+
- "0"
621
local_as_number: "15005"
7-
- vrf: "PROD"
22+
messages_received:
23+
- "83403"
24+
messages_sent:
25+
- "96226"
26+
neighbor_as:
27+
- "65370"
28+
output_queue:
29+
- "0"
830
rd: "10.1.1.1:3"
31+
spk:
32+
- "0"
933
state: "Active"
34+
state_or_prefixes_received:
35+
- "34543"
36+
table_version:
37+
- "31259922"
38+
up_down:
39+
- "6w2d"
40+
vrf: "PROD"
41+
- bgp_neighbor:
42+
- "172.16.16.10"
43+
input_queue:
44+
- "0"
1045
local_as_number: "15005"
11-
- vrf: "REPL"
46+
messages_received:
47+
- "63970"
48+
messages_sent:
49+
- "64069"
50+
neighbor_as:
51+
- "65320"
52+
output_queue:
53+
- "0"
1254
rd: "10.1.1.1:1"
55+
spk:
56+
- "0"
1357
state: "Active"
58+
state_or_prefixes_received:
59+
- "1"
60+
table_version:
61+
- "31259922"
62+
up_down:
63+
- "6w2d"
64+
vrf: "REPL"
65+
- bgp_neighbor: []
66+
input_queue: []
1467
local_as_number: "15005"
15-
- vrf: "EXTRANET"
68+
messages_received: []
69+
messages_sent: []
70+
neighbor_as: []
71+
output_queue: []
1672
rd: "10.1.1.1:7"
73+
spk: []
1774
state: "Active"
75+
state_or_prefixes_received: []
76+
table_version: []
77+
up_down: []
78+
vrf: "EXTRANET"
79+
- bgp_neighbor: []
80+
input_queue: []
1881
local_as_number: "15005"
19-
- vrf: "EXTRANET2"
82+
messages_received: []
83+
messages_sent: []
84+
neighbor_as: []
85+
output_queue: []
2086
rd: "10.1.1.1:8"
87+
spk: []
2188
state: "Active"
22-
local_as_number: "15005"
23-
- vrf: "vrf-test"
89+
state_or_prefixes_received: []
90+
table_version: []
91+
up_down: []
92+
vrf: "EXTRANET2"
93+
- bgp_neighbor: []
94+
input_queue: []
95+
local_as_number: "65000"
96+
messages_received: []
97+
messages_sent: []
98+
neighbor_as: []
99+
output_queue: []
24100
rd: "65000:42"
101+
spk: []
25102
state: "Active"
26-
local_as_number: "65000"
103+
state_or_prefixes_received: []
104+
table_version: []
105+
up_down: []
106+
vrf: "vrf-test"
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
Fri Aug 22 09:55:17.015 BRA
2+
3+
VRF: CBA:7777
4+
-------------
5+
BGP VRF CBA:7777, state: Active
6+
BGP Route Distinguisher: 1234:7777
7+
VRF ID: 0x60000002
8+
BGP router identifier 10.30.116.45, local AS number 1234
9+
Non-stop routing is enabled
10+
BGP table state: Active
11+
Table ID: 0xe0000011 RD version: 58607298
12+
BGP main routing table version 58620903
13+
BGP NSR Initial initsync version 140064 (Reached)
14+
BGP NSR/ISSU Sync-Group versions 58620903/0
15+
Dampening enabled
16+
17+
BGP is operating in STANDALONE mode.
18+
19+
20+
Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer
21+
Speaker 58620903 58620903 58620903 58620903 58620903 58620903
22+
23+
Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd
24+
10.29.246.174 0 64649 687457 625254 0 0 0 03:10:19 Active
25+
10.174.196.70 0 64649 803718 730825 58620903 0 0 27w0d 19
26+
27+
28+
VRF: NONE_IP:8888
29+
----------------
30+
BGP VRF NONE_IP:8888, state: Active
31+
BGP Route Distinguisher: 1234:8888
32+
VRF ID: 0x6000000b
33+
BGP router identifier 10.30.116.45, local AS number 1234
34+
Non-stop routing is enabled
35+
BGP table state: Active
36+
Table ID: 0xe000001a RD version: 58616315
37+
BGP main routing table version 58620903
38+
BGP NSR Initial initsync version 140064 (Reached)
39+
BGP NSR/ISSU Sync-Group versions 58620903/0
40+
Dampening enabled
41+
42+
BGP is operating in STANDALONE mode.
43+
44+
45+
Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer
46+
Speaker 58620903 58620903 58620903 58620903 58620903 58620903
47+
48+
49+
VRF: XMAS_TI:7415
50+
----------------
51+
BGP VRF XMAS_TI:7415, state: Active
52+
BGP Route Distinguisher: 1234:7415
53+
VRF ID: 0x6000000c
54+
BGP router identifier 10.30.116.45, local AS number 1234
55+
Non-stop routing is enabled
56+
BGP table state: Active
57+
Table ID: 0xe000001b RD version: 58620027
58+
BGP main routing table version 58620903
59+
BGP NSR Initial initsync version 140064 (Reached)
60+
BGP NSR/ISSU Sync-Group versions 58620903/0
61+
Dampening enabled
62+
63+
BGP is operating in STANDALONE mode.
64+
65+
66+
Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer
67+
Speaker 58620903 58620903 58620903 58620903 58620903 58620903
68+
69+
Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd
70+
10.231.26.18 0 65508 661485 627195 58620903 0 0 1w0d 2
71+
10.231.39.18 0 65508 534249 507686 58620903 0 0 1w1d 2
72+
10.231.39.38 0 65508 539350 512100 58620903 0 0 1w1d 2
73+
10.245.123.138 0 65508 803072 759852 58620903 0 0 9w5d 2
74+
10.246.15.182 0 65508 218552 204533 0 0 0 1y00w Active
75+
76+
77+
78+
VRF: JOY:7778
79+
-----------------
80+
BGP VRF JOY:7778, state: Active
81+
BGP Route Distinguisher: 1234:7778
82+
VRF ID: 0x6000000f
83+
BGP router identifier 10.30.116.45, local AS number 1234
84+
Non-stop routing is enabled
85+
BGP table state: Active
86+
Table ID: 0xe000001e RD version: 58620830
87+
BGP main routing table version 58620903
88+
BGP NSR Initial initsync version 140064 (Reached)
89+
BGP NSR/ISSU Sync-Group versions 58620903/0
90+
Dampening enabled
91+
92+
BGP is operating in STANDALONE mode.
93+
94+
95+
Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer
96+
Speaker 58620903 58620903 58620903 58620903 58620903 58620903
97+
98+
Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd
99+
10.254.64.230 0 28573 269417 243241 0 0 0 49w3d Idle
100+
101+
102+
VRF: FARM:153799
103+
-----------------
104+
BGP VRF FARM:153799, state: Active
105+
BGP Route Distinguisher: 1234:153799
106+
VRF ID: 0x60000010
107+
BGP router identifier 10.30.116.45, local AS number 1234
108+
Non-stop routing is enabled
109+
BGP table state: Active
110+
Table ID: 0xe000001f RD version: 58620903
111+
BGP main routing table version 58620903
112+
BGP NSR Initial initsync version 140064 (Reached)
113+
BGP NSR/ISSU Sync-Group versions 58620903/0
114+
Dampening enabled
115+
116+
BGP is operating in STANDALONE mode.
117+
118+
119+
Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer
120+
Speaker 58620903 58620903 58620903 58620903 58620903 58620903

0 commit comments

Comments
 (0)