Skip to content

Commit

Permalink
Modified cisco_ios_show_boot (#1038)
Browse files Browse the repository at this point in the history
Updates cisco_ios_show_boot
  • Loading branch information
shanecbauman authored Dec 16, 2021
1 parent 14e31fd commit 68658d3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
19 changes: 16 additions & 3 deletions ntc_templates/templates/cisco_ios_show_boot.textfsm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Value SWITCH_NUMBER (\d+)
Value BOOT_PATH (\S+)
Value CONFIG_FILE (\S+)
Value PRIV_CONFIG_FILE (\S+)
Expand All @@ -11,25 +12,37 @@ Value BUFFER_SIZE (\d+)
Value TIMEOUT_CONFIG_DOWNLOAD (\d+)
Value CONFIG_DOWNLOAD_DHCP (enabled|disabled)
Value CONFIG_DOWNLOAD_DHCP_NEXT_BOOT (enabled|disabled)
Value BOOT_MODE (\S+)
Value CURRENT_BOOT_VARIABLES (BOOT\s*variable\s*does\s*not\s*exist|BOOT\s*variable\s*=\s*\S+)

Start
^BOOT\s+path-list\s+:\s+${BOOT_PATH}
^Current\s*Boot\s*Variables: -> CurrentBootVariables
^Switch\s+${SWITCH_NUMBER}
^BOOT\s+(path-list|variable)\s+(:|=)\s+${BOOT_PATH}
^Config\s+file\s+:\s+${CONFIG_FILE}
^Private\s+Config\s+file\s+:\s+${PRIV_CONFIG_FILE}
^Enable\s+Break\s+:\s+${ENABLE_BREAK}
^Manual\s+Boot\s+:\s+${MANUAL_BOOT}
^Enable\s+Break\s+(:|=)\s+${ENABLE_BREAK}
^Manual\s+Boot\s+(:|=)\s+${MANUAL_BOOT}
^Allow\s+Dev\s+Key\s+:\s+${ALLOW_DEV_KEY}
^HELPER\s+path-list\s+:.*
^Auto\s+upgrade\s+:\s+${AUTO_UPGRADE}
^Auto\s+upgrade\s+path\s+:.*
^NVRAM/Config\s+file
^\s+buffer\s+size:\s+${BUFFER_SIZE}
^iPXE\s*Timeout\s*=\s*${TIMEOUT_CONFIG_DOWNLOAD}
^Timeout\s+for\s+Config
^\s+Download:\s+${TIMEOUT_CONFIG_DOWNLOAD}
^Config\s+Download
^\s+via\s+DHCP:\s+${CONFIG_DOWNLOAD_DHCP}
# Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
^Boot\s*Mode\s*=\s*${BOOT_MODE}
^\s*$$
^-+
^. -> Error

CurrentBootVariables
^${CURRENT_BOOT_VARIABLES}
^Boot\s*Variables\s*on\s*next\s*reload: -> Start
^. -> Error
12 changes: 12 additions & 0 deletions tests/cisco_ios/show_boot/cisco_ios_show_boot_gibraltar.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---------------------------
Switch 1
---------------------------
Current Boot Variables:
BOOT variable does not exist

Boot Variables on next reload:
BOOT variable = flash:packages.conf
Manual Boot = no
Enable Break = yes
Boot Mode = DEVICE
iPXE Timeout = 0
18 changes: 18 additions & 0 deletions tests/cisco_ios/show_boot/cisco_ios_show_boot_gibraltar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
parsed_sample:
- switch_number: "1"
boot_path: "flash:packages.conf"
config_file: ""
priv_config_file: ""
enable_break: "yes"
manual_boot: "no"
allow_dev_key: ""
helper_path_list: ""
auto_upgrade: ""
auto_upgrade_path: ""
buffer_size: ""
timeout_config_download: "0"
config_download_dhcp: ""
config_download_dhcp_next_boot: ""
boot_mode: "DEVICE"
current_boot_variables: "BOOT variable does not exist"

0 comments on commit 68658d3

Please sign in to comment.