The PAN-OS SDK for Python is a package to help interact with Palo Alto Networks devices (including physical and virtualized Next-generation Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics the traditional interaction with the device via the GUI or CLI/API.
Traceback (most recent call last):
File "test_update_content.py", line 41, in
main()
File "test_update_content.py", line 37, in main
install_content = updater.ContentUpdater(fw).install(version="8503-7125", sync=True)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/updater.py", line 544, in install
response = self._op(op)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/updater.py", line 38, in _op
return self.pandevice.xapi.op(cmd, cmd_xml=True)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/base.py", line 3682, in method
raise the_exception
panos.errors.PanDeviceXapiError: request -> content -> upgrade -> install -> version '8503-7125' is not an allowed keyword
request -> content -> upgrade -> install -> version is invalid
Possible solution
with keyword latest it work without issue.
updater.ContentUpdater(fw).install(version="latest", sync=True)
Describe the bug
when trying to install a specific version in content update it failed.
Expected behavior
execute without error
Current behavior
Traceback (most recent call last): File "test_update_content.py", line 41, in
main()
File "test_update_content.py", line 37, in main
install_content = updater.ContentUpdater(fw).install(version="8503-7125", sync=True)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/updater.py", line 544, in install
response = self._op(op)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/updater.py", line 38, in _op
return self.pandevice.xapi.op(cmd, cmd_xml=True)
File "/home/kevin/.pyenv/versions/panos/lib/python3.8/site-packages/panos/base.py", line 3682, in method
raise the_exception
panos.errors.PanDeviceXapiError: request -> content -> upgrade -> install -> version '8503-7125' is not an allowed keyword
request -> content -> upgrade -> install -> version is invalid
Possible solution
with keyword latest it work without issue. updater.ContentUpdater(fw).install(version="latest", sync=True)