pan-os-python
pan-os-python copied to clipboard
fw_obj.software.upgrade_to_version(targetVersion) loses connection upon reboot and thus doesn't track results or perform subsequent upgrades in a multi-upgrade chain
Describe the bug
fw_obj.software.upgrade_to_version(targetVersion) loses connection upon reboot and thus doesn't track results or perform subsequent upgrades in a multi-upgrade chain
Expected behavior
Connection loss should be expected during upgrades and connectivity restoration should be possible after reboot.
Current behavior
Connection is lost during reboot
Possible solution
Catch the "pan.xapi.PanXapiError: <serial#> not connected" error and drop into a "while rebooting == True" iteration-counting loop that will only break if waiting exceeds the time limit
Steps to reproduce
Connect to and attempt to upgrade a firewall.
Screenshots
Context
Upgrading 300 firewalls by Dec 31 due to User ID certificate expiry
Your Environment
Python 3.11.1 pan-os-python 1.8.0