Skip to content

Home

PaloAltoNetworks

pan-scm-cli: Command-line interface for managing Palo Alto Networks Strata Cloud Manager configurations

Contributors Forks Stars Issues License


Documentation: https://cdot65.github.io/pan-scm-cli/

Source Code: https://github.com/cdot65/pan-scm-cli


pan-scm-cli is a command-line interface tool for managing Palo Alto Networks Strata Cloud Manager configurations.

Installation

Requirements:

  • Python 3.10 or higher
$ pip install pan-scm-cli
---> 100%
Successfully installed pan-scm-cli

Key Features

  • Intuitive CLI Structure: Standardized command structure for easy learning and usage
  • Resource Management: Create, update, and delete SCM objects using simple commands
  • Bulk Operations: Apply configurations from YAML files for efficient batch processing
  • Validated Input: Built-in validation ensures configurations are properly formatted
  • Consistent Output: Standardized output format for all operations
  • Error Handling: Clear error messages to help identify and resolve issues
  • Dry Run Mode: Preview changes before applying them to your environment

Quick Start

Setting up your authentication credentials:

$ export SCM_CLIENT_ID="your_client_id"
$ export SCM_CLIENT_SECRET="your_client_secret"
$ export SCM_TSG_ID="your_tsg_id"

Example: Creating an Address Object

$ scm-cli set objects address \
    --folder Texas \
    --name webserver \
    --ip-netmask 192.168.1.100/32 \
    --description "Web server" \
    --tags ["server", "web"]
---> 100%
Created address: webserver in folder Texas

Example: Deleting an Address Object

$ scm-cli delete objects address --folder Texas --name webserver
---> 100%
Deleted address: webserver from folder Texas

Example: Loading Multiple Objects from YAML

$ scm-cli load objects address --file config/addresses.yml
---> 100%
Loading addresses from config/addresses.yml
Applied address: webserver in folder Texas
Applied address: database in folder Texas
Applied address: loadbalancer in folder Texas
Successfully applied 3 address objects

Command Structure

Commands in pan-scm-cli follow a consistent structure:

scm-cli <action> <resource-type> <resource> [options]

Where:

  • <action>: The operation to perform (set, delete, load)
  • <resource-type>: The category of resource (objects, deployment, network, security)
  • <resource>: The specific resource type (address, address-group, zone, etc.)
  • [options]: Resource-specific parameters and global options

Getting Started

To begin using pan-scm-cli, check out the Getting Started Guide which covers installation, configuration, and basic usage examples.

For detailed information about each command, refer to the CLI Reference section.

Contributing

Contributions are welcome and greatly appreciated. Visit the Contributing page for guidelines on how to contribute.

License

This project is licensed under the Apache 2.0 License - see the License page for details.