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

Merged
merged 7 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Value VLAN_ID (\S+)
Value PRIORITY (\d+)
Value ROOT_ID ([0-9a-fA-F]{4}\.[0-9a-fA-F]{4}\.[0-9a-fA-F]{4})
Value ROOT_COST (\d+)
Value HELLO_TIME (\d+)
Value MAX_AGE (\d+)
Value FWD_DLY (\d+)
Value ROOT_PORT (\S+)

Start
^Vlan\s+Root\s+ID\s+Cost\s+Time\s+Age\s+Dly\s+Root\s+Port\s*$$ -> STP
# Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is

STP
^${VLAN_ID}\s+${PRIORITY}\s+${ROOT_ID}\s+${ROOT_COST}\s+${HELLO_TIME}\s+${MAX_AGE}\s+${FWD_DLY}(\s+${ROOT_PORT})?\s*$$ -> Record
^-+
^\s*$$
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ cisco_ios_show_mpls_l2transport_vc.textfsm, .*, cisco_ios, sh[[ow]] m[[pls]] l2[
cisco_ios_show_ip_eigrp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] ip ei[[grp]] nei[[ghbors]]
cisco_ios_show_ip_flow_toptalkers.textfsm, .*, cisco_ios, sh[[ow]] ip fl[[ow]] top[[-talkers]]
cisco_ios_show_ip_interface_brief.textfsm, .*, cisco_ios, sh[[ow]] ip int[[erface]] br[[ief]]
cisco_ios_show_spanning-tree_root.textfsm, .*, cisco_ios, sh[[ow]] sp[[anning-tree]] ro[[ot]]
cisco_ios_show_interfaces_status.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]](?: (?:\S+))? st[[atus]]
cisco_ios_show_ip_eigrp_topology.textfsm, .*, cisco_ios, sh[[ow]] ip eigrp top[[ology]]
cisco_ios_show_ip_source_binding.textfsm, .*, cisco_ios, sh[[ow]] ip sou[[rce]] b[[inding]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Root Hello Max Fwd
Vlan Root ID Cost Time Age Dly Root Port
---------------- -------------------- --------- ----- --- --- ------------
VLAN0001 11175 5c6e.f0a7.a0b0 0 2 20 15
VLAN0002 11185 5c6e.f0a7.a0b0 0 2 20 15
VLAN0003 11195 5c6e.f0a7.a0b0 0 2 20 15 Po34
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
parsed_sample:
- fwd_dly: "15"
hello_time: "2"
max_age: "20"
priority: "11175"
root_cost: "0"
root_id: "5c6e.f0a7.a0b0"
root_port: ""
vlan_id: "VLAN0001"
- fwd_dly: "15"
hello_time: "2"
max_age: "20"
priority: "11185"
root_cost: "0"
root_id: "5c6e.f0a7.a0b0"
root_port: ""
vlan_id: "VLAN0002"
- fwd_dly: "15"
hello_time: "2"
max_age: "20"
priority: "11195"
root_cost: "0"
root_id: "5c6e.f0a7.a0b0"
root_port: "Po34"
vlan_id: "VLAN0003"