PaloAltoNetworks / PaloAltoNetworks/pan-os-python
How to get "global find" functionality with pan-os-python
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 400
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
Within PAN GUI, we can utilize the global find feature to identify the references of an object. Is there a way to mimic this behavior with pan-os-python?
As a specific example, let's say we have an AddressObject variable "addr" which points to an AddressObject, and we know that this object is referenced in three security PreRules across three different DeviceGroups in our PAN config. How can we obtain the rules in which this AddressObject is used?
In case there is an easier way to accomplish my end goal: I am trying to perform cleanup of duplicate AddressObjects (different names, same value). To do this, I am finding all duplicates, selecting one to keep, and wanting to replace all references of the old duplicate Address with the master address, then delete it. If there is a simpler way to accomplish the end goal, I am open to it.
Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing the pan-os-python object model and how AddressObject, security PreRules, and DeviceGroups are represented, then determine whether reference discovery or duplicate cleanup is the intended feature. Done means a clearly defined way to find references and safely replace or remove duplicate AddressObjects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100