An efficient tool to execute configuration backups, network state snapshots, system readiness checks, and operating system upgrades of Palo Alto Networks firewalls and Panorama appliances.
This pull request introduces several key updates and enhancements to the pan-os-upgrade project, focusing on preparing the project for PyPI packaging and deployment. Additionally, it addresses important bug fixes and improvements in the upgrade process handling.
Key Changes
Preparation for PyPI Packaging
Restructured the project by moving the source code into the pan_os_upgrade directory.
Updated import statements to reflect the new structure, ensuring compatibility with Python packaging standards.
Included the .env file within the pan_os_upgrade directory for configuration.
Configured the pyproject.toml file to provide the pan-os-upgrade script, facilitating command-line usage post-installation.
Upgrade Process Retry Mechanism:
Enhanced the perform_upgrade function to handle retries more effectively. This improvement is critical for scenarios where the software manager on the device is busy.
Implemented a robust retry mechanism with a configurable wait time, providing resilience in the upgrade process.
Fix for TypeError in Logging:
Resolved a TypeError caused by an incorrect file keyword argument in logging.error calls within the parse_arguments function.
Refactored the logging statements to comply with the standard logging module's API.
General Improvements:
General code refactoring and cleanup for better readability and maintenance.
Updated documentation and comments to reflect the latest changes.
Testing and Validation:
Extensive testing was conducted to ensure that the package builds correctly and that the pan-os-upgrade script executes as expected.
Verified the functionality of the retry mechanism in the upgrade process under different scenarios.
Ensured compatibility and proper functioning of the package when installed through Poetry.
Request for Review
I request a thorough review of these changes from the maintainers.
Feedback, suggestions, and additional testing from the community are highly welcomed to ensure robustness and reliability.
Overview
This pull request introduces several key updates and enhancements to the pan-os-upgrade project, focusing on preparing the project for PyPI packaging and deployment. Additionally, it addresses important bug fixes and improvements in the upgrade process handling.
Key Changes
Preparation for PyPI Packaging
Upgrade Process Retry Mechanism:
Enhanced the perform_upgrade function to handle retries more effectively. This improvement is critical for scenarios where the software manager on the device is busy.
Implemented a robust retry mechanism with a configurable wait time, providing resilience in the upgrade process.
Fix for TypeError in Logging:
Resolved a TypeError caused by an incorrect file keyword argument in logging.error calls within the parse_arguments function.
Refactored the logging statements to comply with the standard logging module's API.
General Improvements:
General code refactoring and cleanup for better readability and maintenance.
Updated documentation and comments to reflect the latest changes. Testing and Validation:
Extensive testing was conducted to ensure that the package builds correctly and that the pan-os-upgrade script executes as expected.
Verified the functionality of the retry mechanism in the upgrade process under different scenarios.
Ensured compatibility and proper functioning of the package when installed through Poetry.
Request for Review
I request a thorough review of these changes from the maintainers.
Feedback, suggestions, and additional testing from the community are highly welcomed to ensure robustness and reliability.