Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Python - Check Panorama Template - Certificates expiration

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

Python - Check Panorama Template - Certificates expiration

L0 Member

Hello everyone, I hope you are doing well!

 

We had an issue with certificate that as expired on one of our customer's device.
I know it exist this Github : https://github.com/ip-life-net/palo-check-cert-expiry and it works flawlessly with one device but, I try to figure out how to do this on Panorama

I found the SDK and seems to be a good starting point but, it does not offer easy way to get the information.
After some search, I know I'll need to do it in two steps.

 

Step 1 : Get template from Panorama
Step 2 : Loop into each template and find the information.

 

Maybe I missed something, but can't see someone doing this already here and into the pan-os-python Github community.

I'm using Panorama 10.1.9-h1

 

Actually, I'm able to get template list with this code :

from panos.firewall import Firewall
from panos.panorama import Panorama, Template

host = "EDITED"
API_KEY = "EDITED"
pano = Panorama(host,api_key=API_KEY)
rawdata = pano.op('show templates',xml=True)
print(rawdata)

 

Someone did ever see this somewhere?

Thank you all and have a great day.

0 REPLIES 0
  • 1010 Views
  • 0 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!