<?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: can't disable IPSec tunnel over API in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272364#M1960</link>
    <description>&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;No, the /disabled is necessary.&amp;nbsp; Turns out that -o is for operational commands; for 'edit' commands, you have to use -e.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python3 panxapi.py -h my.firewall -K LUFRPT0yY2VpTWIzSjZQYUZEdzN4MHdoMXl0eFBKOUE9N29ZQ29HMndocmdLbjVJZWVkWWwrVFJPV0N6RmZVU1pJc1pjLzBnS2Fwdz0= -x -e '&amp;lt;disabled&amp;gt;yes&amp;lt;/disabled&amp;gt;' "/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='my-ipsec-tunnel']/disabled"
edit: success [code="20"]: "command succeeded"
&amp;lt;response code="20" status="success"&amp;gt;&amp;lt;msg&amp;gt;command succeeded&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 23:28:46 GMT</pubDate>
    <dc:creator>rone</dc:creator>
    <dc:date>2019-06-21T23:28:46Z</dc:date>
    <item>
      <title>can't disable IPSec tunnel over API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272276#M1958</link>
      <description>&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;I've taken the instructions to extract the XML command from the debug console.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;request cmd="edit" obj="/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='my-ipsec-tunnel']/disabled" cookie="7684494492332192"&amp;gt;
&amp;nbsp;&amp;lt;disabled&amp;gt;yes&amp;lt;/disabled&amp;gt;
&amp;lt;/request&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;When i tried using pan-python-0.14.0, it failed thus:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python3 panxapi.py -h my.firewall -K LUFRPT0yY2VpTWIzSjZQYUZEdzN4MHdoMXl0eFBKOUE9N29ZQ29HMndocmdLbjVJZWVkWWwrVFJPV0N6RmZVU1pJc1pjLzBnS2Fwdz0= -x -o '&amp;lt;request cmd="edit" obj="/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='my-ipsec-tunnel']/disabled" cookie="7684494492332192"&amp;gt;&amp;lt;disabled&amp;gt;yes&amp;lt;/disabled&amp;gt;&amp;lt;/request&amp;gt;'
op: error [code="17"]: " request -&amp;gt; disabled is unexpected"
&amp;lt;response code="17" status="error"&amp;gt;&amp;lt;msg&amp;gt;&amp;lt;line&amp;gt; request -&amp;amp;gt; disabled is unexpected&amp;lt;/line&amp;gt;&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Also tried using curl:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ curl --globoff 'https://my.firewall/api/key=LUFRPT0yY2VpTWIzSjZQYUZEdzN4MHdoMXl0eFBKOUE9N29ZQ29HMndocmdLbjVJZWVkWWwrVFJPV0N6RmZVU1pJc1pjLzBnS2Fwdz0=&amp;amp;type=config&amp;amp;action=edit&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='my-ipsec-tunnel']&amp;amp;element=&amp;lt;disabled&amp;gt;yes&amp;lt;/disabled&amp;gt;'
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Document Error: Not Found&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;Access Error: 404 -- Not Found&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Can't locate document: /api/key=LUFRPT0yY2VpTWIzSjZQYUZEdzN4MHdoMXl0eFBKOUE9N29ZQ29HMndocmdLbjVJZWVkWWwrVFJPV0N6RmZVU1pJc1pjLzBnS2Fwdz0=&amp;amp;amp;type=config&amp;amp;amp;action=edit&amp;amp;amp;xpath=/config/devices/entry[@name=localhost.localdomain]/network/tunnel/ipsec/entry[@name=my-ipsec-tunnel]&amp;amp;amp;element=&amp;amp;lt;disabled&amp;amp;gt;yes&amp;amp;lt;/disabled&amp;amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;What am i missing?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 19:15:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272276#M1958</guid>
      <dc:creator>rone</dc:creator>
      <dc:date>2019-06-21T19:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: can't disable IPSec tunnel over API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272293#M1959</link>
      <description>I don't know the pan-python module, but I assume the "/disabled" is too much (you already have it in the XML snippet). When running it via curl, you need either to quote the single-quote ' in the URL or use double-quotes " to embrace the URL.</description>
      <pubDate>Fri, 21 Jun 2019 19:50:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272293#M1959</guid>
      <dc:creator>JoergSchuetter</dc:creator>
      <dc:date>2019-06-21T19:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: can't disable IPSec tunnel over API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272364#M1960</link>
      <description>&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;No, the /disabled is necessary.&amp;nbsp; Turns out that -o is for operational commands; for 'edit' commands, you have to use -e.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ python3 panxapi.py -h my.firewall -K LUFRPT0yY2VpTWIzSjZQYUZEdzN4MHdoMXl0eFBKOUE9N29ZQ29HMndocmdLbjVJZWVkWWwrVFJPV0N6RmZVU1pJc1pjLzBnS2Fwdz0= -x -e '&amp;lt;disabled&amp;gt;yes&amp;lt;/disabled&amp;gt;' "/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='my-ipsec-tunnel']/disabled"
edit: success [code="20"]: "command succeeded"
&amp;lt;response code="20" status="success"&amp;gt;&amp;lt;msg&amp;gt;command succeeded&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 23:28:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/can-t-disable-ipsec-tunnel-over-api/m-p/272364#M1960</guid>
      <dc:creator>rone</dc:creator>
      <dc:date>2019-06-21T23:28:46Z</dc:date>
    </item>
  </channel>
</rss>

