Useful Methods
These methods are the most commonly used and can be called on any object in a configuration tree.
Configuration Methods
Modify the configuration tree or the live device with these methods.
C: Changes the pan-os-python configuration tree
L: Connects to a live device (firewall or Panorama) via the API
M: Modifies the live device by making a change to the device’s configuration
B: Bulk operation modifies more than one object in a single API call
Method |
C |
L |
M |
B |
Description |
---|---|---|---|---|---|
|
✅ |
Add an object as a child of this object |
|||
|
✅ |
Add a list of objects as children |
|||
|
✅ |
Insert an object as a child at an index |
|||
|
✅ |
Remove a child object at an index |
|||
|
✅ |
Remove a child object from this object |
|||
|
✅ |
Remove a child object by its name |
|||
|
✅ |
Remove all children of this object |
|||
|
✅ |
Set params of object from live device |
|||
|
✅ |
Pull all children from the live device |
|||
|
✅ |
Set a single param from the live device |
|||
|
✅ |
✅ |
Push object to the live device (nd) |
||
|
✅ |
✅ |
Push object to the live device (d) |
||
|
✅ |
✅ |
Push single object param to live device |
||
|
✅ |
✅ |
✅ |
Delete from live device and config tree |
|
|
✅ |
✅ |
✅ |
Rename on live device and config tree |
|
|
✅ |
✅ |
✅ |
Reorder on live device and config tree |
|
|
✅ |
✅ |
✅ |
Push objects of this type to live device (nd) |
|
|
✅ |
✅ |
✅ |
Push objects of this type to live device (d) |
|
|
✅ |
✅ |
✅ |
Delete objects of this type from live device |
(d): Destructive - Method overwrites an object on the live device with the same name
(nd): Non-destructive - Method combines object with one on live device with the same name
Informational Methods
These methods provide information about an object in the configuration tree.
Method |
Description |
---|---|
|
Return all the params set on this object and their values |
|
Test if two objects are equal and return a boolean |
|
Return the XPath of this object |
|
Return the XML of this object as an ElementTree |
|
Return the XML of this object as a string |
|
Return hierarchical information about this object |
Device Methods
These methods can be called on a PanDevice object (a Firewall or Panorama), but not on any other PanObject.
Method |
Description |
---|---|
|
Return and retain important information about the device |
|
Trigger a commit on a Firewall or Panorama |
Trigger a configuration push from Panorama to the Firewalls |
|
|
Wait for a job on the device to finish |
Pull all the devices attached to Panorama as Firewall objects |
|
|
Execute an operational command |
|
Same as ‘op’, then watch for a specific result |
There are many other convenience methods available. They’re all documented in the
PanDevice
class.