Fix Issue#587
Description
Updated REGEX for the parser for "show ip bgp neighbors
Motivation and Context
As reported in Issue#587, when running "show ip bgp neighbors
Checklist:
- [x] I have updated the changelog.
- [ ] I have updated the documentation (If applicable).
- [ ] I have added tests to cover my changes (If applicable).
- [ ] All new and existing tests passed.
- [ ] All new code passed compilation.
I ran the folder tests for:
python folder_parsing_job.py -o iosxe -c ShowBgpNeighborsReceivedRoutes
I included a 4th test with actual output from the Production router i was testing on, with the expected output, and the test passed. I can't include that actual output here for security reasons (let me know if you need to see it, and we'll come up with a way for me to show you the golden_output4 files that doesn't involve me uploading them to the internet), but the tests all passed, with the modified REGEX expression correctly grabbing the 6 routes that were missed prior to the regex update:
2021-12-13T10:25:19: %GENIE-INFO: +------------------------------------------------------------------------------+
2021-12-13T10:25:19: %GENIE-INFO: | Unittest results |
2021-12-13T10:25:19: %GENIE-INFO: +------------------------------------------------------------------------------+
2021-12-13T10:25:19: %GENIE-INFO: SECTIONS/TESTCASES RESULT
2021-12-13T10:25:19: %GENIE-INFO: --------------------------------------------------------------------------------
2021-12-13T10:25:19: %GENIE-INFO: .
2021-12-13T10:25:19: %GENIE-INFO: |-- SuperFileBasedTesting PASSED
2021-12-13T10:25:19: %GENIE-INFO: | -- setup PASSED 2021-12-13T10:25:19: %GENIE-INFO: -- iosxe PASSED
2021-12-13T10:25:19: %GENIE-INFO: |-- setup PASSED
2021-12-13T10:25:19: %GENIE-INFO: |-- ShowBgpNeighborsReceivedRoutes PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1: iosxe -> ShowBgpNeighborsReceivedRoutes PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.1: Test Golden -> iosxe -> ShowBgpNeighborsRecei... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.1.1: Gold -> iosxe -> ShowBgpNeighborsReceivedRo... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.1.2: Gold -> iosxe -> ShowBgpNeighborsReceivedRo... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.1.3: Gold -> iosxe -> ShowBgpNeighborsReceivedRo... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.1.4: Gold -> iosxe -> ShowBgpNeighborsReceivedRo... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | |-- Step 1.2: Test Empty -> iosxe -> ShowBgpNeighborsReceiv... PASSED
2021-12-13T10:25:19: %GENIE-INFO: | -- Step 1.2.1: Empty -> iosxe -> ShowBgpNeighborsReceivedR... PASSED 2021-12-13T10:25:19: %GENIE-INFO: -- cleanup PASSED
2021-12-13T10:25:19: %GENIE-INFO: +------------------------------------------------------------------------------+
2021-12-13T10:25:19: %GENIE-INFO: | Summary |
2021-12-13T10:25:19: %GENIE-INFO: +------------------------------------------------------------------------------+
2021-12-13T10:25:19: %GENIE-INFO: Number of ABORTED 0
2021-12-13T10:25:19: %GENIE-INFO: Number of BLOCKED 0
2021-12-13T10:25:19: %GENIE-INFO: Number of ERRORED 0
2021-12-13T10:25:19: %GENIE-INFO: Number of FAILED 0
2021-12-13T10:25:19: %GENIE-INFO: Number of PASSED 2
2021-12-13T10:25:19: %GENIE-INFO: Number of PASSX 0
2021-12-13T10:25:19: %GENIE-INFO: Number of SKIPPED 0
2021-12-13T10:25:19: %GENIE-INFO: Total Number 2
2021-12-13T10:25:19: %GENIE-INFO: Success Rate 100.0%
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.