- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-19-2013 09:21 PM
I would like to add/change the destination address group in a policy.
xpath=/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='testDG']/pre-rulebase/security/rules/entry[@name='Allow_FTP']/destination
element=<destination><member>test_addr</member></destination>
Can you please show me how to achieve this via panxapi.py ? I couldn't find examples/documentation to achieve this.
Thanks,
Krishna
08-20-2013 12:43 PM
If you want to "replace" the 'destination' node, which I think is what
you are trying to do, use edit (-e) with that xpath and element and
it should work.
There is an example in panxapi.html 'Edit the application of a
security rule.' which covers a very similar case.
An area not explained in the XML API documentation is: what is the
difference between set and edit? I cover this a little in
pan.xapi.html and in more detail in some of my API training.
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!