- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-23-2019 02:31 AM - edited 09-23-2019 02:31 AM
Hi,
I have developed a script that provisions firewalls to activate and update when it connects to Panorama.
I am now trying to get the script to move a firewall from a "Provisioning" to a "Provisioned" device group within Panorama.
In the GUI I have to remove the device from a group and add it to the new group.
Does anyone know what API commands I can use this to achieve this?
Many thanks
Ben
10-14-2019 12:49 PM
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).
You can play around with moving a firewall in the GUI and see what PAN-OS is doing, then mimic that:
You can also use pandevice if you wanted. I think moving firewalls between vsys is handled by having a Firewall object under a DeviceGroup object, then you can do .delete()
with it under the old DeviceGroup, add it to the object heirarchy for the new DeviceGroup, then .create()
with it under the new device group.
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!