Skip to content

Commit

Permalink
Fix: update EVI regex and test output in show_l2vpn_bridge_domain_det…
Browse files Browse the repository at this point in the history
…ail parser

- Modified `p63` regex in `show_l2vpn.py` to support optional suffix (e.g., "(SRv6)") for EVI values
- Updated `golden9_expected.py` to reflect new test output for EVI field
- Adjusted URL in `github_parser.json` for the updated line reference

These changes enhance the parser's compatibility with new formats in `ShowL2vpnBridgeDomainDetail`.
  • Loading branch information
Kani999 committed Dec 2, 2024
1 parent aaf4022 commit 9aa193c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--------------------------------------------------------------------------------
Fix
--------------------------------------------------------------------------------
* IOSXR
* Modified ShowL2vpnBridgeDomainDetail:
* Modified regex <p63> in to support optional suffix (e.g., "(SRv6)") for EVI values
2 changes: 1 addition & 1 deletion sdk_generator/outputs/github_parser.json
Original file line number Diff line number Diff line change
Expand Up @@ -52176,7 +52176,7 @@
"os": "iosxr"
},
"uid": "show_l2vpn_forwarding_xconnect_xconnect_name_detail_location_location_name",
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxr/show_l2vpn.py#L2754"
"url": "https://github.com/CiscoTestAutomation/genieparser/tree/master/src/genie/libs/parser/iosxr/show_l2vpn.py#L2755"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/genie/libs/parser/iosxr/show_l2vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,8 @@ def cli(self, output=None):
p62 = re.compile(r'^(?P<evpn>\S+), +state: +(?P<state>\S+)$')

# evi: 1000
p63 = re.compile(r'^evi: +(?P<evi>\d+)$')
# evi: 1000 (SRv6)
p63 = re.compile(r'^evi: +(?P<evi>\d+)(?:\s*\(.*\))?$')

# XC ID 0x80000009
p64 = re.compile(r'^XC +ID (?P<xc_id>\S+)$')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
'evpn': {
'EVPN': {
'state': 'up',
'evi': '1002',
'xc_id': '0x80000003',
'statistics': {
'packet_totals': {
Expand Down

0 comments on commit 9aa193c

Please sign in to comment.