A command-line tool to clone configuration objects between Palo Alto Networks Strata Cloud Manager (SCM) tenants.
Project description
SCM Config Clone
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 between SCM tenants.clone-address-groups
: Clone address groups between SCM tenants.create-secrets-file
: Generate a secrets file for authentication.
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:
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to your branch (
git push origin feature/your-feature
). - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scm_config_clone-0.1.0.tar.gz
.
File metadata
- Download URL: scm_config_clone-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24673cd49fad94f417b00924887a691dea2a8e4a44806aef7d35e63fad761291 |
|
MD5 | 8ac42630b5357b67d546cad4de9ff8e7 |
|
BLAKE2b-256 | b43bdb89decd8c987617c2bb1982426b9aea854d91ffcfe84687156f1056af33 |
File details
Details for the file scm_config_clone-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: scm_config_clone-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a084dadadb3e25ee6c1c0cf8d16d768549a8082558127c0e7bcf7762ec0b543 |
|
MD5 | 2cbe741ad9b4b9dc14e06bf4014046df |
|
BLAKE2b-256 | 167626bd514dc3c7bb97d9405eb7a7e0debf8e2b4c6d8740f227e17800f396d6 |