New Template: (IOS) show_ip_bgp_neighbors_advertised_routes #674
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.
ISSUE TYPE
COMPONENT
cisco_ios_show_ip_bgp_neighbors_advertised_routes.textfsm
SUMMARY
Fixes #639
The command output is below for
show ip bgp neighbors x.x.x.x advertised-routes
It is the same as the output from
show ip bgp
, but couldn't figure out a way to make this work without breaking/modifying something else.Approach 1
We can only add templates to an existing command if they both have
KEY
values to tie the two templates together which isn't the use case for this issue.e.g.
cisco_ios_show_ip_bgp.textfsm:cisco_ios_show_ip_bgp_neighbors, .*, cisco_ios, sh[[ow]] i[[p]] bgp nei[[ghbors]]
Approach 2
Use the same template as
cisco_ios_show_ip_bgp.textfsm
, but create a new line above the existing one for this command and add trailing information for the command.e.g.
cisco_ios_show_ip_bgp.textfsm, .*, cisco_ios, sh[[ow]] i[[p]] bgp nei[[ghbors]] adv[[ertised-routes]]
This required adding a
$
to the end of thecisco_ios_show_ip_bgp_neighbors
line in the index and that would have definitely broken that template when someone specifies the IP address of a neighbor.Approach 3 - Used in this PR
Copy the
cisco_ios_show_ip_bgp.textfsm
into a new template (cisco_ios_show_ip_bgp_neighbors_advertised_routes.textfsm
). This is the route I went since I couldn't find a great way to re-useshow ip bgp
template without breaking existing behavior.