<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: pan-python - How to add an address group to a policy in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-python-how-to-add-an-address-group-to-a-policy/m-p/5702#M156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to "replace" the 'destination' node, which I think is what&lt;/P&gt;&lt;P&gt;you are trying to do, use edit (-e) with that xpath and element and&lt;/P&gt;&lt;P&gt;it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an example in panxapi.html 'Edit the application of a&lt;/P&gt;&lt;P&gt;security rule.' which covers a very similar case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An area not explained in the XML API documentation is: what is the&lt;/P&gt;&lt;P&gt;difference between set and edit?&amp;nbsp; I cover this a little in&lt;/P&gt;&lt;P&gt;pan.xapi.html and in more detail in some of my API training.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 19:43:35 GMT</pubDate>
    <dc:creator>ksteves1</dc:creator>
    <dc:date>2013-08-20T19:43:35Z</dc:date>
    <item>
      <title>pan-python - How to add an address group to a policy</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-python-how-to-add-an-address-group-to-a-policy/m-p/5701#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;I would like to add/change the destination address group in a policy.&amp;nbsp; &lt;/P&gt;&lt;P class="p2"&gt;&lt;/P&gt;&lt;P class="p1"&gt;xpath=/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='testDG']/pre-rulebase/security/rules/entry[@name='Allow_FTP']/destination&lt;/P&gt;&lt;P class="p1"&gt;element=&amp;lt;destination&amp;gt;&amp;lt;member&amp;gt;&lt;STRONG&gt;test_add&lt;/STRONG&gt;r&amp;lt;/member&amp;gt;&amp;lt;/destination&amp;gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Can you please show me how to achieve this via panxapi.py ?&amp;nbsp;&amp;nbsp; I couldn't find examples/documentation to achieve this.&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Thanks,&lt;/P&gt;&lt;P class="p1"&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 04:21:50 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-python-how-to-add-an-address-group-to-a-policy/m-p/5701#M155</guid>
      <dc:creator>ksomu</dc:creator>
      <dc:date>2013-08-20T04:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: pan-python - How to add an address group to a policy</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-python-how-to-add-an-address-group-to-a-policy/m-p/5702#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to "replace" the 'destination' node, which I think is what&lt;/P&gt;&lt;P&gt;you are trying to do, use edit (-e) with that xpath and element and&lt;/P&gt;&lt;P&gt;it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an example in panxapi.html 'Edit the application of a&lt;/P&gt;&lt;P&gt;security rule.' which covers a very similar case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An area not explained in the XML API documentation is: what is the&lt;/P&gt;&lt;P&gt;difference between set and edit?&amp;nbsp; I cover this a little in&lt;/P&gt;&lt;P&gt;pan.xapi.html and in more detail in some of my API training.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 19:43:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/pan-python-how-to-add-an-address-group-to-a-policy/m-p/5702#M156</guid>
      <dc:creator>ksteves1</dc:creator>
      <dc:date>2013-08-20T19:43:35Z</dc:date>
    </item>
  </channel>
</rss>

