Skip to content

Commit 55bba54

Browse files
committed
Add example: ShowBgpVrf regex handles IPv6 addresses and newlines in output now
1 parent c4c26cf commit 55bba54

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/genie/libs/parser/iosxr/show_bgp.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8696,6 +8696,13 @@ def cli(self, vrf=None, address_family=None, summary=None, value=None, output=No
86968696
# *>i10.169.1.0/24 10.64.4.4 2219 100 0 300 33299 51178 47751 {27016} e
86978697
# *>i192.168.111.0/24 10.189.99.98 0 0 i
86988698
# *> 10.7.7.7/32 10.10.10.107 0 0 65107.65107 ?
8699+
# OR
8700+
# s>i2001:718::2:99/128 195.113.156.4 0 100 0 i
8701+
# s i 195.113.156.4 0 100 0 i
8702+
# s>i2001:718::2:101/128
8703+
# 10.2.8.1 0 100 0 i
8704+
# s i 10.2.8.1 0 100 0 i
8705+
# s>i2001:718::2:116/128
86998706
p13 = re.compile(r'^(?P<status_codes>(i|s|x|S|d|h|\*|\>|\s)+)'
87008707
r' *(?P<prefix>(?P<ip>[0-9a-f\.\:\[\]]+)\/(?P<mask>\d+))?[\n\r]*'
87018708
r' +(?P<next_hop>\S+)[\n\r]* +(?P<number>[\d\.\s\{\}]+)'
@@ -9200,6 +9207,13 @@ def cli(self, address_family=None, community=None, exact_match=None, output=None
92009207
# *>i10.169.1.0/24 10.64.4.4 2219 100 0 300 33299 51178 47751 {27016} e
92019208
# *>i192.168.111.0/24 10.189.99.98 0 0 i
92029209
# *> 10.7.7.7/32 10.10.10.107 0 0 65107.65107 ?
9210+
# OR
9211+
# s>i2001:718::2:99/128 195.113.156.4 0 100 0 i
9212+
# s i 195.113.156.4 0 100 0 i
9213+
# s>i2001:718::2:101/128
9214+
# 10.2.8.1 0 100 0 i
9215+
# s i 10.2.8.1 0 100 0 i
9216+
# s>i2001:718::2:116/128
92039217
p11 = re.compile(r'^(?P<status_codes>(i|s|x|S|d|h|\*|\>|\s)+)'
92049218
r' *(?P<prefix>(?P<ip>[0-9a-f\.\:\[\]]+)\/(?P<mask>\d+))?[\n\r]*'
92059219
r' +(?P<next_hop>\S+)[\n\r]* +(?P<number>[\d\.\s\{\}]+)'

0 commit comments

Comments
 (0)