Skip to content
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

cisco_ios_show_ip_bgp: Fix whitespace change in command output #340

Merged
merged 2 commits into from
Jan 20, 2019
Merged

cisco_ios_show_ip_bgp: Fix whitespace change in command output #340

merged 2 commits into from
Jan 20, 2019

Conversation

paneu
Copy link
Contributor

@paneu paneu commented Jan 20, 2019

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_ios_show_ip_bgp.template, Cisco IOS XE, show ip bgp

SUMMARY

On some version of IOS XE (in my tests, I used 16.6.4), there is an additional space after the route status codes. Adapt the template to to address this. Also add tests for such a version.

Before

$ textfsm.py ntc-templates/templates/cisco_ios_show_ip_bgp.template cisco_ios_show_ip_bgp5.raw
...
FSM Table:
['STATUS', 'PATH_SELECTION', 'ROUTE_SOURCE', 'NETWORK', 'NEXT_HOP', 'METRIC', 'LOCAL_PREF', 'WEIGHT', 'AS_PATH', 'ORIGIN']
$

After

$ textfsm.py ntc-templates/templates/cisco_ios_show_ip_bgp.template cisco_ios_show_ip_bgp5.raw
...
FSM Table:
['STATUS', 'PATH_SELECTION', 'ROUTE_SOURCE', 'NETWORK', 'NEXT_HOP', 'METRIC', 'LOCAL_PREF', 'WEIGHT', 'AS_PATH', 'ORIGIN']
['*', '>', ' ', '10.1.0.0/16', '0.0.0.0', '0', '', '32768', '', 'i']
['*', '>', ' ', '10.2.0.0/16', '0.0.0.0', '0', '', '32768', '', 'i']
['*', '>', ' ', '10.3.0.0/16', '0.0.0.0', '0', '', '32768', '', 'i']
['*', '>', ' ', '10.4.0.0/16', '0.0.0.0', '0', '', '32768', '', 'i']
['*', '>', 'i', '10.11.0.0/16', '10.0.0.1', '0', '100', '0', '', 'i']
['*', '>', 'i', '10.12.0.0/16', '10.0.0.1', '0', '100', '0', '', 'i']
['*', '>', 'i', '10.13.0.0/16', '10.0.0.1', '0', '100', '0', '', 'i']
['*', '>', 'i', '10.14.0.0/16', '10.0.0.1', '0', '100', '0', '', 'i']
$

paneu added 2 commits January 20, 2019 17:37
show ip bgp might return an additional space before the prefix in the
table. This is seen on IOS-XE 16.6.4 for example.
@jmcgill298 jmcgill298 merged commit 66eb002 into networktocode:master Jan 20, 2019
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
OS Version 16.6.4 has an additional space after the route status codes. This fix allows for additional space character.

New test files were added with the additional output format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants