PaloAltoNetworks / pan-os-python

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.
https://pan-os-python.readthedocs.io
ISC License
340 stars 168 forks source link

refresh_variable broken due to recent commit #444

Closed clienthax closed 2 years ago

clienthax commented 2 years ago

Describe the bug

Commit https://github.com/PaloAltoNetworks/pan-os-python/commit/0b47a3a6afa8379cdf63d04f90f555e564e235fd changed behaviour of parse_value_from_xml_last_tag to require an additional argument

refresh_variable does not pass the new required argument to parse_value_from_xml_last_tag here https://github.com/PaloAltoNetworks/pan-os-python/blob/0b47a3a6afa8379cdf63d04f90f555e564e235fd/panos/base.py#L959

Expected behavior

It to work

Current behavior

  File "/usr/local/lib/python3.8/dist-packages/panos/base.py", line 970, in refresh_variable
    var_path.parse_value_from_xml_last_tag(obj, settings)
TypeError: parse_value_from_xml_last_tag() missing 1 required positional argument: 'attr'

Possible solution

Add the missing argument to the caller

Steps to reproduce

Use pan-os-ansible to gather facts from a host.

Context

Gathering facts from network devices using ansible

Your Environment

welcome-to-palo-alto-networks[bot] commented 2 years ago

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

jhlasnik commented 2 years ago

I also hit this same issue, rolling back to v1.6.0 has resolved my issue for the time being.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.7.2 :tada:

The release is available on PyPI and GitHub release

Posted by semantic-release bot