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

Not able to commit-all with "template" and "admins" #515

Open
clawsoon opened this issue Jun 12, 2023 · 1 comment
Open

Not able to commit-all with "template" and "admins" #515

clawsoon opened this issue Jun 12, 2023 · 1 comment
Labels

Comments

@clawsoon
Copy link

When I try to commit-all with:

pano = panorama.Panorama(hostname=panohost, api_key=api_key)
cmd = panorama.PanoramaCommitAll(

        style="template",
        name=template_name,
        admins=[api_user],
)
pano.commit(cmd=cmd, sync=True, sync_all=True, exception=True)

...I get this error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3878, in method
    super_method(self, *args, **kwargs)
  File "/root/.local/lib/python3.6/site-packages/pan/xapi.py", line 902, in commit
    raise PanXapiError(self.status_detail)
  pan.xapi.PanXapiError:  commit-all -> template -> admin unexpected here
 commit-all -> template  is unexpected
 commit-all  is unexpected

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "committest.py", line 31, in <module>
    pano.commit(cmd=cmd, sync=True, sync_all=True, exception=True)
  File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 4770, in commit
    sync=sync, exception=exception, cmd=cmd, admins=admins, sync_all=sync_all
  File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 4851, in _commit
    retry_on_peer=True,
  File "/usr/local/lib/python3.6/site-packages/panos/base.py", line 3899, in method
    raise the_exception
panos.errors.PanDeviceXapiError:  commit-all -> template -> admin unexpected here
 commit-all -> template  is unexpected
 commit-all  is unexpected

Am I doing something wrong, or is the API doing something wrong?

This is against a Panorama and firewalls which are all 11.0.1, and pan-os-python-1.11.0, pan-python-0.17.0.

Thanks.

@clawsoon clawsoon added the bug label Jun 12, 2023
@welcome-to-palo-alto-networks

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

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

No branches or pull requests

1 participant