-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS-XR Static route parser contains a bug on routes with multiple next hops #738
Comments
Hi , I am looking at your ticket and reviewing it, Please let me know are you facing the issue still or not ? |
1 similar comment
Hi , I am looking at your ticket and reviewing it, Please let me know are you facing the issue still or not ? |
hi @iamsatyanarayan, This is still an issue as it seems to be problem in the library with the parsing of the output with regex. The reason is that the CLI outputs multiple exit interfaces under the same route and your regex code doesn't handle the lack of route prefix there. Thanks |
Hi naveci, |
Hi @iamsatyanarayan, I was referring to this file: Somewhere in that regex is the problem that misinterprets the outgoing interfaces if there are multiple configured for the same prefix. I've updated to Pyats 23.3 in the meanwhile, but that hasn't fixed it. |
Hi naveci, |
Hi, Yes, I did trim the output a bit to not share unnecessary output. Here's the output with the headers included.
|
Hi naveci, p2 = re.compile(r'^(?P([\s]+)?|([a-fA-F\d/.:]+)?) ' Could you please try with the above pattern and let me know. i hope it will work for you. |
Hi naveci, |
1 similar comment
Hi naveci, |
It already breaks on the first line:
My code editor colors the top three lines differently from the bottom three. This has to do with the |
Hi naveci, |
Hi all,
I just found a bug when trying to test for some different situations and it seems to come from the regex interpretation in
src/genie/libs/parser/iosxr/show_static_routing.py
In short, it cannot handle routes that have multiple next hop interfaces. Example router CLI output from
show static vrf all topology detail
The results are as follows (pyats returned JSON dict at the bottom):
B
and the Next-hop interface is in the dict set toUndle-Ether5.506
Config to replicate:
Version:
Pyats returned dict:
The text was updated successfully, but these errors were encountered: