Skip to content

Commit 35b95db

Browse files
michalis1michalis1mjbear
authored
Add cisco_ios sh sw for stackwise virtual/vss (#2187)
* cisco_ios_virtual_switch_commands * cisco_ios_virtual_switch_commands * Update ntc_templates/templates/cisco_ios_show_switch_virtual.textfsm Co-authored-by: Michael Bear <[email protected]> --------- Co-authored-by: michalis1 <[email protected]> Co-authored-by: Michael Bear <[email protected]>
1 parent a823547 commit 35b95db

File tree

6 files changed

+81
-1
lines changed

6 files changed

+81
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Value MODE (\S+(?:\s+\S+)*)
2+
Value DOMAIN (\d+)
3+
Value Key SWITCH (\d+)
4+
Value ROLE (Active|Standby)
5+
Value PEER_SWITCH (\d+)
6+
Value PEER_ROLE (Active|Standby)
7+
8+
Start
9+
^\s*Executing\s+the\s+command\s+on\s+VSS\s+member\s+switch\s+role\s*=\s*VSS\s+(?:Active|Standby),\s*id\s*=\s*\d+\s*$$
10+
^\s*Switch\s+mode\s*:\s+${MODE}\s*$$
11+
^\s*Virtual\s+switch\s+domain\s+number\s*:\s+${DOMAIN}\s*$$
12+
^\s*Local\s+switch\s+number\s*:\s+${SWITCH}\s*$$
13+
^\s*Local\s+switch\s+operational\s+role\s*:\s+Virtual\s+Switch\s+${ROLE}\s*$$
14+
^\s*Peer\s+switch\s+number\s*:\s+${PEER_SWITCH}\s*$$
15+
^\s*Peer\s+switch\s+operational\s+role\s*:\s+Virtual\s+Switch\s+${PEER_ROLE}\s*$$ -> Record
16+
^\s*$$
17+
^. -> Error

ntc_templates/templates/index

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ cisco_ftd_show_vpn-sessiondb_anyconnect.textfsm, .*, cisco_ftd, sh[[ow]] vpn-[[s
251251
cisco_fxos_show_system_firmware.textfsm, .*, cisco_fxos, sh[[ow]] sy[[stem]] fi[[rmware]]
252252

253253
cisco_ios_show_module.textfsm:cisco_ios_show_module_status.textfsm:cisco_ios_show_module_submodule.textfsm:cisco_ios_show_module_online_diag.textfsm, .*, cisco_ios, sh[[ow]] mod[[ule]]
254-
cisco_ios_show_switch_detail.textfsm:cisco_ios_show_switch_detail_stack_ports.textfsm, .*, cisco_ios, sh[[ow]] sw[[itch]] d[[etail]]
254+
cisco_ios_show_switch_detail.textfsm:cisco_ios_show_switch_detail_stack_ports.textfsm, .*, cisco_ios, sh[[ow]] sw[[itch]]( d[[etail]])?\s*$
255255
cisco_ios_show_authentication_sessions_method_details.textfsm, .*, cisco_ios, show authen[[tication]] ses[[sions]] met[[hod]](\s+d[[ot1x]]|\s+m[[ab]])? det[[ails]]
256256
cisco_ios_show_running-config_partition_access-list.textfsm, .*, cisco_ios, sh[[ow]] ru[[nning-config]] p[[artition]] a[[ccess-list]]
257257
cisco_ios_show_ip_bgp_neighbors_advertised-routes.textfsm, .*, cisco_ios, sh[[ow]] ip bgp nei[[ghbors]](\s+\d+\.\d+\.\d+\.\d+)? adv[[ertised-routes]]
@@ -317,6 +317,7 @@ cisco_ios_show_license_status.textfsm, .*, cisco_ios, sh[[ow]] lic[[ense]] st[[a
317317
cisco_ios_show_lldp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]]
318318
cisco_ios_show_power_supplies.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] su[[pplies]]
319319
cisco_ios_show_snmp_community.textfsm, .*, cisco_ios, sh[[ow]] sn[[mp]] com[[munity]]
320+
cisco_ios_show_switch_virtual.textfsm, .*, cisco_ios, sh[[ow]] sw[[itch]] vi[[rtual]]
320321
cisco_ios_show_cdp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]]
321322
cisco_ios_show_controller_t1.textfsm, .*, cisco_ios, sh[[ow]] cont[[rollers]] t1
322323
cisco_ios_show_hosts_summary.textfsm, .*, cisco_ios, sh[[ow]] ho[[sts]] summary
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Switch/Stack Mac Address : 04bd.9715.5140 - Local Mac Address
2+
Mac persistency wait time: Indefinite
3+
H/W Current
4+
Switch# Role Mac Address Priority Version State
5+
-------------------------------------------------------------------------------------
6+
*1 Active 04bd.9715.5140 5 V02 Ready
7+
2 Standby 04bd.977f.f400 1 V02 Ready
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
parsed_sample:
3+
- switch: "1"
4+
role: "Active"
5+
mac_address: "04bd.9715.5140"
6+
priority: "5"
7+
version: "V02"
8+
state: "Ready"
9+
status1: ""
10+
status2: ""
11+
neighbor1: ""
12+
neighbor2: ""
13+
- switch: "2"
14+
role: "Standby"
15+
mac_address: "04bd.977f.f400"
16+
priority: "1"
17+
version: "V02"
18+
state: "Ready"
19+
status1: ""
20+
status2: ""
21+
neighbor1: ""
22+
neighbor2: ""
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Executing the command on VSS member switch role = VSS Active, id = 1
2+
3+
4+
Switch mode : Virtual Switch
5+
Virtual switch domain number : 100
6+
Local switch number : 1
7+
Local switch operational role: Virtual Switch Active
8+
Peer switch number : 2
9+
Peer switch operational role : Virtual Switch Standby
10+
11+
Executing the command on VSS member switch role = VSS Standby, id = 2
12+
13+
14+
Switch mode : Virtual Switch
15+
Virtual switch domain number : 100
16+
Local switch number : 2
17+
Local switch operational role: Virtual Switch Standby
18+
Peer switch number : 1
19+
Peer switch operational role : Virtual Switch Active
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
parsed_sample:
3+
- switch: "1"
4+
role: "Active"
5+
peer_switch: "2"
6+
peer_role: "Standby"
7+
mode: "Virtual Switch"
8+
domain: "100"
9+
- switch: "2"
10+
role: "Standby"
11+
peer_switch: "1"
12+
peer_role: "Active"
13+
mode: "Virtual Switch"
14+
domain: "100"

0 commit comments

Comments
 (0)