networktocode / pyntc

Python library focused on tasks related to device level and OS management.
https://pyntc.readthedocs.io/en/latest/
Other
170 stars 52 forks source link

IOS Boot system command not correctly detected in c3650 #290

Closed juanjtomasg closed 8 months ago

juanjtomasg commented 1 year ago

Environment

When executing a software upgrade on a C3650 in bundle mode, the boot system command includes the keywords "switch all".

C3650#sh run | i boot system
boot system switch all flash:cat3k_caa-universalk9.SPA.03.07.01.E.152-3.E1.bin

Regex expression in set_boot_options function should be able to detect this variation of the boot system command and apply the correct boot system command to continue with the upgrade process.

When executing a software upgrade on a C3650, the following error is prompted: "Unable to determine the boot system configuration syntax. Current config is"

The current output of the c3650 is:

C3650#sh run | i boot system
boot system switch all flash:cat3k_caa-universalk9.SPA.03.07.01.E.152-3.E1.bin

None of the available regex expression allow the existence of two strings separated by an space in boot system command. Therefore, the upgrade fails with error "Unable to determine the boot system configuration syntax. Current config is".

Steps to Reproduce

  1. Check your C3650 boot system command. If the keywords "switch all" are present. You won't be able to run a successful upgrade.
pszulczewski commented 8 months ago

Completed in #289