Fix for BGP description not found by get_bgp_neighbors in some EOS versions #1356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not all versions of EOS include descriptions in the output of
show ip bgp neighbors vrf all
, which is whereget_bgp_neighbors
is currently looking for it. This patch adds some logic to pull the value out of theshow ip bgp summary vrf all
output, but retains the original method as well to avoid regressions. The original code is basically screen scraping instead of relying on JSON output; I'm not sure why that is, but I didn't want to change it in case some older versions of EOS rely on that method.This patch was definitely needed to get my 4.22.xF switches working, but oddly it wasn't needed for my 4.23.0M vEOS test box. I have test cases, I'll attach those as soon as I open the pull request so I can get an issue number to keep the test case directory naming conventions intact.