API call to Panorama to get active Firewall and Management IP Address?

cancel
Showing results for 
Search instead for 
Did you mean: 

API call to Panorama to get active Firewall and Management IP Address?

L0 Member

I am working on a Python automation project that will accept a user entering an IP address, then making API calls to Panorama to find the IP in the network.

 

So far, I'm able to call the Panorama API call to get aggregate interfaces and ethernet interfaces - and build a dictionary of where subnets are - with their site.  Now that I know the subnetwork, I want to call the active firewall at that site, and get the ARP entry for the IP the user entered.

 

I'd like to know which firewall is active at the site, and the management IP of it, to make a call directly to it, to retrieve the ARP information.

I cannot find where to get the firewall status or the management IP - through the Panorama API.  Is it even available through the API?  Or would I need to use the pan-os-python SDK?

1 REPLY 1

L0 Member

Hi,

I would say pan-os-python SDK is the best option, and there is a method, refresh_devices, inside of panorama module which should give the HA peer relationships. I've tried to write a simple script to get that information but until now i didn't understood how.

 

 

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!