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

New Template for Cisco IOS: show ip cef [detail] #695

Merged
merged 17 commits into from
May 22, 2020

Conversation

Yakuza-UA
Copy link
Contributor

@Yakuza-UA Yakuza-UA commented May 10, 2020

ISSUE TYPE
  • New Template Pull Request
COMPONENT

cisco_ios_show_ip_cef.textfsm
cisco_ios_show_ip_cef_detail.textfsm

Cisco IOS: show ip cef [vrf NAME]
Cisco IOS: show ip cef [vrf NAME] [PREFIX | INTERFACE] detail

SUMMARY

There are two templates, one understands brief list of CEF entries and can only parse show ip cef, or show ip cef vrf NAME

Other template can parse show ip cef detail, show ip cef vrf NAME detail, or show ip cef INTERFACE detail, etc as long as keyword detail is present. Otherwise there will be no match in index file.

I have tested this template in live environment and executed it in on 500 devices, including Catalyst 3750, 3850, 9300 and 9500, ISR 2800, 2900, 3800, 3900, 4300, 4400, as well as VG204, VG224, etc

@Yakuza-UA Yakuza-UA closed this May 10, 2020
@Yakuza-UA Yakuza-UA reopened this May 10, 2020
@Yakuza-UA
Copy link
Contributor Author

Please do not merge yet. I have found one issue. Will let you know once I've committed all changes. Regards

@Yakuza-UA
Copy link
Contributor Author

Ok. Good to merge now. I've re-run all tests on ~500 devices.
It now supports ECMP, and it's good I've spotted it

@Yakuza-UA Yakuza-UA changed the title Cisco ios show ip cef New Template for Cisco IOS: show ip cef [detail] May 18, 2020
@itdependsnetworks
Copy link
Contributor

itdependsnetworks commented May 20, 2020

I added a PR into your fork/branch. We do not generally treat multiple outputs as a single command. There is a fine line in when this applies, but a good rule of thumb would be if the output is modified by additional parameters, then a new template is required. If the output is filtered, we generally can reuse the same template.

PR into Yakuza branch: Yakuza-UA#1

- Added few more comments
- Adjusted INDEX file to make sure templates are only used when applicable
- Templates are no longer compatible with 'show ip cef 1.1.1.1', or
	'show ip cef Vlan100'. Usage of 'detail' keyword is mandatory, such as
	'show ip cef 1.1.1.1 detail'
templates/cisco_ios_show_ip_cef.textfsm Outdated Show resolved Hide resolved
templates/cisco_ios_show_ip_cef.textfsm Show resolved Hide resolved
templates/cisco_ios_show_ip_cef_detail.textfsm Outdated Show resolved Hide resolved
@FragmentedPacket FragmentedPacket added the changes_requested Waiting on user to address feedback label May 21, 2020
This template produces output similar to cisco_ios_show_ip_cef.textfsm

Additional flags are no longer supported (not parsed)
Type is no longer supported, this is captured as nexthop
Nexthop's value is literally identical to what you get from
show ip cef (brief list)

Template still mandates the use of 'detail' keyword
(due to index file restrictions)
@Yakuza-UA
Copy link
Contributor Author

Ok. I had to review my template from scratch to make sure it complies with all requirements
As result, I have simplified it and no longer capture any extra details, such as flags (recursive, connected, default route, etc). However, data structure is IDENTICAL to another template (show ip cef), even nexthop values are similar

@FragmentedPacket FragmentedPacket merged commit 852b16b into networktocode:master May 22, 2020
@Yakuza-UA Yakuza-UA deleted the cisco_ios_show_ip_cef branch August 12, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants