- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-20-2020 09:50 AM
HI, @gfreeman and all ,
Just wanted to confirm , if we have limitation for test_security_policy_match cmd for Pan version 8 , getting error while pulling security rule name ? Same cmd is working fine for me if i am running for firewall having version 9 .
I tried to pull output using fw.xapi.op as well but same result .
Thanks
02-27-2020 10:01 AM
Please try updating your pandevice/base.py file as shown here and tell me if this fixes it:
https://github.com/PaloAltoNetworks/pandevice/commit/284710ac8633330fed1ef2d96180a2e955785e90
02-28-2020 06:09 AM
02-20-2020 09:59 AM
I believe this command was added to pandevice in the 8.x timeframe, so it should work.
What is the command you're running against both firewalls, and what is the error you're seeing when running against the 8.x firewall?
02-20-2020 10:44 AM
HI @gfreeman ,
Please find error details below against fw version 8:
==============Policy detail==================
Traceback (most recent call last):
File "finaltestversion.py", line 67, in <module>
x = fw.test_security_policy_match(from_zone=srczone, to_zone=dstzone, source=srcip, destination=dstip, port=dstport, protocol=proto)
File "C:\U\site-packages\pandevice\base.py", line 4873, in test_security_policy_match
'name': elm.attrib['name'],
KeyError: 'name'
However again version 9 i am getting output as expected i.e policy name , index and action .
02-27-2020 10:01 AM
Please try updating your pandevice/base.py file as shown here and tell me if this fixes it:
https://github.com/PaloAltoNetworks/pandevice/commit/284710ac8633330fed1ef2d96180a2e955785e90
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!