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 mac addr-table: fix "Secure" entry and empty dest port #943

Closed
wants to merge 722 commits into from

Conversation

jacdavi
Copy link

@jacdavi jacdavi commented Jun 29, 2021

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_ios_show_mac-address-table, cisco_ios, show mac address-table

SUMMARY

I found a few cases that were breaking while trying things out for the first time on a handful of different switches.
In particular issues with static ports that had the "Secure" flag or no destination port set.

The changes address those two issues.
It may make sense to allow other values from the address-table legend (see raw output 9), but I haven't seen those so I left that as is.

Instead of adding a new test case, I appended to an existing one of the same format.
The new cases (along with all others) passed locally.

Input (truncated to specific entries):
   S     67 0000.0000.0004   static   No       -      Te1/5/11
 *      728 0000.0000.0003   static  Yes       -      
Before:

"State Error raised. Rule Line: 32. Input Line: S 67 0000.0000.0004 static No - Te1/5/11"

After):
...
	{
		"DESTINATION_ADDRESS": "0000.0000.0004",
		"DESTINATION_PORT": "Te1/5/11",
		"TYPE": "static",
		"VLAN": "67"
	},
	{
		"DESTINATION_ADDRESS": "0000.0000.0003",
		"DESTINATION_PORT": "",
		"TYPE": "static",
		"VLAN": "728"
	}
...

Still learning the ropes of both networking and TextFSM. Feel free to suggest changes.

daanvdsanden and others added 30 commits March 6, 2020 08:10
…ocode#625)

* Adds template for show vpn-sessiondb anyconnect

* Adds presumptive output of a second user output

Co-authored-by: Josh VanDeraa <josh.vanderaa@networktocode.com>
Changed Ciena platform name

Created templates for:
  * chassis show temperature
  * port show
  * rstp show
  * vlan show
mitchell-foxworth and others added 16 commits August 30, 2021 16:14
…tocode#990)

Co-authored-by: Alejandro Hernandez <alejandro.hernandez@toronto.ca>
…code#978)

* New template: cisco_nxos_show_ip_interface_vrf_all.textfsm

* Update index

* Update index
…#975)

New template: juniper_junos_show_system_uptime.textfsm
…rktocode#977)

As per
https://techhub.hpe.com/eginfolib/networking/docs/switches/5940/5200-1008b_fund_cr/content/491962772.htm
output of the `display clock` commands output contains date in `MM/DD/YYYY`
format. Can confirm this on different types of HPE switches I have at my disposal.

Added test cases that cover the scenarios when time zone and daylight time
saving configurations are set.
@FragmentedPacket
Copy link
Contributor

@jacdavi Do you mind resolving the conflicts? There have been a few updates to the template that are conflicting with your change now.

# Conflicts:
#	ntc_templates/templates/cisco_ios_show_mac-address-table.textfsm
#	tests/cisco_ios/show_mac-address-table/cisco_ios_show_mac-address-table9.yml
@jacdavi
Copy link
Author

jacdavi commented Sep 29, 2021

Ok should be good to go. #994 handled rows without a destination port by nature of switching to a list, so now this PR's only real change is to allow "Secure" (S) ports.

jmcgill298 added a commit that referenced this pull request Apr 12, 2024
This comes from @jacdavi where show mac address table was only matching
the "R" field, but the legend shows "S" and "D" are also options. This
replaces #943 which is out of sync with the default branch.
@jmcgill298
Copy link
Contributor

Thanks @jacdavi, unfortunately there was a change in the commit history, and so I have replaced this with #1688. It was hard to see what all you initially intended to change, but I have taken your examples and added to the test case and updated the template to parse those examples.

@jmcgill298 jmcgill298 closed this Apr 12, 2024
jmcgill298 added a commit that referenced this pull request Apr 12, 2024
This comes from @jacdavi where show mac address table was only matching
the "R" field, but the legend shows "S" and "D" are also options. This
replaces #943 which is out of sync with the default branch.
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.