refreshall() method usage

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

refreshall() method usage

L0 Member

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

 

 

1 REPLY 1

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.

 

  • 3009 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!