From 46c93f50e3b58f98279b676e244f36f5d25da3f9 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Wed, 15 Apr 2020 17:39:15 +0800 Subject: [PATCH 1/8] Add files via upload --- .../cisco_ios_show_redundancy.raw | 76 ++++++++-------- .../cisco_ios_show_redundancy.textfsm | 91 +++++++++++++++++++ .../cisco_ios_show_redundancy.yml | 77 +++++++++------- .../cisco_ios_show_redundancy2.raw | 39 ++++++++ .../cisco_ios_show_redundancy2.yml | 42 +++++++++ .../cisco_ios_show_redundancy3.raw | 26 ++++++ .../cisco_ios_show_redundancy3.yml | 42 +++++++++ 7 files changed, 320 insertions(+), 73 deletions(-) create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.raw create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.yml create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.raw create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.yml diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw index e251532077..9c543e2e8f 100644 --- a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw @@ -1,38 +1,38 @@ -Redundant System Information : - ------------------------------ - Available system uptime = 2 days, 2 hours, 39 minutes - Switchovers system experienced = 0 - Standby failures = 0 - Last switchover reason = none - - Hardware Mode = Duplex - Configured Redundancy Mode = Stateful Switchover - Operating Redundancy Mode = Stateful Switchover - Maintenance Mode = Disabled - Communications = Up - - Current Processor Information : - ------------------------------- - Active Location = slot 1 - Current Software state = ACTIVE - Uptime in current state = 2 days, 2 hours, 39 minutes - Image Version = Cisco Internetwork Operating System Software - IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 - .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION - Copyright (c) 1986-2004 by cisco Systems, Inc. - Compiled Wed 14-Jul-04 04:42 by esi - BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 - Configuration register = 0x2002 - - Peer Processor Information : - ---------------------------- - Standby Location = slot 2 - Current Software state = STANDBY HOT - Uptime in current state = 2 days, 2 hours, 39 minutes - Image Version = Cisco Internetwork Operating System Software - IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 - .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION - Copyright (c) 1986-2004 by cisco Systems, Inc. - Compiled Wed 14-Jul-04 0 - BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 - Configuration register = 0x2002 +Redundant System Information : + ------------------------------ + Available system uptime = 2 days, 2 hours, 39 minutes + Switchovers system experienced = 0 + Standby failures = 0 + Last switchover reason = none + + Hardware Mode = Duplex + Configured Redundancy Mode = Stateful Switchover + Operating Redundancy Mode = Stateful Switchover + Maintenance Mode = Disabled + Communications = Up + + Current Processor Information : + ------------------------------- + Active Location = slot 1 + Current Software state = ACTIVE + Uptime in current state = 2 days, 2 hours, 39 minutes + Image Version = Cisco Internetwork Operating System Software + IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 + .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION + Copyright (c) 1986-2004 by cisco Systems, Inc. + Compiled Wed 14-Jul-04 04:42 by esi + BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 + Configuration register = 0x2002 + + Peer Processor Information : + ---------------------------- + Standby Location = slot 2 + Current Software state = STANDBY HOT + Uptime in current state = 2 days, 2 hours, 39 minutes + Image Version = Cisco Internetwork Operating System Software + IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 + .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION + Copyright (c) 1986-2004 by cisco Systems, Inc. + Compiled Wed 14-Jul-04 0 + BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 + Configuration register = 0x2002 diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm new file mode 100644 index 0000000000..a7200763f8 --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm @@ -0,0 +1,91 @@ +Value SYSTEM_UPTIME_YEARS (\d+) +Value SYSTEM_UPTIME_WEEKS (\d+) +Value SYSTEM_UPTIME_DAYS (\d+) +Value SYSTEM_UPTIME_HOURS (\d+) +Value SYSTEM_UPTIME_MINUTES (\d+) +Value SWITCHOVERS (\d+) +Value STANDBY_FAILURES (\d+) +Value LAST_SWITCHOVER_REASON (.+?) +Value HARDWARE_MODE (.+?) +Value CONFIGURED_REDUNDANCY_MODE (.+?) +Value OPERATING_REDUNDANCY_MODE (.+?) +Value MAINTENANCE_MODE (.+?) +Value COMMUNICATION_STATUS (.+?) +Value ACTIVE_SLOT (\S+) +Value ACTIVE_SOFTWARE_STATE (.+?) +Value ACTIVE_UPTIME_YEARS (\d+) +Value ACTIVE_UPTIME_WEEKS (\d+) +Value ACTIVE_UPTIME_DAYS (\d+) +Value ACTIVE_UPTIME_HOURS (\d+) +Value ACTIVE_UPTIME_MINUTES (\d+) +Value ACTIVE_MAJOR_RELEASE (\d+) +Value ACTIVE_MINOR_RELEASE (\d+) +Value ACTIVE_MAINTENANCE_RELEASE (\S+) +Value ACTIVE_BOOT_DIRECTORY (\S+) +Value ACTIVE_BOOT_FILE (\S+) +Value ACTIVE_CONFIG_REGISTER (\S+) +Value STANDBY_SLOT (\S+) +Value STANDBY_SOFTWARE_STATE (.+?) +Value STANDBY_UPTIME_YEARS (\d+) +Value STANDBY_UPTIME_WEEKS (\d+) +Value STANDBY_UPTIME_DAYS (\d+) +Value STANDBY_UPTIME_HOURS (\d+) +Value STANDBY_UPTIME_MINUTES (\d+) +Value STANDBY_MAJOR_RELEASE (\d+) +Value STANDBY_MINOR_RELEASE (\d+) +Value STANDBY_MAINTENANCE_RELEASE (\S+) +Value STANDBY_BOOT_DIRECTORY (\S+) +Value STANDBY_BOOT_FILE (\S+) +Value STANDBY_CONFIG_REGISTER (\S+) +Value STANDBY_STATUS (.+?) + + +Start + ^Redundant\s+System\s+Information + ^\s*-+\s*$$ + ^\s*Available\s+system\s+uptime\s*=\s*(${SYSTEM_UPTIME_YEARS}\s*year(s)?,)?\s*(${SYSTEM_UPTIME_WEEKS}\s*week(s)?,)?\s*(${SYSTEM_UPTIME_DAYS}\s*day(s)?,)?\s*(${SYSTEM_UPTIME_HOURS}\s*hour(s)?,)?\s*${SYSTEM_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ + ^\s*Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ + ^\s*Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ + ^\s*Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ + ^\s*Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ + ^\s*Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ + ^\s*Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ + ^\s*Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ + ^\s*Current\s+Processor -> Current + # Capture time-stamp if vty line has command time-stamping turned on + ^Load\s+for\s+ + ^Time\s+source\s+is + ^\s*$$ + ^. -> Error + +Current + ^\s*-+\s*$$ + ^\s*Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${ACTIVE_UPTIME_YEARS}\s*year(s)?,)?\s*(${ACTIVE_UPTIME_WEEKS}\s*week(s)?,)?\s*(${ACTIVE_UPTIME_DAYS}\s*day(s)?,)?\s*(${ACTIVE_UPTIME_HOURS}\s*hour(s)?,)?\s*${ACTIVE_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ + ^Peer\s*\(slot:\s*unavailable\)\s*\w*\s*\w*\s*\w*\s*\w*\s*\w\s*\w*\s*\w*\s*\w*\s*\w*\s*\'${STANDBY_STATUS}\'\s*state$$ -> EOF + ^\s*Peer\s+Processor -> Peer + ^\s*$$ + ^. -> Error + +Peer + ^\s*-+\s*$$ + ^\s*Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${STANDBY_UPTIME_YEARS}\s*year(s)?,)?\s*(${STANDBY_UPTIME_WEEKS}\s*week(s)?,)?\s*(${STANDBY_UPTIME_DAYS}\s*day(s)?,)?\s*(${STANDBY_UPTIME_HOURS}\s*hour(s)?,)?\s*${STANDBY_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ + ^\s*$$ + ^\s*Compiled\s* + ^. -> Error diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml index 464f2904b0..b770105c5a 100644 --- a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml @@ -1,35 +1,42 @@ ---- -parsed_sample: - - system_uptime_days: "2" - system_uptime_hours: "2" - system_uptime_minutes: "39" - switchovers: "0" - standby_failures: "0" - last_switchover_reason: "none" - hardware_mode: "Duplex" - configured_redundancy_mode: "Stateful Switchover" - operating_redundancy_mode: "Stateful Switchover" - maintenance_mode: "Disabled" - communication_status: "Up" - active_slot: "1" - active_software_state: "ACTIVE" - active_uptime_days: "2" - active_uptime_hours: "2" - active_uptime_minutes: "39" - active_major_release: "12" - active_minor_release: "2" - active_maintenance_release: "20" - active_boot_directory: "bootflash" - active_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" - active_config_register: "0x2002" - standby_slot: "2" - standby_software_state: "STANDBY HOT" - standby_uptime_days: "2" - standby_uptime_hours: "2" - standby_uptime_minutes: "39" - standby_major_release: "12" - standby_minor_release: "2" - standby_maintenance_release: "20" - standby_boot_directory: "bootflash" - standby_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" - standby_config_register: "0x2002" +--- +parsed_sample: + - system_uptime_years: "" + system_uptime_weeks: "" + system_uptime_days: "2" + system_uptime_hours: "2" + system_uptime_minutes: "39" + switchovers: "0" + standby_failures: "0" + last_switchover_reason: "none" + hardware_mode: "Duplex" + configured_redundancy_mode: "Stateful Switchover" + operating_redundancy_mode: "Stateful Switchover" + maintenance_mode: "Disabled" + communication_status: "Up" + active_slot: "1" + active_software_state: "ACTIVE" + active_uptime_years: "" + active_uptime_weeks: "" + active_uptime_days: "2" + active_uptime_hours: "2" + active_uptime_minutes: "39" + active_major_release: "12" + active_minor_release: "2" + active_maintenance_release: "20" + active_boot_directory: "bootflash" + active_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" + active_config_register: "0x2002" + standby_slot: "2" + standby_software_state: "STANDBY HOT" + standby_uptime_years: "" + standby_uptime_weeks: "" + standby_uptime_days: "2" + standby_uptime_hours: "2" + standby_uptime_minutes: "39" + standby_major_release: "12" + standby_minor_release: "2" + standby_maintenance_release: "20" + standby_boot_directory: "bootflash" + standby_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" + standby_config_register: "0x2002" + standby_status: "" diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.raw b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.raw new file mode 100644 index 0000000000..69d167dd28 --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.raw @@ -0,0 +1,39 @@ +Redundant System Information : +------------------------------ + Available system uptime = 1 hour, 22 minutes +Switchovers system experienced = 0 + Standby failures = 0 + Last switchover reason = none + Hardware Mode = Duplex + Configured Redundancy Mode = sso + Operating Redundancy Mode = sso + Maintenance Mode = Disabled + Communications = Up + +Current Processor Information : +------------------------------- + Active Location = slot 1/5 + Current Software state = ACTIVE + Uptime in current state = 1 hour, 22 minutes + Image Version = Cisco IOS Software, s2t54 Software (s2t54-ADVENTERPRISEK9-M), Version 15.5(1)SY4, RELEASE SOFTWARE (fc4) +Technical Support: http://www.cisco.com/techsupport +Copyright (c) 1986-2019 by Cisco Systems, Inc. +Compiled Mon 02-Sep-19 07:17 by prod_rel_team + BOOT = bootdisk:s2t54-adventerprisek9-mz.SPA.155-1.SY4.bin,1; + CONFIG_FILE = + BOOTLDR = + Configuration register = 0x2102 + +Peer Processor Information : +---------------------------- + Standby Location = slot 2/5 + Current Software state = STANDBY HOT + Uptime in current state = 19 minutes + Image Version = Cisco IOS Software, s2t54 Software (s2t54-ADVENTERPRISEK9-M), Version 15.5(1)SY4, RELEASE SOFTWARE (fc4) +Technical Support: http://www.cisco.com/techsupport +Copyright (c) 1986-2019 by Cisco Systems, Inc. +Compiled Mon 02-Sep-19 07:17 by prod_rel_team + BOOT = bootdisk:s2t54-adventerprisek9-mz.SPA.155-1.SY4.bin,1; + CONFIG_FILE = + BOOTLDR = + Configuration register = 0x2102 \ No newline at end of file diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.yml b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.yml new file mode 100644 index 0000000000..2b31ae0994 --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy2.yml @@ -0,0 +1,42 @@ +--- +parsed_sample: + - system_uptime_years: "" + system_uptime_weeks: "" + system_uptime_days: "" + system_uptime_hours: "1" + system_uptime_minutes: "22" + switchovers: "0" + standby_failures: "0" + last_switchover_reason: "none" + hardware_mode: "Duplex" + configured_redundancy_mode: "sso" + operating_redundancy_mode: "sso" + maintenance_mode: "Disabled" + communication_status: "Up" + active_slot: "1/5" + active_software_state: "ACTIVE" + active_uptime_years: "" + active_uptime_weeks: "" + active_uptime_days: "" + active_uptime_hours: "1" + active_uptime_minutes: "22" + active_major_release: "" + active_minor_release: "" + active_maintenance_release: "" + active_boot_directory: "bootdisk" + active_boot_file: "s2t54-adventerprisek9-mz.SPA.155-1.SY4.bin,1;" + active_config_register: "0x2102" + standby_slot: "2/5" + standby_software_state: "STANDBY HOT" + standby_uptime_years: "" + standby_uptime_weeks: "" + standby_uptime_days: "" + standby_uptime_hours: "" + standby_uptime_minutes: "19" + standby_major_release: "" + standby_minor_release: "" + standby_maintenance_release: "" + standby_boot_directory: "bootdisk" + standby_boot_file: "s2t54-adventerprisek9-mz.SPA.155-1.SY4.bin,1;" + standby_config_register: "0x2102" + standby_status: "" diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.raw b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.raw new file mode 100644 index 0000000000..847265ad6b --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.raw @@ -0,0 +1,26 @@ +Redundant System Information : +------------------------------ + Available system uptime = 46 weeks, 4 days, 22 hours, 52 minutes +Switchovers system experienced = 0 + Standby failures = 0 + Last switchover reason = none + + Hardware Mode = Simplex + Configured Redundancy Mode = sso + Operating Redundancy Mode = sso + Maintenance Mode = Disabled + Communications = Down Reason: Failure + +Current Processor Information : +------------------------------- + Active Location = slot 1 + Current Software state = ACTIVE + Uptime in current state = 46 weeks, 4 days, 22 hours, 52 minutes + Image Version = Cisco IOS Software, c6848x Software (c6848x-ADVENTERPRISEK9-M), Version 15.4(1)SY4, RELEASE SOFTWARE (fc3) +Technical Support: http://www.cisco.com/techsupport +Copyright (c) 1986-2018 by Cisco Systems, Inc. +Compiled Fri 02-Feb-18 02:00 by prod_rel_team + BOOT = bootdisk:/c6848x-adventerprisek9-mz.SPA.154-1.SY4.bin,12; + Configuration register = 0x2102 + +Peer (slot: unavailable) information is not available because it is in 'DISABLED' state \ No newline at end of file diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.yml b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.yml new file mode 100644 index 0000000000..256586bab5 --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy3.yml @@ -0,0 +1,42 @@ +--- +parsed_sample: + - system_uptime_years: "" + system_uptime_weeks: "46" + system_uptime_days: "4" + system_uptime_hours: "22" + system_uptime_minutes: "52" + switchovers: "0" + standby_failures: "0" + last_switchover_reason: "none" + hardware_mode: "Simplex" + configured_redundancy_mode: "sso" + operating_redundancy_mode: "sso" + maintenance_mode: "Disabled" + communication_status: "Down Reason: Failure" + active_slot: "1" + active_software_state: "ACTIVE" + active_uptime_years: "" + active_uptime_weeks: "46" + active_uptime_days: "4" + active_uptime_hours: "22" + active_uptime_minutes: "52" + active_major_release: "" + active_minor_release: "" + active_maintenance_release: "" + active_boot_directory: "bootdisk" + active_boot_file: "/c6848x-adventerprisek9-mz.SPA.154-1.SY4.bin,12;" + active_config_register: "0x2102" + standby_slot: "" + standby_software_state: "" + standby_uptime_years: "" + standby_uptime_weeks: "" + standby_uptime_days: "" + standby_uptime_hours: "" + standby_uptime_minutes: "" + standby_major_release: "" + standby_minor_release: "" + standby_maintenance_release: "" + standby_boot_directory: "" + standby_boot_file: "" + standby_config_register: "" + standby_status: "DISABLED" From 4f78f50aabe8be76d3674d826682f28a836014e8 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Wed, 15 Apr 2020 19:53:23 +0800 Subject: [PATCH 2/8] textfsm file --- templates/cisco_ios_show_redundancy.textfsm | 173 ++++++++++---------- 1 file changed, 91 insertions(+), 82 deletions(-) diff --git a/templates/cisco_ios_show_redundancy.textfsm b/templates/cisco_ios_show_redundancy.textfsm index b80e5b93e3..a7200763f8 100644 --- a/templates/cisco_ios_show_redundancy.textfsm +++ b/templates/cisco_ios_show_redundancy.textfsm @@ -1,82 +1,91 @@ -Value SYSTEM_UPTIME_DAYS (\d+) -Value SYSTEM_UPTIME_HOURS (\d+) -Value SYSTEM_UPTIME_MINUTES (\d+) -Value SWITCHOVERS (\d+) -Value STANDBY_FAILURES (\d+) -Value LAST_SWITCHOVER_REASON (.+?) -Value HARDWARE_MODE (.+?) -Value CONFIGURED_REDUNDANCY_MODE (.+?) -Value OPERATING_REDUNDANCY_MODE (.+?) -Value MAINTENANCE_MODE (.+?) -Value COMMUNICATION_STATUS (.+?) -Value ACTIVE_SLOT (\d+) -Value ACTIVE_SOFTWARE_STATE (.+?) -Value ACTIVE_UPTIME_DAYS (\d+) -Value ACTIVE_UPTIME_HOURS (\d+) -Value ACTIVE_UPTIME_MINUTES (\d+) -Value ACTIVE_MAJOR_RELEASE (\d+) -Value ACTIVE_MINOR_RELEASE (\d+) -Value ACTIVE_MAINTENANCE_RELEASE (\S+) -Value ACTIVE_BOOT_DIRECTORY (\S+) -Value ACTIVE_BOOT_FILE (\S+) -Value ACTIVE_CONFIG_REGISTER (\S+) -Value STANDBY_SLOT (\d+) -Value STANDBY_SOFTWARE_STATE (.+?) -Value STANDBY_UPTIME_DAYS (\d+) -Value STANDBY_UPTIME_HOURS (\d+) -Value STANDBY_UPTIME_MINUTES (\d+) -Value STANDBY_MAJOR_RELEASE (\d+) -Value STANDBY_MINOR_RELEASE (\d+) -Value STANDBY_MAINTENANCE_RELEASE (\S+) -Value STANDBY_BOOT_DIRECTORY (\S+) -Value STANDBY_BOOT_FILE (\S+) -Value STANDBY_CONFIG_REGISTER (\S+) - - -Start - ^Redundant\s+System\s+Information - ^\s*-+\s*$$ - ^\s+Available\s+system\s+uptime\s*=\s*${SYSTEM_UPTIME_DAYS}\s+days,\s+${SYSTEM_UPTIME_HOURS}\s+hours,\s+${SYSTEM_UPTIME_MINUTES}\s+minutes\s*$$ - ^\s+Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ - ^\s+Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ - ^\s+Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ - ^\s+Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ - ^\s+Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ - ^\s+Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ - ^\s+Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ - ^\s+Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ - ^\s+Current\s+Processor -> Current - # Capture time-stamp if vty line has command time-stamping turned on - ^Load\s+for\s+ - ^Time\s+source\s+is - ^\s*$$ - ^. -> Error - -Current - ^\s*-+\s*$$ - ^\s+Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ - ^\s+Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ - ^\s+Uptime\s+in\s+current\s+state\s*=\s*${ACTIVE_UPTIME_DAYS}\s+days,\s+${ACTIVE_UPTIME_HOURS}\s+hours,\s+${ACTIVE_UPTIME_MINUTES}\s+minutes\s*$$ - ^\s+Image\s+Version - ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.+(?:Copyright|Compiled) - ^\s+BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ - ^\s+Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ - ^\s+Peer\s+Processor -> Peer - ^\s*$$ - ^. -> Error - -Peer - ^\s*-+\s*$$ - ^\s+Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ - ^\s+Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ - ^\s+Uptime\s+in\s+current\s+state\s*=\s*${STANDBY_UPTIME_DAYS}\s+days,\s+${STANDBY_UPTIME_HOURS}\s+hours,\s+${STANDBY_UPTIME_MINUTES}\s+minutes\s*$$ - ^\s+Image\s+Version - ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.+(?:Copyright|Compiled) - ^\s+BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ - ^\s+Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ - ^\s*$$ - ^. -> Error +Value SYSTEM_UPTIME_YEARS (\d+) +Value SYSTEM_UPTIME_WEEKS (\d+) +Value SYSTEM_UPTIME_DAYS (\d+) +Value SYSTEM_UPTIME_HOURS (\d+) +Value SYSTEM_UPTIME_MINUTES (\d+) +Value SWITCHOVERS (\d+) +Value STANDBY_FAILURES (\d+) +Value LAST_SWITCHOVER_REASON (.+?) +Value HARDWARE_MODE (.+?) +Value CONFIGURED_REDUNDANCY_MODE (.+?) +Value OPERATING_REDUNDANCY_MODE (.+?) +Value MAINTENANCE_MODE (.+?) +Value COMMUNICATION_STATUS (.+?) +Value ACTIVE_SLOT (\S+) +Value ACTIVE_SOFTWARE_STATE (.+?) +Value ACTIVE_UPTIME_YEARS (\d+) +Value ACTIVE_UPTIME_WEEKS (\d+) +Value ACTIVE_UPTIME_DAYS (\d+) +Value ACTIVE_UPTIME_HOURS (\d+) +Value ACTIVE_UPTIME_MINUTES (\d+) +Value ACTIVE_MAJOR_RELEASE (\d+) +Value ACTIVE_MINOR_RELEASE (\d+) +Value ACTIVE_MAINTENANCE_RELEASE (\S+) +Value ACTIVE_BOOT_DIRECTORY (\S+) +Value ACTIVE_BOOT_FILE (\S+) +Value ACTIVE_CONFIG_REGISTER (\S+) +Value STANDBY_SLOT (\S+) +Value STANDBY_SOFTWARE_STATE (.+?) +Value STANDBY_UPTIME_YEARS (\d+) +Value STANDBY_UPTIME_WEEKS (\d+) +Value STANDBY_UPTIME_DAYS (\d+) +Value STANDBY_UPTIME_HOURS (\d+) +Value STANDBY_UPTIME_MINUTES (\d+) +Value STANDBY_MAJOR_RELEASE (\d+) +Value STANDBY_MINOR_RELEASE (\d+) +Value STANDBY_MAINTENANCE_RELEASE (\S+) +Value STANDBY_BOOT_DIRECTORY (\S+) +Value STANDBY_BOOT_FILE (\S+) +Value STANDBY_CONFIG_REGISTER (\S+) +Value STANDBY_STATUS (.+?) + + +Start + ^Redundant\s+System\s+Information + ^\s*-+\s*$$ + ^\s*Available\s+system\s+uptime\s*=\s*(${SYSTEM_UPTIME_YEARS}\s*year(s)?,)?\s*(${SYSTEM_UPTIME_WEEKS}\s*week(s)?,)?\s*(${SYSTEM_UPTIME_DAYS}\s*day(s)?,)?\s*(${SYSTEM_UPTIME_HOURS}\s*hour(s)?,)?\s*${SYSTEM_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ + ^\s*Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ + ^\s*Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ + ^\s*Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ + ^\s*Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ + ^\s*Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ + ^\s*Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ + ^\s*Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ + ^\s*Current\s+Processor -> Current + # Capture time-stamp if vty line has command time-stamping turned on + ^Load\s+for\s+ + ^Time\s+source\s+is + ^\s*$$ + ^. -> Error + +Current + ^\s*-+\s*$$ + ^\s*Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${ACTIVE_UPTIME_YEARS}\s*year(s)?,)?\s*(${ACTIVE_UPTIME_WEEKS}\s*week(s)?,)?\s*(${ACTIVE_UPTIME_DAYS}\s*day(s)?,)?\s*(${ACTIVE_UPTIME_HOURS}\s*hour(s)?,)?\s*${ACTIVE_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ + ^Peer\s*\(slot:\s*unavailable\)\s*\w*\s*\w*\s*\w*\s*\w*\s*\w\s*\w*\s*\w*\s*\w*\s*\w*\s*\'${STANDBY_STATUS}\'\s*state$$ -> EOF + ^\s*Peer\s+Processor -> Peer + ^\s*$$ + ^. -> Error + +Peer + ^\s*-+\s*$$ + ^\s*Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${STANDBY_UPTIME_YEARS}\s*year(s)?,)?\s*(${STANDBY_UPTIME_WEEKS}\s*week(s)?,)?\s*(${STANDBY_UPTIME_DAYS}\s*day(s)?,)?\s*(${STANDBY_UPTIME_HOURS}\s*hour(s)?,)?\s*${STANDBY_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ + ^\s*$$ + ^\s*Compiled\s* + ^. -> Error From 9e28d959b396706e6f03db5ed46d5413ae19b686 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:22:53 +0800 Subject: [PATCH 3/8] Delete cisco_ios_show_redundancy.raw --- .../cisco_ios_show_redundancy.raw | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw deleted file mode 100644 index 9c543e2e8f..0000000000 --- a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw +++ /dev/null @@ -1,38 +0,0 @@ -Redundant System Information : - ------------------------------ - Available system uptime = 2 days, 2 hours, 39 minutes - Switchovers system experienced = 0 - Standby failures = 0 - Last switchover reason = none - - Hardware Mode = Duplex - Configured Redundancy Mode = Stateful Switchover - Operating Redundancy Mode = Stateful Switchover - Maintenance Mode = Disabled - Communications = Up - - Current Processor Information : - ------------------------------- - Active Location = slot 1 - Current Software state = ACTIVE - Uptime in current state = 2 days, 2 hours, 39 minutes - Image Version = Cisco Internetwork Operating System Software - IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 - .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION - Copyright (c) 1986-2004 by cisco Systems, Inc. - Compiled Wed 14-Jul-04 04:42 by esi - BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 - Configuration register = 0x2002 - - Peer Processor Information : - ---------------------------- - Standby Location = slot 2 - Current Software state = STANDBY HOT - Uptime in current state = 2 days, 2 hours, 39 minutes - Image Version = Cisco Internetwork Operating System Software - IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 - .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION - Copyright (c) 1986-2004 by cisco Systems, Inc. - Compiled Wed 14-Jul-04 0 - BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 - Configuration register = 0x2002 From 4bb52a1e55cc05138460e5626dafbfd141e49b83 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:23:18 +0800 Subject: [PATCH 4/8] Delete cisco_ios_show_redundancy.textfsm --- templates/cisco_ios_show_redundancy.textfsm | 91 --------------------- 1 file changed, 91 deletions(-) delete mode 100644 templates/cisco_ios_show_redundancy.textfsm diff --git a/templates/cisco_ios_show_redundancy.textfsm b/templates/cisco_ios_show_redundancy.textfsm deleted file mode 100644 index a7200763f8..0000000000 --- a/templates/cisco_ios_show_redundancy.textfsm +++ /dev/null @@ -1,91 +0,0 @@ -Value SYSTEM_UPTIME_YEARS (\d+) -Value SYSTEM_UPTIME_WEEKS (\d+) -Value SYSTEM_UPTIME_DAYS (\d+) -Value SYSTEM_UPTIME_HOURS (\d+) -Value SYSTEM_UPTIME_MINUTES (\d+) -Value SWITCHOVERS (\d+) -Value STANDBY_FAILURES (\d+) -Value LAST_SWITCHOVER_REASON (.+?) -Value HARDWARE_MODE (.+?) -Value CONFIGURED_REDUNDANCY_MODE (.+?) -Value OPERATING_REDUNDANCY_MODE (.+?) -Value MAINTENANCE_MODE (.+?) -Value COMMUNICATION_STATUS (.+?) -Value ACTIVE_SLOT (\S+) -Value ACTIVE_SOFTWARE_STATE (.+?) -Value ACTIVE_UPTIME_YEARS (\d+) -Value ACTIVE_UPTIME_WEEKS (\d+) -Value ACTIVE_UPTIME_DAYS (\d+) -Value ACTIVE_UPTIME_HOURS (\d+) -Value ACTIVE_UPTIME_MINUTES (\d+) -Value ACTIVE_MAJOR_RELEASE (\d+) -Value ACTIVE_MINOR_RELEASE (\d+) -Value ACTIVE_MAINTENANCE_RELEASE (\S+) -Value ACTIVE_BOOT_DIRECTORY (\S+) -Value ACTIVE_BOOT_FILE (\S+) -Value ACTIVE_CONFIG_REGISTER (\S+) -Value STANDBY_SLOT (\S+) -Value STANDBY_SOFTWARE_STATE (.+?) -Value STANDBY_UPTIME_YEARS (\d+) -Value STANDBY_UPTIME_WEEKS (\d+) -Value STANDBY_UPTIME_DAYS (\d+) -Value STANDBY_UPTIME_HOURS (\d+) -Value STANDBY_UPTIME_MINUTES (\d+) -Value STANDBY_MAJOR_RELEASE (\d+) -Value STANDBY_MINOR_RELEASE (\d+) -Value STANDBY_MAINTENANCE_RELEASE (\S+) -Value STANDBY_BOOT_DIRECTORY (\S+) -Value STANDBY_BOOT_FILE (\S+) -Value STANDBY_CONFIG_REGISTER (\S+) -Value STANDBY_STATUS (.+?) - - -Start - ^Redundant\s+System\s+Information - ^\s*-+\s*$$ - ^\s*Available\s+system\s+uptime\s*=\s*(${SYSTEM_UPTIME_YEARS}\s*year(s)?,)?\s*(${SYSTEM_UPTIME_WEEKS}\s*week(s)?,)?\s*(${SYSTEM_UPTIME_DAYS}\s*day(s)?,)?\s*(${SYSTEM_UPTIME_HOURS}\s*hour(s)?,)?\s*${SYSTEM_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ - ^\s*Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ - ^\s*Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ - ^\s*Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ - ^\s*Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ - ^\s*Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ - ^\s*Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ - ^\s*Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ - ^\s*Current\s+Processor -> Current - # Capture time-stamp if vty line has command time-stamping turned on - ^Load\s+for\s+ - ^Time\s+source\s+is - ^\s*$$ - ^. -> Error - -Current - ^\s*-+\s*$$ - ^\s*Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ - ^\s*Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ - ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${ACTIVE_UPTIME_YEARS}\s*year(s)?,)?\s*(${ACTIVE_UPTIME_WEEKS}\s*week(s)?,)?\s*(${ACTIVE_UPTIME_DAYS}\s*day(s)?,)?\s*(${ACTIVE_UPTIME_HOURS}\s*hour(s)?,)?\s*${ACTIVE_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Image\s+Version - ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) - ^\s*BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ - ^\s*Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ - ^Peer\s*\(slot:\s*unavailable\)\s*\w*\s*\w*\s*\w*\s*\w*\s*\w\s*\w*\s*\w*\s*\w*\s*\w*\s*\'${STANDBY_STATUS}\'\s*state$$ -> EOF - ^\s*Peer\s+Processor -> Peer - ^\s*$$ - ^. -> Error - -Peer - ^\s*-+\s*$$ - ^\s*Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ - ^\s*Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ - ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${STANDBY_UPTIME_YEARS}\s*year(s)?,)?\s*(${STANDBY_UPTIME_WEEKS}\s*week(s)?,)?\s*(${STANDBY_UPTIME_DAYS}\s*day(s)?,)?\s*(${STANDBY_UPTIME_HOURS}\s*hour(s)?,)?\s*${STANDBY_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Image\s+Version - ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) - ^\s*BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ - ^\s*Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ - ^\s*$$ - ^\s*Compiled\s* - ^. -> Error From 4ba0b7f16041cb742965daa531cf113e12359148 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:23:40 +0800 Subject: [PATCH 5/8] Delete cisco_ios_show_redundancy.textfsm --- .../cisco_ios_show_redundancy.textfsm | 91 ------------------- 1 file changed, 91 deletions(-) delete mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm deleted file mode 100644 index a7200763f8..0000000000 --- a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.textfsm +++ /dev/null @@ -1,91 +0,0 @@ -Value SYSTEM_UPTIME_YEARS (\d+) -Value SYSTEM_UPTIME_WEEKS (\d+) -Value SYSTEM_UPTIME_DAYS (\d+) -Value SYSTEM_UPTIME_HOURS (\d+) -Value SYSTEM_UPTIME_MINUTES (\d+) -Value SWITCHOVERS (\d+) -Value STANDBY_FAILURES (\d+) -Value LAST_SWITCHOVER_REASON (.+?) -Value HARDWARE_MODE (.+?) -Value CONFIGURED_REDUNDANCY_MODE (.+?) -Value OPERATING_REDUNDANCY_MODE (.+?) -Value MAINTENANCE_MODE (.+?) -Value COMMUNICATION_STATUS (.+?) -Value ACTIVE_SLOT (\S+) -Value ACTIVE_SOFTWARE_STATE (.+?) -Value ACTIVE_UPTIME_YEARS (\d+) -Value ACTIVE_UPTIME_WEEKS (\d+) -Value ACTIVE_UPTIME_DAYS (\d+) -Value ACTIVE_UPTIME_HOURS (\d+) -Value ACTIVE_UPTIME_MINUTES (\d+) -Value ACTIVE_MAJOR_RELEASE (\d+) -Value ACTIVE_MINOR_RELEASE (\d+) -Value ACTIVE_MAINTENANCE_RELEASE (\S+) -Value ACTIVE_BOOT_DIRECTORY (\S+) -Value ACTIVE_BOOT_FILE (\S+) -Value ACTIVE_CONFIG_REGISTER (\S+) -Value STANDBY_SLOT (\S+) -Value STANDBY_SOFTWARE_STATE (.+?) -Value STANDBY_UPTIME_YEARS (\d+) -Value STANDBY_UPTIME_WEEKS (\d+) -Value STANDBY_UPTIME_DAYS (\d+) -Value STANDBY_UPTIME_HOURS (\d+) -Value STANDBY_UPTIME_MINUTES (\d+) -Value STANDBY_MAJOR_RELEASE (\d+) -Value STANDBY_MINOR_RELEASE (\d+) -Value STANDBY_MAINTENANCE_RELEASE (\S+) -Value STANDBY_BOOT_DIRECTORY (\S+) -Value STANDBY_BOOT_FILE (\S+) -Value STANDBY_CONFIG_REGISTER (\S+) -Value STANDBY_STATUS (.+?) - - -Start - ^Redundant\s+System\s+Information - ^\s*-+\s*$$ - ^\s*Available\s+system\s+uptime\s*=\s*(${SYSTEM_UPTIME_YEARS}\s*year(s)?,)?\s*(${SYSTEM_UPTIME_WEEKS}\s*week(s)?,)?\s*(${SYSTEM_UPTIME_DAYS}\s*day(s)?,)?\s*(${SYSTEM_UPTIME_HOURS}\s*hour(s)?,)?\s*${SYSTEM_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ - ^\s*Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ - ^\s*Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ - ^\s*Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ - ^\s*Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ - ^\s*Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ - ^\s*Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ - ^\s*Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ - ^\s*Current\s+Processor -> Current - # Capture time-stamp if vty line has command time-stamping turned on - ^Load\s+for\s+ - ^Time\s+source\s+is - ^\s*$$ - ^. -> Error - -Current - ^\s*-+\s*$$ - ^\s*Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ - ^\s*Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ - ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${ACTIVE_UPTIME_YEARS}\s*year(s)?,)?\s*(${ACTIVE_UPTIME_WEEKS}\s*week(s)?,)?\s*(${ACTIVE_UPTIME_DAYS}\s*day(s)?,)?\s*(${ACTIVE_UPTIME_HOURS}\s*hour(s)?,)?\s*${ACTIVE_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Image\s+Version - ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) - ^\s*BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ - ^\s*Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ - ^Peer\s*\(slot:\s*unavailable\)\s*\w*\s*\w*\s*\w*\s*\w*\s*\w\s*\w*\s*\w*\s*\w*\s*\w*\s*\'${STANDBY_STATUS}\'\s*state$$ -> EOF - ^\s*Peer\s+Processor -> Peer - ^\s*$$ - ^. -> Error - -Peer - ^\s*-+\s*$$ - ^\s*Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ - ^\s*Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ - ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${STANDBY_UPTIME_YEARS}\s*year(s)?,)?\s*(${STANDBY_UPTIME_WEEKS}\s*week(s)?,)?\s*(${STANDBY_UPTIME_DAYS}\s*day(s)?,)?\s*(${STANDBY_UPTIME_HOURS}\s*hour(s)?,)?\s*${STANDBY_UPTIME_MINUTES}\s*minute(s)?\s*$$ - ^\s*Image\s+Version - ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) - ^.+[Cc][Ii][Ss][Cc][Oo] - ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) - ^\s*BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ - ^\s*Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ - ^\s*$$ - ^\s*Compiled\s* - ^. -> Error From 14805875d5a2c41dffe9afa1fe0d9ef2d0c68a2d Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:25:04 +0800 Subject: [PATCH 6/8] Delete cisco_ios_show_redundancy.yml --- .../cisco_ios_show_redundancy.yml | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml deleted file mode 100644 index b770105c5a..0000000000 --- a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -parsed_sample: - - system_uptime_years: "" - system_uptime_weeks: "" - system_uptime_days: "2" - system_uptime_hours: "2" - system_uptime_minutes: "39" - switchovers: "0" - standby_failures: "0" - last_switchover_reason: "none" - hardware_mode: "Duplex" - configured_redundancy_mode: "Stateful Switchover" - operating_redundancy_mode: "Stateful Switchover" - maintenance_mode: "Disabled" - communication_status: "Up" - active_slot: "1" - active_software_state: "ACTIVE" - active_uptime_years: "" - active_uptime_weeks: "" - active_uptime_days: "2" - active_uptime_hours: "2" - active_uptime_minutes: "39" - active_major_release: "12" - active_minor_release: "2" - active_maintenance_release: "20" - active_boot_directory: "bootflash" - active_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" - active_config_register: "0x2002" - standby_slot: "2" - standby_software_state: "STANDBY HOT" - standby_uptime_years: "" - standby_uptime_weeks: "" - standby_uptime_days: "2" - standby_uptime_hours: "2" - standby_uptime_minutes: "39" - standby_major_release: "12" - standby_minor_release: "2" - standby_maintenance_release: "20" - standby_boot_directory: "bootflash" - standby_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" - standby_config_register: "0x2002" - standby_status: "" From cc6bd41acfb3cc9f2f80bf3d679a856bca4425ed Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:26:15 +0800 Subject: [PATCH 7/8] Add files via upload --- templates/cisco_ios_show_redundancy.textfsm | 91 +++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 templates/cisco_ios_show_redundancy.textfsm diff --git a/templates/cisco_ios_show_redundancy.textfsm b/templates/cisco_ios_show_redundancy.textfsm new file mode 100644 index 0000000000..a7200763f8 --- /dev/null +++ b/templates/cisco_ios_show_redundancy.textfsm @@ -0,0 +1,91 @@ +Value SYSTEM_UPTIME_YEARS (\d+) +Value SYSTEM_UPTIME_WEEKS (\d+) +Value SYSTEM_UPTIME_DAYS (\d+) +Value SYSTEM_UPTIME_HOURS (\d+) +Value SYSTEM_UPTIME_MINUTES (\d+) +Value SWITCHOVERS (\d+) +Value STANDBY_FAILURES (\d+) +Value LAST_SWITCHOVER_REASON (.+?) +Value HARDWARE_MODE (.+?) +Value CONFIGURED_REDUNDANCY_MODE (.+?) +Value OPERATING_REDUNDANCY_MODE (.+?) +Value MAINTENANCE_MODE (.+?) +Value COMMUNICATION_STATUS (.+?) +Value ACTIVE_SLOT (\S+) +Value ACTIVE_SOFTWARE_STATE (.+?) +Value ACTIVE_UPTIME_YEARS (\d+) +Value ACTIVE_UPTIME_WEEKS (\d+) +Value ACTIVE_UPTIME_DAYS (\d+) +Value ACTIVE_UPTIME_HOURS (\d+) +Value ACTIVE_UPTIME_MINUTES (\d+) +Value ACTIVE_MAJOR_RELEASE (\d+) +Value ACTIVE_MINOR_RELEASE (\d+) +Value ACTIVE_MAINTENANCE_RELEASE (\S+) +Value ACTIVE_BOOT_DIRECTORY (\S+) +Value ACTIVE_BOOT_FILE (\S+) +Value ACTIVE_CONFIG_REGISTER (\S+) +Value STANDBY_SLOT (\S+) +Value STANDBY_SOFTWARE_STATE (.+?) +Value STANDBY_UPTIME_YEARS (\d+) +Value STANDBY_UPTIME_WEEKS (\d+) +Value STANDBY_UPTIME_DAYS (\d+) +Value STANDBY_UPTIME_HOURS (\d+) +Value STANDBY_UPTIME_MINUTES (\d+) +Value STANDBY_MAJOR_RELEASE (\d+) +Value STANDBY_MINOR_RELEASE (\d+) +Value STANDBY_MAINTENANCE_RELEASE (\S+) +Value STANDBY_BOOT_DIRECTORY (\S+) +Value STANDBY_BOOT_FILE (\S+) +Value STANDBY_CONFIG_REGISTER (\S+) +Value STANDBY_STATUS (.+?) + + +Start + ^Redundant\s+System\s+Information + ^\s*-+\s*$$ + ^\s*Available\s+system\s+uptime\s*=\s*(${SYSTEM_UPTIME_YEARS}\s*year(s)?,)?\s*(${SYSTEM_UPTIME_WEEKS}\s*week(s)?,)?\s*(${SYSTEM_UPTIME_DAYS}\s*day(s)?,)?\s*(${SYSTEM_UPTIME_HOURS}\s*hour(s)?,)?\s*${SYSTEM_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Switchovers\s+system\s+experienced\s*=\s*${SWITCHOVERS}\s*$$ + ^\s*Standby\s+failures\s*=\s*${STANDBY_FAILURES}\s*$$ + ^\s*Last\s+switchover\s+reason\s*=\s*${LAST_SWITCHOVER_REASON}\s*$$ + ^\s*Hardware\s+Mode\s*=\s*${HARDWARE_MODE}\s*$$ + ^\s*Configured\s+Redundancy\s+Mode\s*=\s*${CONFIGURED_REDUNDANCY_MODE}\s*$$ + ^\s*Operating\s+Redundancy\s+Mode\s*=\s*${OPERATING_REDUNDANCY_MODE}\s*$$ + ^\s*Maintenance\s+Mode\s*=\s*${MAINTENANCE_MODE}\s*$$ + ^\s*Communications\s*=\s*${COMMUNICATION_STATUS}\s*$$ + ^\s*Current\s+Processor -> Current + # Capture time-stamp if vty line has command time-stamping turned on + ^Load\s+for\s+ + ^Time\s+source\s+is + ^\s*$$ + ^. -> Error + +Current + ^\s*-+\s*$$ + ^\s*Active\s+Location\s*=\s*slot\s+${ACTIVE_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${ACTIVE_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${ACTIVE_UPTIME_YEARS}\s*year(s)?,)?\s*(${ACTIVE_UPTIME_WEEKS}\s*week(s)?,)?\s*(${ACTIVE_UPTIME_DAYS}\s*day(s)?,)?\s*(${ACTIVE_UPTIME_HOURS}\s*hour(s)?,)?\s*${ACTIVE_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${ACTIVE_MAJOR_RELEASE}\.${ACTIVE_MINOR_RELEASE}\(${ACTIVE_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${ACTIVE_BOOT_DIRECTORY}:${ACTIVE_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${ACTIVE_CONFIG_REGISTER}\s*$$ + ^Peer\s*\(slot:\s*unavailable\)\s*\w*\s*\w*\s*\w*\s*\w*\s*\w\s*\w*\s*\w*\s*\w*\s*\w*\s*\'${STANDBY_STATUS}\'\s*state$$ -> EOF + ^\s*Peer\s+Processor -> Peer + ^\s*$$ + ^. -> Error + +Peer + ^\s*-+\s*$$ + ^\s*Standby\s+Location\s*=\s*slot\s+${STANDBY_SLOT}\s*$$ + ^\s*Current\s+Software\s+state\s*=\s*${STANDBY_SOFTWARE_STATE}\s*$$ + ^\s*Uptime\s+in\s+current\s+state\s*=\s*(${STANDBY_UPTIME_YEARS}\s*year(s)?,)?\s*(${STANDBY_UPTIME_WEEKS}\s*week(s)?,)?\s*(${STANDBY_UPTIME_DAYS}\s*day(s)?,)?\s*(${STANDBY_UPTIME_HOURS}\s*hour(s)?,)?\s*${STANDBY_UPTIME_MINUTES}\s*minute(s)?\s*$$ + ^\s*Image\s+Version + ^.+Version\s+${STANDBY_MAJOR_RELEASE}\.${STANDBY_MINOR_RELEASE}\(${STANDBY_MAINTENANCE_RELEASE}\) + ^.+[Cc][Ii][Ss][Cc][Oo] + ^.*(?:Copyright|Compiled|CONFIG_FILE|BOOTLDR) + ^\s*BOOT\s*=\s*${STANDBY_BOOT_DIRECTORY}:${STANDBY_BOOT_FILE}\s*$$ + ^\s*Configuration\s+register\s*=\s*${STANDBY_CONFIG_REGISTER}\s*$$ + ^\s*$$ + ^\s*Compiled\s* + ^. -> Error From df8748600c550e9453e37e16fd04025d598334c6 Mon Sep 17 00:00:00 2001 From: dhanasekaar <56018850+dhanasekaar@users.noreply.github.com> Date: Thu, 16 Apr 2020 14:27:08 +0800 Subject: [PATCH 8/8] Add files via upload --- .../cisco_ios_show_redundancy.raw | 38 +++++++++++++++++ .../cisco_ios_show_redundancy.yml | 42 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw create mode 100644 tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw new file mode 100644 index 0000000000..9c543e2e8f --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.raw @@ -0,0 +1,38 @@ +Redundant System Information : + ------------------------------ + Available system uptime = 2 days, 2 hours, 39 minutes + Switchovers system experienced = 0 + Standby failures = 0 + Last switchover reason = none + + Hardware Mode = Duplex + Configured Redundancy Mode = Stateful Switchover + Operating Redundancy Mode = Stateful Switchover + Maintenance Mode = Disabled + Communications = Up + + Current Processor Information : + ------------------------------- + Active Location = slot 1 + Current Software state = ACTIVE + Uptime in current state = 2 days, 2 hours, 39 minutes + Image Version = Cisco Internetwork Operating System Software + IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 + .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION + Copyright (c) 1986-2004 by cisco Systems, Inc. + Compiled Wed 14-Jul-04 04:42 by esi + BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 + Configuration register = 0x2002 + + Peer Processor Information : + ---------------------------- + Standby Location = slot 2 + Current Software state = STANDBY HOT + Uptime in current state = 2 days, 2 hours, 39 minutes + Image Version = Cisco Internetwork Operating System Software + IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA(3 + .92), CISCO INTERNAL USE ONLY ENHANCED PRODUCTION VERSION + Copyright (c) 1986-2004 by cisco Systems, Inc. + Compiled Wed 14-Jul-04 0 + BOOT = bootflash:cat4000-i5s-mz.122_20_EWA_392,1 + Configuration register = 0x2002 diff --git a/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml new file mode 100644 index 0000000000..b770105c5a --- /dev/null +++ b/tests/cisco_ios/show_redundancy/cisco_ios_show_redundancy.yml @@ -0,0 +1,42 @@ +--- +parsed_sample: + - system_uptime_years: "" + system_uptime_weeks: "" + system_uptime_days: "2" + system_uptime_hours: "2" + system_uptime_minutes: "39" + switchovers: "0" + standby_failures: "0" + last_switchover_reason: "none" + hardware_mode: "Duplex" + configured_redundancy_mode: "Stateful Switchover" + operating_redundancy_mode: "Stateful Switchover" + maintenance_mode: "Disabled" + communication_status: "Up" + active_slot: "1" + active_software_state: "ACTIVE" + active_uptime_years: "" + active_uptime_weeks: "" + active_uptime_days: "2" + active_uptime_hours: "2" + active_uptime_minutes: "39" + active_major_release: "12" + active_minor_release: "2" + active_maintenance_release: "20" + active_boot_directory: "bootflash" + active_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" + active_config_register: "0x2002" + standby_slot: "2" + standby_software_state: "STANDBY HOT" + standby_uptime_years: "" + standby_uptime_weeks: "" + standby_uptime_days: "2" + standby_uptime_hours: "2" + standby_uptime_minutes: "39" + standby_major_release: "12" + standby_minor_release: "2" + standby_maintenance_release: "20" + standby_boot_directory: "bootflash" + standby_boot_file: "cat4000-i5s-mz.122_20_EWA_392,1" + standby_config_register: "0x2002" + standby_status: ""