PaloAltoNetworks / PaloAltoNetworks/pan-os-python
debug not available to xmlapi client
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I am doing a simple operational state command query from the documentation:
from panos import firewall
fw = firewall.Firewall('', '', '')
response = fw.op('debug log-receiver statistics')
Expected behavior
Should receive the result of the command
Current behavior
Traceback (most recent call last):
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\panos\base.py", line 3878, in method
super_method(self, *args, **kwargs)
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\pan\xapi.py", line 951, in op
self.__type_op(cmd, vsys, extra_qs)
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\pan\xapi.py", line 974, in __type_op
raise PanXapiError(self.status_detail)
pan.xapi.PanXapiError: debug not available to xmlapi client
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\muravkir\Git projects\PANPython\operational_commands.py", line 4, in <module>
response = fw.op('debug log-receiver statistics', xml=False)
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\panos\firewall.py", line 242, in op
return super(Firewall, self).op(
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\panos\base.py", line 4047, in op
element = self.xapi.op(cmd, vsys, False, extra_qs, retry_on_peer=retry_on_peer)
File "C:\Users\muravkir\Git projects\PANPython\venv\lib\site-packages\panos\base.py", line 3899, in method
raise the_exception
Possible solution
Steps to reproduce
- firewall 9 or 10 version
- perform "debug log-receiver statistics" op command from script
Screenshots
Context
Your Environment
- Version used:
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
- Operating System and version (desktop or mobile):
- Link to your project:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Firewall.op in panos/firewall.py and panos/base.py, then inspect pan/xapi.py around xapi.op and the reported __type_op failure. Reproduce the documented debug log-receiver statistics command against a firewall version 9 or 10 device. Done means the command returns its result through the Python client, or the supported behavior and limitation are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100