Skip to content

Commit

Permalink
New Template: cisco_s300_show_version (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdennis authored Mar 2, 2020
1 parent aec1680 commit c6c219e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 0 deletions.
21 changes: 21 additions & 0 deletions templates/cisco_s300_show_version.textfsm
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
3 changes: 3 additions & 0 deletions tests/cisco_s300/show_version/cisco_s300_show_version.raw
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tests/cisco_s300/show_version/cisco_s300_show_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
parsed_sample:
- boot_version: "1.1.0.6"
hw_version: "V02"
sw_version: "1.3.7.18"
10 changes: 10 additions & 0 deletions tests/cisco_s300/show_version/cisco_s300_show_version2.raw
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tests/cisco_s300/show_version/cisco_s300_show_version2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
parsed_sample:
- boot_version: ""
hw_version: ""
sw_version: "2.4.0.94"

0 comments on commit c6c219e

Please sign in to comment.