Open AlexLardschneider opened 2 years ago
Hello Alex, Thanks for opening this issue. This issue has been resolved and will be available in the 22.6 release.
Appreciate it!
FYI - this regression has been re-introduced somewhere between IOS-XR 7.4.1 and 7.7.21 (I noticed it after upgrading one of our routers from 7.4.1 to 7.7.21, I don't have any other intermediate loads readily available to test). In 7.7.21, this fails:
>>> with open('test.txt', 'r') as file:
... print(dev.parse('show l2vpn xconnect', output=file.read()))
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "src/genie/conf/base/device.py", line 531, in genie.conf.base.device.Device.parse
File "src/genie/conf/base/device.py", line 581, in genie.conf.base.device.Device._get_parser_output
File "src/genie/metaparser/_metaparser.py", line 308, in genie.metaparser._metaparser.MetaParser.parse
File "/home/kfn.local/zpuls/pyats-tests/.venv/lib/python3.10/site-packages/genie/libs/parser/iosxr/show_xconnect.py", line 1339, in cli
name_dict['status'] = str(group['status_group'])
UnboundLocalError: local variable 'name_dict' referenced before assignment
test.txt:
RP/0/RP0/CPU0:UDLLNCS61#show l2vpn xconnect
Thu Nov 2 00:43:19.928 CDT
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed,
LU = Local Up, RU = Remote Up, CO = Connected, (SI) = Seamless Inactive
XConnect Segment 1 Segment 2
Group Name ST Description ST Description ST
------------------------ ----------------------------- -----------------------------
[omitted]
[omitted]
UP Gi0/0/0/1.1982 UP 10.9.1.186 1051982
UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/1.2982 UP 10.9.1.186 1052982
UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/2.20 UP 10.9.1.189 1100020
UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/2.2020 UP 10.9.1.189 1102020
UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/0.1 UP 10.9.1.21 2210001
UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/1.2712 UP 10.9.1.26 252712 UP
----------------------------------------------------------------------------------------
[omitted]
[omitted]
UP Gi0/0/0/2.3269 UP 10.9.1.26 253269 UP
----------------------------------------------------------------------------------------
Just wanted to bump this and say it is still broken with the same outputs as the Original case running 7.7.21
Parsing of the output of "show l2vpn xconnect" on IOS XR 7.2.2 fails with the following error using PyATS & Genie 22.4:
It looks like the issue is the changing header format between IOS XR 7.1.2 (where parsing works as expected) and IOS XR 7.2.2. Unfortunately, I have no device running XR > 7.2.2 to confirm that newer versions experience the same issue.
Following sample code reproduces this issue: