diff --git a/templates/cisco_s300_show_version.textfsm b/templates/cisco_s300_show_version.textfsm new file mode 100644 index 0000000000..1bf8fa19c2 --- /dev/null +++ b/templates/cisco_s300_show_version.textfsm @@ -0,0 +1,21 @@ +Value SW_VERSION ([1-9]\.[0-9]\.[0-9].[0-9]*) +Value BOOT_VERSION ([1-9]\.[0-9]\.[0-9].[0-9]*) +Value HW_VERSION (V0[1-9]) + +Start + ^SW\s+version\s+${SW_VERSION}\s.* -> FWVER1 + ^Active-image:\s.* -> FWVER2 + +FWVER1 + ^Boot\s+version\s+${BOOT_VERSION}\s.* + ^HW\s+version\s+${HW_VERSION} -> Record + ^\s*$$ + ^. -> Error + +FWVER2 + ^\s+Version:\s${SW_VERSION} -> Record + ^\s+MD5\s.* + ^\s+Date:\s.* + ^\s+Time:\s.* -> End + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index bf57b2acc8..ad4a9af163 100644 --- a/templates/index +++ b/templates/index @@ -255,6 +255,8 @@ cisco_nxos_show_vdc.textfsm, .*, cisco_nxos, sh[[ow]] vdc cisco_nxos_show_vpc.textfsm, .*, cisco_nxos, sh[[ow]] vpc cisco_nxos_show_vrf.textfsm, .*, cisco_nxos, sh[[ow]] vrf +cisco_s300_show_version.textfsm, .*, cisco_s300, sh[[ow]] ver[[sion]] + cisco_wlc_ssh_show_advanced_802.11a_channel.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ad[[vanced]] 802\.11[ab] ch[[annel]] cisco_wlc_ssh_show_802.11a_cleanair_config.textfsm, .*, cisco_wlc_ssh, sh[[ow]] 802\.11[ab] cl[[eanair]] c[[onfig]] cisco_wlc_ssh_show_cdp_neighbors_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] diff --git a/tests/cisco_s300/show_version/cisco_s300_show_version.raw b/tests/cisco_s300/show_version/cisco_s300_show_version.raw new file mode 100644 index 0000000000..de18884043 --- /dev/null +++ b/tests/cisco_s300/show_version/cisco_s300_show_version.raw @@ -0,0 +1,3 @@ +SW version 1.3.7.18 ( date 12-Jan-2014 time 18:02:59 ) +Boot version 1.1.0.6 ( date 11-May-2011 time 18:31:00 ) +HW version V02 diff --git a/tests/cisco_s300/show_version/cisco_s300_show_version.yml b/tests/cisco_s300/show_version/cisco_s300_show_version.yml new file mode 100644 index 0000000000..e90614c9c6 --- /dev/null +++ b/tests/cisco_s300/show_version/cisco_s300_show_version.yml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - boot_version: "1.1.0.6" + hw_version: "V02" + sw_version: "1.3.7.18" diff --git a/tests/cisco_s300/show_version/cisco_s300_show_version2.raw b/tests/cisco_s300/show_version/cisco_s300_show_version2.raw new file mode 100644 index 0000000000..2ffa1f6a3d --- /dev/null +++ b/tests/cisco_s300/show_version/cisco_s300_show_version2.raw @@ -0,0 +1,10 @@ +Active-image: flash://system/images/image1.bin + Version: 2.4.0.94 + MD5 Digest: 6f5be217100f34929986f2e93dd2d5e9 + Date: 31-May-2018 + Time: 02:39:58 +Inactive-image: flash://system/images/_image1.bin + Version: 2.4.0.94 + MD5 Digest: 6f5be217100f34929986f2e93dd2d5e9 + Date: 31-May-2018 + Time: 02:39:58 diff --git a/tests/cisco_s300/show_version/cisco_s300_show_version2.yml b/tests/cisco_s300/show_version/cisco_s300_show_version2.yml new file mode 100644 index 0000000000..923b281a51 --- /dev/null +++ b/tests/cisco_s300/show_version/cisco_s300_show_version2.yml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - boot_version: "" + hw_version: "" + sw_version: "2.4.0.94"