how to retreive predefined Applications from Panorama using Pan-OS-python
cancel
Showing results for 
Search instead for 
Did you mean: 

how to retreive predefined Applications from Panorama using Pan-OS-python

L0 Member
I am getting "None".  Need some help to figure out what is missing here.
 
pano = Panorama('192.168.1.1''user''pwd'
def CheckPaloAddressGroup():
    originalPredefined(pano)
    pano.add(original)
    app_list = original.refreshall_applications()
    print(app_list)
 
 
1 ACCEPTED SOLUTION

Accepted Solutions

L4 Transporter

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()),
)

 

View solution in original post

2 REPLIES 2

L4 Transporter

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()),
)

 

View solution in original post

L0 Member

Thank you Gfreeman. I was able to retrieve the predefined application.

Pretty excited that that the forum is alive - got the help pretty quick!!. 

 

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!