PAN-OS-Python Framework load running config (refresh_from_xml)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

PAN-OS-Python Framework load running config (refresh_from_xml)

L4 Transporter

I have a script which is doing report on multple Panorama securirty policies. It is working ok using the API, but I need run it offline using the panorama config file. 

My understanding is that I should be able to do it using the refresh_from_xml() module, but I am keep on getting errors when using it. 

 

As an example refreshall() is working fine:

 

 

device_groups = panorama.DeviceGroup.refreshall(pano, add=True)

 

 

but refresh_from_xml returns differenet errors: 

 

 

device_groups = panorama.DeviceGroup.refreshall_from_xml(xml = 'running-config.xml', refresh_children = True)

TypeError: refreshall_from_xml() missing 1 required positional argument: 'self'

 

 

Did you have any success running the framwork agains a config file and can you help me with it? 

1 REPLY 1

L4 Transporter

Anyone able to help?

  • 1866 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!