<?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: Returning xpath information using panxapi in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/returning-xpath-information-using-panxapi/m-p/39702#M920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The results are showing you that the config you're looking for is in candidate config - but not in the active config (i.e. committed to the device).&amp;nbsp; Is that possibly why you're seeing those results?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2013 15:26:03 GMT</pubDate>
    <dc:creator>djm1001</dc:creator>
    <dc:date>2013-10-17T15:26:03Z</dc:date>
    <item>
      <title>Returning xpath information using panxapi</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/returning-xpath-information-using-panxapi/m-p/39701#M919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm writing a script to disable a rule using panxapi.&amp;nbsp; I'm trying to check to make sure the rule exists.&amp;nbsp; I've found if I have a typo in the rule name, panxapi will create the rule as a blank, so I need to make sure the rule exists before running panxapi to disable it.&amp;nbsp; I started testing how to do this and have run across something I don't understand.&amp;nbsp; Options -g and -s look to be what I would need, but I'm not understanding their results.&amp;nbsp; If I enter a non-existent rule "Rule.junk" they return different results.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-g&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;get candidate config at xpath&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;show active config at xpath&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;panxapi -h 192.168.x.x -s "/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Rule.junk']"&lt;/P&gt;&lt;P&gt;show: No such node status="error"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;panxapi -h 192.168.x,x -g "/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Rule.junk']"&lt;/P&gt;&lt;P&gt;get: success&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My candidate and running config are identical, yet -s says the rule doesn't exist, and -g says it does?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 17:12:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/returning-xpath-information-using-panxapi/m-p/39701#M919</guid>
      <dc:creator>blwallace</dc:creator>
      <dc:date>2013-09-23T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Returning xpath information using panxapi</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/returning-xpath-information-using-panxapi/m-p/39702#M920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The results are showing you that the config you're looking for is in candidate config - but not in the active config (i.e. committed to the device).&amp;nbsp; Is that possibly why you're seeing those results?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2013 15:26:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/returning-xpath-information-using-panxapi/m-p/39702#M920</guid>
      <dc:creator>djm1001</dc:creator>
      <dc:date>2013-10-17T15:26:03Z</dc:date>
    </item>
  </channel>
</rss>

