refreshall() method usage

Reply
Highlighted
L0 Member

refreshall() method usage

Trying to understand the correct usage of the refreshall method

per documentation:

refreshall()
Refresh all Predefined Objects
This method refreshes all predefined objects. This includes applications, application containers, services,
and tags.
CAUTION: This method requires a lot of overhead on the device api to respond. Response time will vary
by platform, but know that it will generally take longer than a normal api request.

 

pano = panos.panorama.Panorama(hostname=HOSTNAME, api_key=APIKEY)

pano.about()
{'hostname': '10.10.10.1'}
pano.refreshall()

*** TypeError: refreshall() missing 1 required positional argument: 'parent'

 

The documentation doesn't seem to indicate an argument is required for the method? What am i doing wrong here?

 

Python version is 3.6.8

thanks R

 

 

Highlighted
L2 Linker

Greetings,

 

The refreshall() is used to return info from the device.

The argument you have to provide is the parent of the object type you are looking to get info on.

Assume you want to get address objects:

pano.add(ADDR)

ADDR = panos.objects.AddressObject()

ADDR_LIST = ADDR.refreshall(pano)

The result is a list of all shared address objects in panorama.

 

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 Live Community as a whole!

The Live Community thanks you for your participation!