From 9aa193c76943bea9b361c1edf7a0a47d71b8ebc5 Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Tue, 29 Oct 2024 10:47:54 +0100 Subject: [PATCH] Fix: update EVI regex and test output in show_l2vpn_bridge_domain_detail 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`. --- ...show_l2vpn_bridge_domain_detail_iosxr_20241029105539.rst | 6 ++++++ sdk_generator/outputs/github_parser.json | 2 +- src/genie/libs/parser/iosxr/show_l2vpn.py | 3 ++- .../cli/equal/golden9_expected.py | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelog/undistributed/changelog_show_l2vpn_bridge_domain_detail_iosxr_20241029105539.rst diff --git a/changelog/undistributed/changelog_show_l2vpn_bridge_domain_detail_iosxr_20241029105539.rst b/changelog/undistributed/changelog_show_l2vpn_bridge_domain_detail_iosxr_20241029105539.rst new file mode 100644 index 0000000000..2066f0aa97 --- /dev/null +++ b/changelog/undistributed/changelog_show_l2vpn_bridge_domain_detail_iosxr_20241029105539.rst @@ -0,0 +1,6 @@ +-------------------------------------------------------------------------------- + Fix +-------------------------------------------------------------------------------- +* IOSXR + * Modified ShowL2vpnBridgeDomainDetail: + * Modified regex in to support optional suffix (e.g., "(SRv6)") for EVI values \ No newline at end of file diff --git a/sdk_generator/outputs/github_parser.json b/sdk_generator/outputs/github_parser.json index b3d31f490e..f0bc8a6b95 100644 --- a/sdk_generator/outputs/github_parser.json +++ b/sdk_generator/outputs/github_parser.json @@ -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" } } }, diff --git a/src/genie/libs/parser/iosxr/show_l2vpn.py b/src/genie/libs/parser/iosxr/show_l2vpn.py index 2329c51c6e..9ab35944dd 100644 --- a/src/genie/libs/parser/iosxr/show_l2vpn.py +++ b/src/genie/libs/parser/iosxr/show_l2vpn.py @@ -1585,7 +1585,8 @@ def cli(self, output=None): p62 = re.compile(r'^(?P\S+), +state: +(?P\S+)$') # evi: 1000 - p63 = re.compile(r'^evi: +(?P\d+)$') + # evi: 1000 (SRv6) + p63 = re.compile(r'^evi: +(?P\d+)(?:\s*\(.*\))?$') # XC ID 0x80000009 p64 = re.compile(r'^XC +ID (?P\S+)$') diff --git a/src/genie/libs/parser/iosxr/tests/ShowL2vpnBridgeDomainDetail/cli/equal/golden9_expected.py b/src/genie/libs/parser/iosxr/tests/ShowL2vpnBridgeDomainDetail/cli/equal/golden9_expected.py index 5dfc469cbf..936ac24fe6 100644 --- a/src/genie/libs/parser/iosxr/tests/ShowL2vpnBridgeDomainDetail/cli/equal/golden9_expected.py +++ b/src/genie/libs/parser/iosxr/tests/ShowL2vpnBridgeDomainDetail/cli/equal/golden9_expected.py @@ -98,6 +98,7 @@ 'evpn': { 'EVPN': { 'state': 'up', + 'evi': '1002', 'xc_id': '0x80000003', 'statistics': { 'packet_totals': {