Skip to content

Commit

Permalink
Update regular expressions for iosxr ShowBgpVrf
Browse files Browse the repository at this point in the history
- include IPv6 addresses
- handle newline characters
  • Loading branch information
Kani999 committed Apr 4, 2024
1 parent f64226b commit c70ae10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/genie/libs/parser/iosxr/show_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8697,8 +8697,8 @@ def cli(self, vrf=None, address_family=None, summary=None, value=None, output=No
# *>i192.168.111.0/24 10.189.99.98 0 0 i
# *> 10.7.7.7/32 10.10.10.107 0 0 65107.65107 ?
p13 = re.compile(r'^(?P<status_codes>(i|s|x|S|d|h|\*|\>|\s)+)'
r' *(?P<prefix>(?P<ip>[0-9\.\:\[\]]+)\/(?P<mask>\d+))?'
r' +(?P<next_hop>\S+) +(?P<number>[\d\.\s\{\}]+)'
r' *(?P<prefix>(?P<ip>[0-9a-f\.\:\[\]]+)\/(?P<mask>\d+))?[\n\r]*'
r' +(?P<next_hop>\S+)[\n\r]* +(?P<number>[\d\.\s\{\}]+)'
r'(?: *(?P<origin_codes>(i|e|\?)))?$')

# Processed 40 prefixes, 50 paths
Expand Down

0 comments on commit c70ae10

Please sign in to comment.