<?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: Move a firewall from a device group to another using API in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/move-a-firewall-from-a-device-group-to-another-using-api/m-p/292930#M2054</link>
    <description>&lt;P&gt;You'll need to do a GET to get the current device group info, then do an EDIT to remove it from the old device group (or a targeted DELETE would also work), then you can do an EDIT to add it to the new device group (or a targeted SET would also work).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can play around with moving a firewall in the GUI and see what PAN-OS is doing, then mimic that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use pandevice if you wanted.&amp;nbsp; I think moving firewalls between vsys is handled by having a Firewall object under a DeviceGroup object, then you can do &lt;CODE&gt;.delete()&lt;/CODE&gt; with it under the old DeviceGroup, add it to the object heirarchy for the new DeviceGroup, then &lt;CODE&gt;.create()&lt;/CODE&gt; with it under the new device group.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 19:49:18 GMT</pubDate>
    <dc:creator>gfreeman</dc:creator>
    <dc:date>2019-10-14T19:49:18Z</dc:date>
    <item>
      <title>Move a firewall from a device group to another using API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/move-a-firewall-from-a-device-group-to-another-using-api/m-p/289513#M2037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have developed a script that provisions firewalls to activate and update when it connects to Panorama.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now trying to get the script to move a firewall from a "Provisioning" to a "Provisioned" device group within Panorama.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the GUI I have to remove the device from a group and add it to the new group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what API commands I can use this to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 09:31:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/move-a-firewall-from-a-device-group-to-another-using-api/m-p/289513#M2037</guid>
      <dc:creator>Ben101</dc:creator>
      <dc:date>2019-09-23T09:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Move a firewall from a device group to another using API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/move-a-firewall-from-a-device-group-to-another-using-api/m-p/292930#M2054</link>
      <description>&lt;P&gt;You'll need to do a GET to get the current device group info, then do an EDIT to remove it from the old device group (or a targeted DELETE would also work), then you can do an EDIT to add it to the new device group (or a targeted SET would also work).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can play around with moving a firewall in the GUI and see what PAN-OS is doing, then mimic that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use pandevice if you wanted.&amp;nbsp; I think moving firewalls between vsys is handled by having a Firewall object under a DeviceGroup object, then you can do &lt;CODE&gt;.delete()&lt;/CODE&gt; with it under the old DeviceGroup, add it to the object heirarchy for the new DeviceGroup, then &lt;CODE&gt;.create()&lt;/CODE&gt; with it under the new device group.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 19:49:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/move-a-firewall-from-a-device-group-to-another-using-api/m-p/292930#M2054</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-10-14T19:49:18Z</dc:date>
    </item>
  </channel>
</rss>

