PaloAltoNetworks / PaloAltoNetworks/pan-os-python
Unexpected source-hip here error -> While creating a security Policy on Panorama - 9.1.x
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
While creating security policy on Panorama Panos 9.1.10, we are getting this error message :
SecurityPolicyName -> source-hip unexpected here
Traceback (most recent call last):
File "/home/site/wwwroot/.python_packages/lib/site-packages/panos/base.py", line 3661, in method
super_method(self, *args, **kwargs)
File "/home/site/wwwroot/.python_packages/lib/site-packages/pan/xapi.py", line 741, in set
self.__type_config('set', query, extra_qs)
File "/home/site/wwwroot/.python_packages/lib/site-packages/pan/xapi.py", line 805, in __type_config
raise PanXapiError(self.status_detail)
pan.xapi.PanXapiError: SecurityPolicyName-> source-hip unexpected here
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/site/wwwroot/implementation/init.py", line 77, in main
new_pano = create_security_policies(preCheckInput,pano)
File "/home/site/wwwroot/implementation/init.py", line 240, in create_security_policies
raise err
File "/home/site/wwwroot/implementation/init.py", line 235, in create_security_policies
policy.create()
File "/home/site/wwwroot/.python_packages/lib/site-packages/panos/base.py", line 641, in create
device.active().xapi.set(
File "/home/site/wwwroot/.python_packages/lib/site-packages/panos/base.py", line 3682, in method
raise the_exception
panos.errors.PanDeviceXapiError: SecurityPolicyName-> source-hip unexpected here
Expected behavior
The security policy should be created without any errors
Current behavior
The security policy doesn't get created and throws the above error
Possible solution
Steps to reproduce
Screenshots
Context
We are unable to proceed ahead building our service to automate creating customer policy requests/tickets
Your Environment
Using Azure Durable Functions - Python 3.9
Panorama & NGFW Version - 9.1.10
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 reading the failing paths in panos/base.py and pan/xapi.py, then establish a reproducible security-policy creation case for Panorama 9.1.10 using the reported source-hip field. Compare the generated request with the device error and verify that the security policy is created without the unexpected-here failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100