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

Panorama push for Log Collector Group returns an empty result - Breaks Ansible playbooks #487

Closed jamesholland-uk closed 7 months ago

jamesholland-uk commented 1 year ago

Describe the bug

Panorama push for Log Collector Group works in Panorama, the push completes successfully, but the SDK returns an empty result. This breaks the Ansible modules consuming this SDK, and stops playbooks continuing to execute.

Expected behavior

Returned result from commit with PanoramaCommitAll should not be empty, it should contain the legitimate result.

Current behavior

Returned result from commit with PanoramaCommitAll is empty, despite the push to Log Collector Group being successful in Panorama itself.

Possible solution

Unsure why returned result is empty at this point in time.

Steps to reproduce

Code:

    panorama = Panorama(HOSTNAME, USERNAME, PASSWORD)

    cmd = PanoramaCommitAll(
        style="log collector group",
        name="log-coll-grp",
        include_template=False,
        force_template_values=False,
    )
    sync = True
    sync_all = True

    result = panorama.commit(cmd=cmd, sync=sync, sync_all=sync_all)

Result: print(result) result is None

Context

This has been raised due to a reported issue in pan-os-ansible: https://github.com/PaloAltoNetworks/pan-os-ansible/issues/369

Your Environment

pan-os-python                 1.7.3
pan-python                    0.18.0