Skip to content

Add cisco ios show spanning-tree root #2077

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

osmantitu
Copy link

Template for parsing output of show spanning-tree root cmd of Cisco ios devices.

@mjbear
Copy link
Collaborator

mjbear commented Mar 12, 2025

Hello @osmantitu

We also need test data included in this PR.

As long as you put the raw data in the correct spot, you can use helper scripts to generate the structured data (yaml).

The test data is necessary so that we can make sure the template is backwards compatible in the future when more changes are needed.

🎯 Please respond back if there are any questions. Thank you!

@mjbear mjbear added the status: action required This issue requires additional information to be actionable label Mar 12, 2025
@osmantitu
Copy link
Author

Hello @mjbear,
provided the raw data and parsed text in yaml format for testing.

Thank you

@mjbear
Copy link
Collaborator

mjbear commented Mar 18, 2025

Bringing this discussion out to the main part of the thread...

should this be 2 separate values? like ROOT_ID_INT and ROOT_ID_MAC?

Also a worthwhile point.

Maybe instead of ROOT_ID go with PRIORITY (the STP priority) and MAC_ADDRESS?

@osmantitu
What are your thoughts on splitting up the Root ID into two distinct values?

@itdependsnetworks
cisco_nxos has a similar template and this one is split up with numeric PRIORITY and ROOT_ID as the MAC address.
I suppose this is a reasonable path forward? 😀

Update:
It just so happens right now the ntc-templates doesn't have a cisco_ios STP root template. That's fine and all. The closest thing is show spanning-tree for cisco_ios, which captures priorities, but not root bridge MAC addresses (another one of those "so be it" situations).

@osmantitu
Copy link
Author

@mjbear
It's a good idea to split ROOT_ID into PRIORITY and MAC_ADDRESS.

@mjbear mjbear changed the title Template: spanning-tree root for cisco ios Add cisco ios show spanning-tree root Mar 21, 2025
@mjbear
Copy link
Collaborator

mjbear commented Mar 22, 2025

@mjbear It's a good idea to split ROOT_ID into PRIORITY and MAC_ADDRESS.

So far I've split out the priority and root bridge/switch's MAC address, but that last capture group is still named ROOT_ID. This matches was is used in the cisco_nxos template for example.

Providing time for feedback from others before merging. Thank you!

@mjbear mjbear added question and removed status: action required This issue requires additional information to be actionable labels Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants