- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-09-2020 11:28 PM - edited 11-09-2020 11:29 PM
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
11-27-2020 08:41 AM
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.
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!