Skip to content

Commit

Permalink
New Template: cisco_wlc_ssh_show_time.textfsm (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbear authored Jan 31, 2021
1 parent 0434330 commit 2461eaa
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
29 changes: 29 additions & 0 deletions templates/cisco_wlc_ssh_show_time.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Value Filldown TIME (.+)
Value Filldown TZ_DELTA (\S+)
Value Filldown TIMEZONE (.+)
Value Filldown TZ_NAME (.+)
Value Filldown NTP_VERSION (\d)
Value Filldown NTP_POLLING_INTERVAL (\d+)
Value Required INDEX (\d+)
Value NTP_KEY_INDEX (\d+)
Value NTP_SERVER (\S+)
Value STATUS (\S+\s?\S+)
Value NTP_MSG_AUTH_STATUS (\S+\s?\S+)

Start
^\s*Time\s*\.+\s+${TIME}\s*$$
^\s*Timezone [dD]elta\s*\.+\s+${TZ_DELTA}\s*$$
^\s*Timezone [lL]ocation\s*\.+\s+\(${TIMEZONE}\)\s+${TZ_NAME}\s*$$
^\s*NTP [sS]ervers\s*$$
^\s*NTP [vV]ersion\s*\.+\s+${NTP_VERSION}\s*$$
^\s*NTP [pP]olling [iI]nterval\s*\.+\s+${NTP_POLLING_INTERVAL}\s*$$
#
# NTP Server Table
^\s+Index\s+NTP Key Index\s+NTP Server\s+Status\s+NTP Msg Auth Status\s*$$ -> NTP_Servers
^\s*$$

NTP_Servers
^\s+${INDEX}\s+${NTP_KEY_INDEX}\s+${NTP_SERVER}\s+${STATUS}\s+${NTP_MSG_AUTH_STATUS}\s*$$ -> Record
^\s+[-\s]+$$
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ cisco_wlc_ssh_show_inventory.textfsm, .*, cisco_wlc_ssh, sh[[ow]] inve[[ntory]]
cisco_wlc_ssh_show_wlan_sum.textfsm, .*, cisco_wlc_ssh, sh[[ow]] wl[[an]] s[[ummary]]
cisco_wlc_ssh_show_802.11a.textfsm, .*, cisco_wlc_ssh, show 802\.11[ab]
cisco_wlc_ssh_show_sysinfo.textfsm, .*, cisco_wlc_ssh, sh[[ow]] sysi[[nfo]]
cisco_wlc_ssh_show_time.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ti[[me]]

cisco_xr_show_controllers_fabric_fia_errors_ingress_location.textfsm, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] err[[ors]] in[[gress]] loc[[ation]]
cisco_xr_show_controllers_fabric_fia_drops_ingress_location.textfsm, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] dr[[ops]] in[[gress]] loc[[ation]]
Expand Down
14 changes: 14 additions & 0 deletions tests/cisco_wlc_ssh/show_time/cisco_wlc_ssh_show_time.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Time............................................. Tue Dec 22 11:02:42 2020

Timezone delta................................... 0:0
Timezone location................................ (GMT -5:00) Eastern Time (US and Canada)

NTP Servers
NTP Version.................................. 3
NTP Polling Interval......................... 72000

Index NTP Key Index NTP Server Status NTP Msg Auth Status
------- ---------------------------------------------------------------------
1 0 1.1.1.1 In Sync AUTH DISABLED
2 0 128.138.141.172 Not Tried AUTH DISABLED
24 changes: 24 additions & 0 deletions tests/cisco_wlc_ssh/show_time/cisco_wlc_ssh_show_time.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
parsed_sample:
- time: "Tue Dec 22 11:02:42 2020"
tz_delta: "0:0"
timezone: "GMT -5:00"
tz_name: "Eastern Time (US and Canada)"
ntp_version: "3"
ntp_polling_interval: "72000"
index: "1"
ntp_key_index: "0"
ntp_server: "1.1.1.1"
status: "In Sync"
ntp_msg_auth_status: "AUTH DISABLED"
- time: "Tue Dec 22 11:02:42 2020"
tz_delta: "0:0"
timezone: "GMT -5:00"
tz_name: "Eastern Time (US and Canada)"
ntp_version: "3"
ntp_polling_interval: "72000"
index: "2"
ntp_key_index: "0"
ntp_server: "128.138.141.172"
status: "Not Tried"
ntp_msg_auth_status: "AUTH DISABLED"

0 comments on commit 2461eaa

Please sign in to comment.