04-23-2021 09:54 AM
Predefined objects are retrieved from the predefined
namespace that is attached to the Panorama and Firewall namespaces. Also when invoking the refreshall_*
methods, they don't return results like object refreshall
functions, you have to access the results from the appropriate param on the predefined namespace itself:
from panos.panorama import Panorama
pano = Panorama("192.168.1.1", "admin", "admin")
pano.predefined.refreshall_applications()
print("Applications: {0}".format(
pano.predefined.application_objects.keys()),
)
print("Application Containers: {0}".format(
pano.predefined.application_container_objects.keys()),
)