Skip to main content

A command-line tool to clone configuration objects between Palo Alto Networks Strata Cloud Manager (SCM) tenants.

Project description

SCM Config Clone

Banner Image

Build Status PyPI version Python versions License

A command-line tool to clone configuration objects between Palo Alto Networks Strata Cloud Manager (SCM) tenants.

Table of Contents

Features

  • Effortless Cloning: Seamlessly clone address objects and address groups from one SCM tenant to another.
  • User-Friendly CLI: Built with Typer for an intuitive command-line experience.
  • Secure Authentication: Generate a .secrets.yaml file to securely store your SCM credentials.
  • Customizable Folders: Specify source and destination folders to organize your configurations.
  • Extensible Design: Structured to allow easy addition of new commands and features in the future.

Installation

Requirements:

  • Python 3.10 or higher

Install the package via pip:

pip install scm-config-clone

Usage

The scm-clone utility offers several commands:

Clone Address Objects

Clone address objects from the source SCM tenant to the destination tenant.

scm-clone clone-address-objects --settings-file <path_to_secrets_yaml>

Options:

  • --settings-file, -s: Path to the YAML file containing SCM credentials (default: .secrets.yaml).

Example:

scm-clone clone-address-objects

Sample Output:

Starting address objects migration...
Retrieved 15 address objects from source.
Successfully created 15 address objects in destination.
Address objects migration completed successfully.

Clone Address Groups

Clone address groups from the source SCM tenant to the destination tenant.

scm-clone clone-address-groups --settings-file <path_to_secrets_yaml>

Options:

  • --settings-file, -s: Path to the YAML file containing SCM credentials (default: .secrets.yaml).

Example:

scm-clone clone-address-groups

Sample Output:

Starting address groups migration...
Retrieved 8 address groups from source.
Successfully created 8 address groups in destination.
Address groups migration completed successfully.

Create Secrets File

Generate a .secrets.yaml file to store your SCM credentials securely.

scm-clone create-secrets-file --output-file <path_to_secrets_yaml>

Options:

  • --output-file, -o: Path where the secrets YAML file will be saved (default: .secrets.yaml).

Example:

scm-clone create-secrets-file

Sample Interaction:

Creating authentication file...
Enter source Strata Cloud Manager credentials:
Source Client ID: <your_source_client_id>
Source Client Secret: <your_source_client_secret>
Source Tenant TSG: <your_source_tsg>
Source Folder [Prisma Access]:
Enter destination Strata Cloud Manager credentials:
Destination Client ID: <your_destination_client_id>
Destination Client Secret: <your_destination_client_secret>
Destination Tenant TSG: <your_destination_tsg>
Destination Folder [Prisma Access]:
Token URL [https://auth.apps.paloaltonetworks.com/oauth2/access_token]:
Authentication file written to .secrets.yaml
Authentication file created successfully.

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to your branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Ensure your code adheres to the project's coding standards and includes tests where appropriate.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Support

For support and questions, please refer to the SUPPORT.md file in this repository.


Detailed documentation will be provided on our GitHub Pages site soon.

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

scm_config_clone-0.1.1.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

scm_config_clone-0.1.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file scm_config_clone-0.1.1.tar.gz.

File metadata

  • Download URL: scm_config_clone-0.1.1.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.5.0

File hashes

Hashes for scm_config_clone-0.1.1.tar.gz
Algorithm Hash digest
SHA256 01377ad71f5821374bfbc3686fac293bafb2ec7b98feeb3a12d786f1abe9d9ed
MD5 9c243e765349bf2e90ed6242412afab1
BLAKE2b-256 10a12c27412b30a2de9c2fb4dd9ea55f7b3b81f0f95f856a9a3a5cf9921e19fd

See more details on using hashes here.

File details

Details for the file scm_config_clone-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scm_config_clone-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7fd67ce84dfc6cf3e52acbe908e5209ec30f052287f962b64bb93dd9eb1ef0c
MD5 0776e653e1d67c99b147e813e1374d61
BLAKE2b-256 e274de706216fc0885ff3e699c2365bbf073204e3eec2474754a49382423422a

See more details on using hashes here.

Supported by

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