Skip to main content

A command-line tool to find duplicate address objects across PAN-OS device groups

Project description

PAN-OS Duplicate Finder

Python versions License

pan-os-duplicate-finder is a command-line tool designed to identify duplicate address objects across Palo Alto Networks firewalls and Panorama device groups. This tool helps network administrators maintain cleaner configurations by identifying redundant address objects that could be consolidated.

Table of Contents

Features

  • Easy Setup: Store credentials and preferences in a settings.yaml file for reuse
  • Comprehensive Search: Scans both shared space and all device groups
  • Flexible Output: Generate CSV reports with detailed information about duplicates
  • Rich Console Output: Clear, colorful display of duplicate findings
  • Device Group Awareness: Track which device groups contain duplicate objects
  • Secure Credentials: Support for both direct credential input and settings file

Installation

Requirements:

  • Python 3.10 or higher

Install directly from PyPI:

pip install pan-os-duplicate-finder

Basic Usage

Once installed, the primary command is pan-os-duplicate-finder. Running --help displays available options and commands:

pan-os-duplicate-finder --help

Available commands include:

  • find: Find duplicate address objects
  • settings: Create a settings file
  • version: Show version information

Creating the Settings File

Before scanning for duplicates, you can create a settings.yaml file to store your credentials and preferences:

pan-os-duplicate-finder settings

This will create a template settings.yaml file that you can edit with your specific details:

hostname: ""        # Your Panorama or firewall hostname/IP
username: ""        # Your username
password: ""        # Your password
logging: "INFO"     # Logging level (INFO/DEBUG)
output_format: "csv"  # Output format for results

Finding Duplicates

With your settings configured, you can search for duplicate address objects:

# Using settings file
pan-os-duplicate-finder find

# Or provide credentials directly
pan-os-duplicate-finder find --hostname panorama.example.com --username admin

The tool will:

  1. Connect to your device
  2. Retrieve all address objects from shared space and device groups
  3. Analyze for duplicates
  4. Generate a CSV report
  5. Display a summary in the console

Example CSV output includes:

  • Object name
  • Device group location
  • Address value
  • Address type
  • Description
  • Duplicate group identifier

Example console output shows:

  • Total number of duplicates found
  • Summary table of duplicates by type
  • Device groups containing duplicates

Additional Options

# Enable debug logging
pan-os-duplicate-finder find --debug

# Specify output file
pan-os-duplicate-finder find --output my-report.csv

# Save debug logs to file
pan-os-duplicate-finder find --debug --log-file debug.log

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

pan-os-duplicate-finder is licensed under the Apache 2.0 License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pan_os_duplicate_finder-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pan_os_duplicate_finder-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file pan_os_duplicate_finder-0.1.0.tar.gz.

File metadata

  • Download URL: pan_os_duplicate_finder-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/24.1.0

File hashes

Hashes for pan_os_duplicate_finder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 615d1e47d8119933a119d5e9cc7bc90dff2def2fe91bd78cb20525b64fa9f403
MD5 3a61e436511dd2f5a3a1a098fe29cfb4
BLAKE2b-256 bacc577f6449326f00c9998b25bc92c4e7f83fa3eaa36ccbde5571d34fc518bb

See more details on using hashes here.

File details

Details for the file pan_os_duplicate_finder-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pan_os_duplicate_finder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a62344c492af2fd800fea9393c77f100bf3b61854ca126ac111516064a54ab9f
MD5 9f89189d2be7c5df36bc69bf723d1c7b
BLAKE2b-256 f4062dbb31373478dd467d66df4af63aa85409eb222961987063695e2837abae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page