CLI Reference¶
Policy Inspector provides the pins command-line interface for analyzing firewall policies.
Quick Start¶
# List available scenarios
pins list
# Run an example with sample data
pins run example shadowing-basic
# Run actual analysis on your Panorama
pins run shadowing --panorama-hostname your-panorama.company.com \
--panorama-username admin --device-groups "Production"
# Get help for any command
pins --help
pins run --help
Main Commands¶
The pins CLI has two main commands:
pins list- List available scenariospins run- Execute analysis scenarios
pins¶
PINS as Policy Inspector
pins [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
list¶
List available Scenarios.
pins list [OPTIONS]
Options
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
run¶
Execute a Scenario.
To see how it works, run one of the examples
``` pins run example
pins run [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
example¶
Run one of the examples.
pins run example [OPTIONS] {shadowing-basic|shadowing-multiple-
dg|shadowingvalue-basic|shadowingvalue-with-export}
Options
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Arguments
- EXAMPLE¶
Required argument
shadowing¶
Run shadowing analysis using Panorama data.
pins run shadowing [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
shadowingvalue¶
Run advanced shadowing analysis using Panorama data.
pins run shadowingvalue [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Command Groups¶
List Available Scenarios¶
pins list¶
List available Scenarios.
pins list [OPTIONS]
Options
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Run Scenarios¶
The run command group provides subcommands for executing different analysis scenarios:
pins run¶
Execute a Scenario.
To see how it works, run one of the examples
``` pins run example
pins run [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
example¶
Run one of the examples.
pins run example [OPTIONS] {shadowing-basic|shadowing-multiple-
dg|shadowingvalue-basic|shadowingvalue-with-export}
Options
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Arguments
- EXAMPLE¶
Required argument
shadowing¶
Run shadowing analysis using Panorama data.
pins run shadowing [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
shadowingvalue¶
Run advanced shadowing analysis using Panorama data.
pins run shadowingvalue [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Basic Shadowing Analysis¶
Run basic shadowing analysis:
pins run shadowing¶
Run shadowing analysis using Panorama data.
pins run shadowing [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Advanced Shadowing Analysis¶
Run advanced shadowing analysis with additional value checking:
pins run shadowingvalue¶
Run advanced shadowing analysis using Panorama data.
pins run shadowingvalue [OPTIONS]
Options
- --config <config>¶
Read configuration from YAML file
- Default:
config.yaml
- --panorama-verify-ssl <panorama_verify_ssl>¶
Verify SSL certificates
- --panorama-api-version <panorama_api_version>¶
PAN-OS API version
- --panorama-password <panorama_password>¶
Panorama password
- --panorama-username <panorama_username>¶
Panorama username
- --panorama-hostname <panorama_hostname>¶
Panorama hostname
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Example Execution¶
Run predefined examples with mock data:
pins run example¶
Run one of the examples.
pins run example [OPTIONS] {shadowing-basic|shadowing-multiple-
dg|shadowingvalue-basic|shadowingvalue-with-export}
Options
- -s, --show <show>¶
Output format (can be specified multiple times)
- -ed, --export-dir <export_dir>¶
Directory to save exported files (default: current directory)
- Default:
.
- -e, --export <export>¶
Export format (can be specified multiple times)
- --device-groups <device_groups>¶
Device groups to analyze (can be specified multiple times)
- -v, --verbose¶
More verbose and detailed output with each -v up to -vvvv
Arguments
- EXAMPLE¶
Required argument
Configuration Options¶
The CLI supports various configuration methods:
Environment Variables¶
PINS_PANORAMA_HOSTNAME: Panorama server hostnamePINS_PANORAMA_USERNAME: Username for authenticationPINS_PANORAMA_PASSWORD: Password for authenticationPINS_PANORAMA_API_VERSION: API version (default: v11.1)
Configuration File¶
Use --config option to specify a YAML configuration file:
panorama:
hostname: panorama.example.com
username: admin
password: secret
api_version: v11.1
verify_ssl: false
export:
output_dir: ./reports
formats:
- json
- html
show:
formats:
- table
- text
Command Line Options¶
All configuration can be overridden via command-line options. Use --help with any command to see available options.
Examples¶
Basic Usage¶
# List all available scenarios
pins list
# Run shadowing analysis with live Panorama
pins run shadowing --panorama-hostname panorama.example.com \
--panorama-username admin --device-groups "Production"
# Run example with table output
pins run example shadowing-basic --show table
# Export results to JSON
pins run example shadowingvalue-basic --export json --export-dir ./reports
Advanced Usage¶
# Run analysis on multiple device groups
pins run shadowing --panorama-hostname panorama.example.com \
--panorama-username admin \
--device-groups "DG1" "DG2" --show table
# Use configuration file
pins run shadowing --config config.yaml --show json --export html
# Run with specific API version
pins run shadowingvalue --panorama-hostname panorama.local \
--panorama-api-version v10.2 --device-groups "Production"
Exit Codes¶
0: Success1: General error2: Configuration error3: Connection error
Troubleshooting¶
Common Issues¶
Authentication Failures:
# Verify credentials
pins run shadowing --panorama-hostname your-panorama \
--panorama-username admin --device-groups "Production" --show text
SSL Certificate Issues:
# Disable SSL verification
pins run shadowing --panorama-hostname panorama.local \
--panorama-no-verify-ssl --device-groups "Production"
Configuration Problems:
# Validate configuration file
pins run example shadowing-basic --config your-config.yaml
Debug Mode¶
Enable verbose logging for troubleshooting:
pins --verbose run shadowing --panorama-hostname panorama.example.com \
--device-groups "Production"
See Also¶
Configuration - Detailed configuration guide
Usage Guide - Usage examples and patterns
Basic Usage Examples - Basic usage examples
API Reference - API reference documentation