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: cisco_nxos_show_hsrp_all #760

Merged
merged 2 commits into from
Jun 23, 2020
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
55 changes: 55 additions & 0 deletions templates/cisco_nxos_show_hsrp_all.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Object names are based on pyATS/Genie parser (boolean values are left out)
Value INTERFACE (\S+)
Value VERSION (\d+)
Value GROUP_NUMBER (\d+)
Value PRIORITY (\d+)
Value HSRP_ROUTER_STATE (\S+)
Value CONFIGURED_PRIORITY (\d+)
Value PREEMPT (.*)
Value LOWER_FWD_TRESHOLD (\d+)
Value UPPER_FWD_TRESHOLD (\d+)
# Value TIMERS_HELLO_MSEC_FLAG
# Value TIMERS_HOLD_MSEC_FLAG
Value TIMERS_HELLO_SEC (\d+)
Value TIMERS_HOLD_SEC (\d+)
Value PRIMARY_IPV4_ADDRESS (\S+)
# Value VIRTUAL_IP_LEARN
Value SECONDARY_IPV4_ADDRESS (\S+)
Value ACTIVE_ROUTER (\S+)
Value ACTIVE_EXPIRE (\d+\.\d+)
Value ACTIVE_IP_ADDRESS (\S+)
Value ACTIVE_PRIORITY (\d+)
Value STANDBY_ROUTER (\S+)
Value STANDBY_EXPIRE (\d+\.\d+)
Value STANDBY_IP_ADDRESS (\S+)
Value STANDBY_PRIORITY (\d+)
Value AUTHENTICATION (\S+)
Value VIRTUAL_MAC_ADDRESS (\S+)
Value VIRTUAL_MAC_ADDRESS_STATUS (.*)
Value NUM_STATE_CHANGES (\d+)
Value LAST_STATE_CHANGE (\S+)
Value SESSION_NAME (\S+)

Start
^${INTERFACE}\s+-\s+Group\s${GROUP_NUMBER}\s+\(HSRP-V${VERSION}\)\s\(IPv[46]\)\s*$$
^\s+Local\s+state\s+is\s+${HSRP_ROUTER_STATE},\s+priority\s+${PRIORITY}\s+\(Cfged\s+${CONFIGURED_PRIORITY}\),\s+${PREEMPT}\s*$$
^\s+.*lower:\s+${LOWER_FWD_TRESHOLD}\s+upper:\s+${UPPER_FWD_TRESHOLD}\s*$$
^\s+Preemption\s+Delay.*$$
^\s+Hellotime\s+${TIMERS_HELLO_SEC}.*holdtime\s+${TIMERS_HOLD_SEC}.*$$
^\s+Next\s+hello\s+sent.*$$
^\s+Virtual\s+IP\s+address\s+is\s+${PRIMARY_IPV4_ADDRESS}\s+.*$$
^\s+Secondary\s+Virtual\s+IP\s+address\s+is\s+${SECONDARY_IPV4_ADDRESS}\s*$$
^\s+Active\s+router\s+is\s+${ACTIVE_ROUTER}\s*$$
^\s+Active\s+router\s+is\s+${ACTIVE_IP_ADDRESS}\s?,\s+priority\s+${ACTIVE_PRIORITY}\s+expires\s+in\s+${ACTIVE_EXPIRE}.*$$
^\s+Standby\s+router\s+is\s+${STANDBY_ROUTER}\s*$$
^\s+Standby\s+router\s+is\s+${STANDBY_IP_ADDRESS}\s?,\s+priority\s+${STANDBY_PRIORITY}\s+expires\s+in\s+${STANDBY_EXPIRE}.*$$
^\s+Authentication\s+${AUTHENTICATION},.*$$
^\s+Virtual\s+mac\s+address\s+is\s+${VIRTUAL_MAC_ADDRESS} \(${VIRTUAL_MAC_ADDRESS_STATUS}\)\s*$$
^\s+${NUM_STATE_CHANGES}\s+state\s+changes,\s+last\s+state\s+change\s+${LAST_STATE_CHANGE}\s*$$
^\s+IP\s+redundancy\s+name\s+is\s+${SESSION_NAME}\s.*$$
^\s+Secondary VIP.*$$
# Catch secondary VIPs:
^\s+\d+\.\d+\.\d+\.\d+$$
# Record data when empty line is found
^\s*$$ -> Record
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ cisco_nxos_show_interface.textfsm, .*, cisco_nxos, sh[[ow]] inte[[rface]]
cisco_nxos_show_inventory.textfsm, .*, cisco_nxos, sh[[ow]] inv[[entory]]
cisco_nxos_show_route-map.textfsm, .*, cisco_nxos, sh[[ow]] route-m[[ap]]
cisco_nxos_show_hostname.textfsm, .*, cisco_nxos, sh[[ow]] hostn[[ame]]
cisco_nxos_show_hsrp_all.textfsm, .*, cisco_nxos, sh[[ow]] hsrp all
cisco_nxos_show_ip_route.textfsm, .*, cisco_nxos, sh[[ow]] ip route
cisco_nxos_show_feature.textfsm, .*, cisco_nxos, sh[[ow]] feat[[ure]]
cisco_nxos_show_version.textfsm, .*, cisco_nxos, sh[[ow]] ver[[sion]]
Expand Down
184 changes: 184 additions & 0 deletions tests/cisco_nxos/show_hsrp_all/cisco_nxos_show_hsrp_all.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
Vlan100 - Group 100 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.676000 sec(s)
Virtual IP address is 192.168.100.1 (Cfged)
Secondary Virtual IP address is 192.168.100.193
Active router is local
Standby router is 192.168.100.69 , priority 200 expires in 10.174000 sec(s)
Authentication MD5, key-string "dr-hsrp"
Virtual mac address is 0000.0c9f.f384 (Default MAC)
2 state changes, last state change 1y27w
IP redundancy name is hsrp-Vlan100-100 (default)
Secondary VIP(s):
192.168.100.193

Vlan200 - Group 200 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.448000 sec(s)
Virtual IP address is 172.11.4.254 (Cfged)
Active router is local
Standby router is 172.11.4.253 , priority 200 expires in 2.551000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fd48 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan200-200 (default)

Vlan201 - Group 201 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.484000 sec(s)
Virtual IP address is 172.11.5.30 (Cfged)
Active router is local
Standby router is 172.11.5.29 , priority 200 expires in 2.551000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fd49 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan201-201 (default)

Vlan210 - Group 210 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.420000 sec(s)
Virtual IP address is 172.12.9.254 (Cfged)
Active router is local
Standby router is 172.12.9.253 , priority 200 expires in 2.873000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fdb6 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan210-210 (default)

Vlan211 - Group 211 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.695000 sec(s)
Virtual IP address is 172.12.10.62 (Cfged)
Active router is local
Standby router is 172.12.10.61 , priority 200 expires in 2.873000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fdb7 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan211-211 (default)

Vlan220 - Group 220 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.484000 sec(s)
Virtual IP address is 172.13.12.254 (Cfged)
Active router is local
Standby router is 172.13.12.253 , priority 200 expires in 2.281000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fe24 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan220-220 (default)

Vlan221 - Group 221 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.614000 sec(s)
Virtual IP address is 172.13.13.30 (Cfged)
Active router is local
Standby router is 172.13.13.29 , priority 200 expires in 2.281000 sec(s)
Authentication MD5, key-string "hq-hsrp"
Virtual mac address is 0000.0c9f.fe25 (Default MAC)
2 state changes, last state change 1y0w
IP redundancy name is hsrp-Vlan221-221 (default)

Vlan300 - Group 300 (HSRP-V2) (IPv4)
Local state is Active, priority 250 (Cfged 250), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 250
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.448000 sec(s)
Virtual IP address is 172.16.0.254 (Cfged)
Active router is local
Standby router is 172.16.0.253 , priority 200 expires in 2.551000 sec(s)
Authentication MD5, key-string "dr-hsrp"
Virtual mac address is 0000.0c9f.fed8 (Default MAC)
14 state changes, last state change 1y2w
IP redundancy name is hsrp-Vlan300-300 (default)

Vlan416 - Group 416 (HSRP-V2) (IPv4)
Local state is Standby, priority 130 (Cfged 130), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 130
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.231000 sec(s)
Virtual IP address is 172.17.1.1 (Cfged)
Active router is 172.17.1.2, priority 150 expires in 0.661000 sec(s)
Standby router is local
Authentication MD5, key-string "core-hsrp"
Virtual mac address is 0000.0c9f.ff4c (Default MAC)
105 state changes, last state change 21w5d
IP redundancy name is hsrp-Vlan416-416 (default)

Vlan417 - Group 417 (HSRP-V2) (IPv4)
Local state is Standby, priority 130 (Cfged 130), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 130
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.610000 sec(s)
Virtual IP address is 172.17.1.17 (Cfged)
Active router is 172.17.1.18, priority 150 expires in 1.531000 sec(s)
Standby router is local
Authentication MD5, key-string "core-hsrp"
Virtual mac address is 0000.0c9f.ff4d (Default MAC)
418 state changes, last state change 21w5d
IP redundancy name is hsrp-Vlan417-417 (default)

Vlan418 - Group 418 (HSRP-V2) (IPv4)
Local state is Standby, priority 130 (Cfged 130), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 130
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.422000 sec(s)
Virtual IP address is 172.17.1.33 (Cfged)
Active router is 172.17.1.2, priority 150 expires in 0.081000 sec(s)
Standby router is local
Authentication MD5, key-string "core-hsrp"
Virtual mac address is 0000.0c9f.ff4e (Default MAC)
102 state changes, last state change 21w5d
IP redundancy name is hsrp-Vlan418-418 (default)

Vlan419 - Group 419 (HSRP-V2) (IPv4)
Local state is Standby, priority 130 (Cfged 130), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 130
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.886000 sec(s)
Virtual IP address is 172.17.1.49 (Cfged)
Active router is 172.17.1.50, priority 150 expires in 2.281000 sec(s)
Standby router is local
Authentication MD5, key-string "core-hsrp"
Virtual mac address is 0000.0c9f.ff4f (Default MAC)
448 state changes, last state change 21w5d
IP redundancy name is hsrp-Vlan419-419 (default)

Vlan420 - Group 420 (HSRP-V2) (IPv4)
Local state is Standby, priority 130 (Cfged 130), may preempt
Forwarding threshold(for vPC), lower: 1 upper: 130
Preemption Delay (Seconds) Reload:120 Minimum:60 Sync:60
Hellotime 1 sec, holdtime 3 sec
Next hello sent in 0.301000 sec(s)
Virtual IP address is 172.17.1.65 (Cfged)
Active router is 172.17.1.66, priority 150 expires in 0.081000 sec(s)
Standby router is local
Authentication MD5, key-string "core-hsrp"
Virtual mac address is 0000.0c9f.ff50 (Default MAC)
103 state changes, last state change 21w5d
IP redundancy name is hsrp-Vlan420-420 (default)
Loading