We have several firewall managed via Panorama. I want to pull the rulebase from each firewall to get the Hit Count and Last Hit date. I've got partial script, but I'm lost on accessing dict.
Here are the two links that I've been using:
from panos.firewall import Firewall
from panos.policies import Rulebase, SecurityRule, RulebaseHitCount
HOSTNAME = ""
USERNAME = " "
PASSWORD = " "
fw = panos.firewall.Firewall(HOSTNAME, USERNAME, PASSWORD)
rulebase = RulebaseHitCount('security', rules=None, all_rules=False)
opstate namespace hanging off of the
panos.policies.SecurityRule instance. There's a whole section of the documentation devoted to opstate stuff, you can see it here:
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!