Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError when using Panorama.refresh_devices() if there are some pre-registered firewalls not yet connected to Panorama #439

Closed
AnthoBalitrand opened this issue Mar 31, 2022 · 2 comments

Comments

@AnthoBalitrand
Copy link
Contributor

Describe the bug

If there are some firewalls pre-registered on Panorama (using the "Add" button on the "Managed Devices" menu), but which yet never connected to Panorama (awaiting deployment), it causes an AttributeError on the refresh_devices() function which is trying to split the PAN-OS version value of the device while it's not yet known.

Current behavior

>>> pano.refresh_devices(expand_vsys=False, include_device_groups=False) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/to148757/PycharmProjects/pan-os-python/panos/panorama.py", line 701, in refresh_devices firewall_instances = tmp_fw.refreshall_from_xml( File "/Users/to148757/PycharmProjects/pan-os-python/panos/firewall.py", line 403, in refreshall_from_xml fw._set_version_and_version_info(entry.findtext("sw-version")) File "/Users/to148757/PycharmProjects/pan-os-python/panos/base.py", line 4234, in _set_version_and_version_info tokens = self.version.split(".")[:3] AttributeError: 'NoneType' object has no attribute 'split'

@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@shinmog shinmog closed this as completed in ce17bd5 Apr 7, 2022
github-actions bot pushed a commit that referenced this issue Apr 7, 2022
### [1.7.1](v1.7.0...v1.7.1) (2022-04-07)

### Bug Fixes

* **panos.base.PanDevice._set_version_and_version_info:** Fixes AttributeError when version is not known ([#440](#440)) ([ce17bd5](ce17bd5)), closes [#439](#439)
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

🎉 This issue has been resolved in version 1.7.1 🎉

The release is available on PyPI and GitHub release

Posted by semantic-release bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant