pan-os-ansible
pan-os-ansible copied to clipboard
Allow downgrade in panos_software.py
allow panos_software to perform downgrades in addition to upgrades
Description
panos_software no longer allows the user to perform a software downgrade. This patch allows a downgrade operation by verifying the version sequence. I.e. 1 minor or major step at a time.
Motivation and Context
Downgrades are a requirement that should be supported. If an upgrade fails for some reason, we should be able to use panos_software to rollback.
How Has This Been Tested?
Use panos_software module with a desired version less than the current version
Screenshots (if appropriate)
Types of changes
simple logic to check if desired_version is less than current version by no more than 1
- Bug fix (non-breaking change which fixes an issue)
Not being able to downgrade is a bug that was introduced some time ago.
Checklist
- [x] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [x] I have added tests to cover my changes if appropriate.
- [x] All new and existing tests passed.