From 286cffb6215b15ab4cd9b1ab0460702a26676542 Mon Sep 17 00:00:00 2001 From: ksrattani <73962227+ksrattani@users.noreply.github.com> Date: Thu, 24 Jun 2021 09:40:43 -0500 Subject: [PATCH] Adding Restarted to show version template for cisco ios (#940) --- ntc_templates/templates/cisco_ios_show_version.textfsm | 2 ++ tests/cisco_ios/show_version/cisco_ios_show_version.yml | 1 + tests/cisco_ios/show_version/cisco_ios_show_version1.yml | 1 + tests/cisco_ios/show_version/cisco_ios_show_version2.yml | 1 + tests/cisco_ios/show_version/cisco_ios_show_version3.yml | 1 + tests/cisco_ios/show_version/cisco_ios_show_version4.yml | 1 + 6 files changed, 7 insertions(+) diff --git a/ntc_templates/templates/cisco_ios_show_version.textfsm b/ntc_templates/templates/cisco_ios_show_version.textfsm index 5ea3b0a4be..4d32f8475b 100644 --- a/ntc_templates/templates/cisco_ios_show_version.textfsm +++ b/ntc_templates/templates/cisco_ios_show_version.textfsm @@ -8,6 +8,7 @@ Value List HARDWARE (\S+|\S+\d\S+) Value List SERIAL (\S+) Value CONFIG_REGISTER (\S+) Value List MAC ([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}) +Value RESTARTED (.+) Start ^.*Software\s.+\),\sVersion\s${VERSION},*\s+RELEASE.* @@ -19,6 +20,7 @@ Start ^[Cc]isco\s+${HARDWARE}\s+\(.+\).+ ^[Cc]onfiguration\s+register\s+is\s+${CONFIG_REGISTER} ^Base\s+[Ee]thernet\s+MAC\s+[Aa]ddress\s+:\s+${MAC} + ^System\s+restarted\s+at\s+${RESTARTED}$$ ^Switch\s+Port -> Stack # Capture time-stamp if vty line has command time-stamping turned on ^Load\s+for\s+ diff --git a/tests/cisco_ios/show_version/cisco_ios_show_version.yml b/tests/cisco_ios/show_version/cisco_ios_show_version.yml index 3a91e0d9c8..fd16da9df3 100644 --- a/tests/cisco_ios/show_version/cisco_ios_show_version.yml +++ b/tests/cisco_ios/show_version/cisco_ios_show_version.yml @@ -12,3 +12,4 @@ parsed_sample: - "CAT1451S15C" config_register: "0x2102" mac: [] + restarted: "09:09:22 UTC Tue Apr 9 2013" diff --git a/tests/cisco_ios/show_version/cisco_ios_show_version1.yml b/tests/cisco_ios/show_version/cisco_ios_show_version1.yml index a97fbd1dcd..eb71525870 100644 --- a/tests/cisco_ios/show_version/cisco_ios_show_version1.yml +++ b/tests/cisco_ios/show_version/cisco_ios_show_version1.yml @@ -22,3 +22,4 @@ parsed_sample: - "f8:7b:20:22:bb:80" - "f8:b7:e2:33:cc:00" - "f8:b7:e2:44:dd:00" + restarted: "05:00:08 AEDT Wed Nov 22 2017" diff --git a/tests/cisco_ios/show_version/cisco_ios_show_version2.yml b/tests/cisco_ios/show_version/cisco_ios_show_version2.yml index a38f16353f..11935c90fa 100644 --- a/tests/cisco_ios/show_version/cisco_ios_show_version2.yml +++ b/tests/cisco_ios/show_version/cisco_ios_show_version2.yml @@ -12,3 +12,4 @@ parsed_sample: - "SSI1289001MH" config_register: "0x2102" mac: [] + restarted: "23:02:42 MET-DST Fri Jul 25 2014" diff --git a/tests/cisco_ios/show_version/cisco_ios_show_version3.yml b/tests/cisco_ios/show_version/cisco_ios_show_version3.yml index 1510b62ace..a72cd33d98 100644 --- a/tests/cisco_ios/show_version/cisco_ios_show_version3.yml +++ b/tests/cisco_ios/show_version/cisco_ios_show_version3.yml @@ -12,3 +12,4 @@ parsed_sample: - "991UCMIHG4UAJ1J010CQG" config_register: "0x0" mac: [] + restarted: "" diff --git a/tests/cisco_ios/show_version/cisco_ios_show_version4.yml b/tests/cisco_ios/show_version/cisco_ios_show_version4.yml index 38ad8334dd..677cd7fdab 100644 --- a/tests/cisco_ios/show_version/cisco_ios_show_version4.yml +++ b/tests/cisco_ios/show_version/cisco_ios_show_version4.yml @@ -16,3 +16,4 @@ parsed_sample: mac: - "0c:d0:f8:cd:b5:80" - "70:35:09:dd:20:00" + restarted: "22:16:13 NZST Wed May 1 2019"