-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fix Issue#587 #588
base: main
Are you sure you want to change the base?
Fix Issue#587 #588
Conversation
Updated REGEX in p3_2 inside ShowBgpNeighborsReceivedRoutesSuperParser() (iosxe) To resolve the issue described in Issue#587
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for contributing a fix for the issue you encountered.
Do you have some device output that you can add as a test? All tests are currently passing, so I know your fix hasn't broken anything. It would be more about ensuring that all future changes to this parser will still work with the output you've been seeing issues with.
Docs for writing tests can be found here
https://pubhub.devnetcloud.com/media/pyats-development-guide/docs/writeparser/writeparser.html#folder-based-testing-asa-ios-and-iosxe
I ran the folder tests for: 2021-12-13T10:25:19: %GENIE-INFO: +------------------------------------------------------------------------------+ |
Hi @scottwdavis, we need at least one unit test that supports this change so we can cover all known scenarios. Can you please add a unit test to your pull request? |
Hi @scottwdavis as previously said we need to see a test can can cover the changes made to the regex to ensure any future changes don't break it. Since the device's actual output is sensitive information feel free to obfuscate the information however you see fit, so long as it is representative in some way of the actual output that required the change. |
Description
Updated REGEX for the parser for "show ip bgp neighbors received-routes" to make the CIDR notation after the prefix optional, as when it's not optional, some routes don't get parsed if they don't have the /CIDR notation.
Motivation and Context
As reported in Issue#587, when running "show ip bgp neighbors received-routes" on a device, if run it manually, in one example i saw 91 prefixes. When using pyATS parser for this command, i only saw 85 prefixes. 6 of the prefixes received were just the subnet address, with no /CIDR notation, and these 6 routes did not get parsed. With this REGEX update, the parser will capture these routes as well.
Checklist: