- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-29-2020 11:08 PM
@btorresgil and all ,
I am trying to pull interface and zone details for an IP using PAN device framework.
Could you please help me on this. My end goal is to run test_security match cmd to find if rule is allow or not .
Current i can do this using fw.op() but i need to put pull zone details manually .
Thanks
01-30-2020 04:24 PM
If you're using pandevice, there's a function for this specifically:
01-30-2020 09:55 PM
Hi @gfreeman ,
Yeah , I am using thing . However i was referring Pulling details regrading Zone details for an IP.
Currently i need to verify Zone for an IP from firewall using cli and entering details in function .
I am trying to pull interface and zone details for an IP using pandevice.
02-04-2020 11:00 AM
So if you get the info from the CLI, then just mimic what command the CLI uses with pandevice and then you can invoke the function.
You can see what op command the CLI is executing by doing cli debug enable
before executing the command, then styling your pandevice fw.op()
similarly.
02-05-2020 10:46 AM
HI ,@gfreeman
Thanks for helping me on this . So i tried but getting below erroro:
"PanURLError: URLError: code: 400 reason: Illegal parameter [request]"
I tried to use fw.op() . As mentioned by you i enable the debug and got below :
<request cmd="op" cookie="9191129909288394" uid="1003"><operations><test><routing><fib-lookup><virtual-router>default</virtual-router><ip>10.1.1.1</ip></fib-lookup></routing></test></operations></request>
Could you please confirm me the value i need to pass for Op function .
i was trying using below:
test><routing><fib-lookup><virtual-router>default</virtual-router><ip>10.1.1.1</ip></fib-lookup></routing></test>
Thanks
02-10-2020 11:31 AM
You have a few options for how to pass it in.
1. Have pandevice create the XML command:
fw.op('test routing fib-lookup virtual-router "default" ip "10.1.1.1"')
2. Pass in the XML command yourself:
fw.op('<test><routing><fib-lookup><virtual-router>default</virtual-router><ip>10.1.1.1</ip></fib-lookup></routing></test>', cmd_xml=False)
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!