Name | scm-config-clone JSON |
Version |
0.3.2
JSON |
| download |
home_page | None |
Summary | A command-line tool to clone configuration objects between Palo Alto Networks Strata Cloud Manager (SCM) tenants. |
upload_time | 2025-07-18 16:29:18 |
maintainer | None |
docs_url | None |
author | Calvin Remsburg |
requires_python | <4.0,>=3.10 |
license | Apache 2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SCM Config Clone

[](https://github.com/cdot65/scm-config-clone/actions/workflows/ci.yml)
[](https://badge.fury.io/py/scm-config-clone)
[](https://pypi.org/project/scm-config-clone/)
[](https://github.com/cdot65/scm-config-clone/blob/main/LICENSE)
`scm-config-clone` is a command-line tool designed to seamlessly clone configuration objects between Palo Alto Networks
Strata Cloud Manager (SCM) tenants. From addresses and tags to application groups and security rules, this tool
streamlines migration tasks and reduces manual errors.
## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Docker](#docker)
- [Basic Usage](#basic-usage)
- [Creating the Settings File](#creating-the-settings-file)
- [Cloning Objects](#cloning-objects)
- [Testing](#testing)
- [Further Reading](#further-reading)
- [Contributing](#contributing)
- [License](#license)
## Features
- **Simple Setup**: Store credentials and defaults in a `settings.yaml` file for reuse.
- **Robust Cloning**: Supports multiple object types (addresses, tags, services, security rules, IKE & IPsec VPN configurations, and more).
- **Extensive Filters**: Exclude specific folders, snippets, or devices to narrow down cloned objects.
- **Flexible Controls**: Run in `dry-run` mode, auto-approve changes, suppress console output, and create reports.
- **Commit & Push**: Automatically commit changes after objects are cloned.
## Installation
**Requirements**:
- Python 3.10 or higher
Install directly from PyPI:
```bash
pip install scm-config-clone
```
## Docker
### Build Locally
```powershell
# From repository root
docker build -t scm-config-clone -f ./docker/Dockerfile .
```
### Pull from GitHub Container Registry
```powershell
docker pull ghcr.io/cdot65/scm-config-clone:latest
```
### Run the CLI
```powershell
docker run --rm ghcr.io/cdot65/scm-config-clone --help
```
### Create a settings.yaml (Windows example)
`scm-clone` stores credentials in a `settings.yaml`. If you prefer, copy `settings.example.yaml` to `settings.yaml` and edit manually.
To generate it interactively, mount the current working directory into `/app` inside the container:
```powershell
# PowerShell (directory on Windows drive, e.g. C:)
docker run -it --rm -v "${PWD}:/app" ghcr.io/cdot65/scm-config-clone settings
# Windows CMD
docker run --rm -v "%cd%":/app ghcr.io/cdot65/scm-config-clone settings
```
A `settings.yaml` will be generated in your current directory. Subsequent commands should include the same mount so the CLI can read the file.
### Working example (clone addresses)
```powershell
PS C:\Users\cdot\Documents> docker run -it --rm -v "${PWD}:/app" ghcr.io/cdot65/scm-config-clone addresses
๐ Starting address objects cloning...
Name of source folder where objects are located: Austin
Name of destination folder where objects will go: Texas
INFO:scm_config_clone.commands.objects.address:Authenticated with source SCM tenant: 1527824794
INFO:scm_config_clone.commands.objects.address:Authenticated with destination SCM tenant: 1540792209
INFO:scm_config_clone.commands.objects.address:Retrieved 47 address objects from source folder 'Austin'.
INFO:scm_config_clone.commands.objects.address:Retrieved 15248 objects from destination folder 'Texas'
โโโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโโโโ
โ Name โ Destination Status โ
โโโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโก
โ snippet-object-1-1 โ x โ
โ snippet-object-1 โ x โ
โ snippet-object-2 โ x โ
โ snippet-object-3 โ x โ
โ dhcp_pool โ x โ
โ bulk_address_1 โ x โ
โ bulk_address_2 โ x โ
โ bulk_address_3 โ x โ
โ bulk_address_4 โ x โ
โ bulk_address_5 โ x โ
โ bulk_address_6 โ x โ
โ bulk_address_7 โ x โ
โ bulk_address_8 โ x โ
โ bulk_address_9 โ x โ
โ bulk_address_10 โ x โ
โ bulk_address_11 โ x โ
โ bulk_address_12 โ x โ
โ bulk_address_13 โ x โ
โ bulk_address_14 โ x โ
โ bulk_address_15 โ x โ
โ bulk_address_16 โ x โ
โ bulk_address_17 โ x โ
โ bulk_address_18 โ x โ
โ bulk_address_19 โ x โ
โ bulk_address_20 โ x โ
โ bulk_address_21 โ x โ
โ bulk_address_22 โ x โ
โ bulk_address_23 โ x โ
โ bulk_address_24 โ x โ
โ bulk_address_25 โ x โ
โ bulk_address_26 โ x โ
โ bulk_address_27 โ x โ
โ bulk_address_28 โ x โ
โ bulk_address_29 โ x โ
โ bulk_address_30 โ x โ
โ bulk_address_31 โ x โ
โ bulk_address_32 โ x โ
โ bulk_address_33 โ x โ
โ bulk_address_34 โ x โ
โ bulk_address_35 โ x โ
โ bulk_address_36 โ x โ
โ bulk_address_37 โ x โ
โ bulk_address_38 โ x โ
โ bulk_address_39 โ x โ
โ bulk_address_40 โ x โ
โ bulk_address_41 โ x โ
โ bulk_address_42 โ x โ
โโโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโโโโ
Do you want to proceed with creating these objects in the destination tenant? [y/N]: y
INFO:scm_config_clone.commands.objects.address:No new address objects were created, skipping commit.
๐ Address objects cloning completed successfully! ๐
```
### Interactive settings file creation (full flow)
```powershell
PS C:\Users\you\Documents> docker run -it --rm -v "${PWD}:/app" ghcr.io/cdot65/scm-config-clone settings
# ...interactive prompts...
๐ Setup complete! ๐
```
### Docker Usage
From this point forward, you will need to mount your local `settings.yaml` file into the container at `/app/settings.yaml`.
```powershell
PS C:\Users\you\Documents> docker run -it --rm -v "${PWD}:/app" ghcr.io/cdot65/scm-config-clone addresses --source-folder "Texas"
```
## Basic Usage
Once installed, the primary command is `scm-clone`. Running `--help` displays global options and available sub-commands:
```bash
scm-clone --help
```
Youโll see a list of commands like `addresses`, `tags`, `services`, `security-rules`, and `settings`.
## Creating the Settings File
Before cloning, create a `settings.yaml` file to store SCM credentials and defaults:
```bash
scm-clone settings
```
Youโll be prompted for source/destination credentials, logging level, and defaults for `auto_approve`, `create_report`,
`dry_run`, and `quiet`. Once done, `settings.yaml` will be created in the current directory. Subsequent commands read
from it, eliminating the need to re-enter credentials or defaults.
## Cloning Objects
With `settings.yaml` ready, cloning objects typically involves specifying a folder and object type. For example, to
clone address objects:
```bash
scm-clone addresses --source-folder "Texas"
```
If `auto_approve` is disabled by default in `settings.yaml`, youโll be prompted before actual creation. If you wish to
override this at runtime:
```bash
scm-clone addresses --source-folder "Texas" -A
```
This command auto-approves without prompting. Similarly, to run in dry-run mode or commit after creation:
```bash
scm-clone addresses --source-folder "Texas" -D --commit-and-push
```
This simulates the creation without applying changes (`-D`) and would commit changes if actually applied. Remove `-D` to
run it for real.
## Testing
The project includes a comprehensive test suite with both unit and integration tests. Tests are written using pytest and use Factory Boy for creating test objects.
To run the tests:
```bash
# Install development dependencies
poetry install
# Run all tests with coverage
./run_tests.sh
# Run only unit tests
./run_tests.sh unit
# Run only integration tests
./run_tests.sh integration
```
For more details about the test suite, see [tests/README.md](tests/README.md).
## Further Reading
- [Commands Reference](https://cdot65.github.io/scm-config-clone/user-guide/python/commands/): Detailed command flags,
workflows, and parameters.
- [Examples](https://cdot65.github.io/scm-config-clone/user-guide/python/examples/): Practical, real-world usage
patterns and integrations.
- [Getting Started](https://cdot65.github.io/scm-config-clone/user-guide/python/getting-started/): Step-by-step guide to
initial setup and cloning workflows.
## Contributing
Contributions are welcome! Please see the [CONTRIBUTING](CONTRIBUTING.md) file for guidelines.
## License
`scm-config-clone` is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "scm-config-clone",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Calvin Remsburg",
"author_email": "calvin@cdot.io",
"download_url": "https://files.pythonhosted.org/packages/e2/23/24f23deca2b7aa56d38e62f60f0e7f0e9f5bbfec390eec75da58f23a3aac/scm_config_clone-0.3.2.tar.gz",
"platform": null,
"description": "# SCM Config Clone\n\n\n\n[](https://github.com/cdot65/scm-config-clone/actions/workflows/ci.yml)\n[](https://badge.fury.io/py/scm-config-clone)\n[](https://pypi.org/project/scm-config-clone/)\n[](https://github.com/cdot65/scm-config-clone/blob/main/LICENSE)\n\n`scm-config-clone` is a command-line tool designed to seamlessly clone configuration objects between Palo Alto Networks\nStrata Cloud Manager (SCM) tenants. From addresses and tags to application groups and security rules, this tool\nstreamlines migration tasks and reduces manual errors.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Docker](#docker)\n- [Basic Usage](#basic-usage)\n- [Creating the Settings File](#creating-the-settings-file)\n- [Cloning Objects](#cloning-objects)\n- [Testing](#testing)\n- [Further Reading](#further-reading)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- **Simple Setup**: Store credentials and defaults in a `settings.yaml` file for reuse.\n- **Robust Cloning**: Supports multiple object types (addresses, tags, services, security rules, IKE & IPsec VPN configurations, and more).\n- **Extensive Filters**: Exclude specific folders, snippets, or devices to narrow down cloned objects.\n- **Flexible Controls**: Run in `dry-run` mode, auto-approve changes, suppress console output, and create reports.\n- **Commit & Push**: Automatically commit changes after objects are cloned.\n\n## Installation\n\n**Requirements**:\n\n- Python 3.10 or higher\n\nInstall directly from PyPI:\n\n```bash\npip install scm-config-clone\n```\n\n## Docker\n\n### Build Locally\n\n```powershell\n# From repository root\ndocker build -t scm-config-clone -f ./docker/Dockerfile .\n```\n\n### Pull from GitHub Container Registry\n\n```powershell\ndocker pull ghcr.io/cdot65/scm-config-clone:latest\n```\n\n### Run the CLI\n\n```powershell\ndocker run --rm ghcr.io/cdot65/scm-config-clone --help\n```\n\n### Create a settings.yaml (Windows example)\n\n`scm-clone` stores credentials in a `settings.yaml`. If you prefer, copy `settings.example.yaml` to `settings.yaml` and edit manually.\n\nTo generate it interactively, mount the current working directory into `/app` inside the container:\n\n```powershell\n# PowerShell (directory on Windows drive, e.g. C:)\ndocker run -it --rm -v \"${PWD}:/app\" ghcr.io/cdot65/scm-config-clone settings\n\n# Windows CMD\ndocker run --rm -v \"%cd%\":/app ghcr.io/cdot65/scm-config-clone settings\n```\n\nA `settings.yaml` will be generated in your current directory. Subsequent commands should include the same mount so the CLI can read the file.\n\n### Working example (clone addresses)\n\n```powershell\nPS C:\\Users\\cdot\\Documents> docker run -it --rm -v \"${PWD}:/app\" ghcr.io/cdot65/scm-config-clone addresses\n\ud83d\ude80 Starting address objects cloning...\nName of source folder where objects are located: Austin\nName of destination folder where objects will go: Texas\nINFO:scm_config_clone.commands.objects.address:Authenticated with source SCM tenant: 1527824794\nINFO:scm_config_clone.commands.objects.address:Authenticated with destination SCM tenant: 1540792209\nINFO:scm_config_clone.commands.objects.address:Retrieved 47 address objects from source folder 'Austin'.\nINFO:scm_config_clone.commands.objects.address:Retrieved 15248 objects from destination folder 'Texas'\n\u2552\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2564\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2555\n\u2502 Name \u2502 Destination Status \u2502\n\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n\u2502 snippet-object-1-1 \u2502 x \u2502\n\u2502 snippet-object-1 \u2502 x \u2502\n\u2502 snippet-object-2 \u2502 x \u2502\n\u2502 snippet-object-3 \u2502 x \u2502\n\u2502 dhcp_pool \u2502 x \u2502\n\u2502 bulk_address_1 \u2502 x \u2502\n\u2502 bulk_address_2 \u2502 x \u2502\n\u2502 bulk_address_3 \u2502 x \u2502\n\u2502 bulk_address_4 \u2502 x \u2502\n\u2502 bulk_address_5 \u2502 x \u2502\n\u2502 bulk_address_6 \u2502 x \u2502\n\u2502 bulk_address_7 \u2502 x \u2502\n\u2502 bulk_address_8 \u2502 x \u2502\n\u2502 bulk_address_9 \u2502 x \u2502\n\u2502 bulk_address_10 \u2502 x \u2502\n\u2502 bulk_address_11 \u2502 x \u2502\n\u2502 bulk_address_12 \u2502 x \u2502\n\u2502 bulk_address_13 \u2502 x \u2502\n\u2502 bulk_address_14 \u2502 x \u2502\n\u2502 bulk_address_15 \u2502 x \u2502\n\u2502 bulk_address_16 \u2502 x \u2502\n\u2502 bulk_address_17 \u2502 x \u2502\n\u2502 bulk_address_18 \u2502 x \u2502\n\u2502 bulk_address_19 \u2502 x \u2502\n\u2502 bulk_address_20 \u2502 x \u2502\n\u2502 bulk_address_21 \u2502 x \u2502\n\u2502 bulk_address_22 \u2502 x \u2502\n\u2502 bulk_address_23 \u2502 x \u2502\n\u2502 bulk_address_24 \u2502 x \u2502\n\u2502 bulk_address_25 \u2502 x \u2502\n\u2502 bulk_address_26 \u2502 x \u2502\n\u2502 bulk_address_27 \u2502 x \u2502\n\u2502 bulk_address_28 \u2502 x \u2502\n\u2502 bulk_address_29 \u2502 x \u2502\n\u2502 bulk_address_30 \u2502 x \u2502\n\u2502 bulk_address_31 \u2502 x \u2502\n\u2502 bulk_address_32 \u2502 x \u2502\n\u2502 bulk_address_33 \u2502 x \u2502\n\u2502 bulk_address_34 \u2502 x \u2502\n\u2502 bulk_address_35 \u2502 x \u2502\n\u2502 bulk_address_36 \u2502 x \u2502\n\u2502 bulk_address_37 \u2502 x \u2502\n\u2502 bulk_address_38 \u2502 x \u2502\n\u2502 bulk_address_39 \u2502 x \u2502\n\u2502 bulk_address_40 \u2502 x \u2502\n\u2502 bulk_address_41 \u2502 x \u2502\n\u2502 bulk_address_42 \u2502 x \u2502\n\u2558\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2567\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255b\nDo you want to proceed with creating these objects in the destination tenant? [y/N]: y\nINFO:scm_config_clone.commands.objects.address:No new address objects were created, skipping commit.\n\ud83c\udf89 Address objects cloning completed successfully! \ud83c\udf89\n```\n\n### Interactive settings file creation (full flow)\n\n```powershell\nPS C:\\Users\\you\\Documents> docker run -it --rm -v \"${PWD}:/app\" ghcr.io/cdot65/scm-config-clone settings\n# ...interactive prompts...\n\ud83c\udf89 Setup complete! \ud83c\udf89\n```\n\n### Docker Usage\n\nFrom this point forward, you will need to mount your local `settings.yaml` file into the container at `/app/settings.yaml`.\n\n```powershell\nPS C:\\Users\\you\\Documents> docker run -it --rm -v \"${PWD}:/app\" ghcr.io/cdot65/scm-config-clone addresses --source-folder \"Texas\"\n```\n\n\n\n\n## Basic Usage\n\nOnce installed, the primary command is `scm-clone`. Running `--help` displays global options and available sub-commands:\n\n```bash\nscm-clone --help\n```\n\nYou\u2019ll see a list of commands like `addresses`, `tags`, `services`, `security-rules`, and `settings`.\n\n## Creating the Settings File\n\nBefore cloning, create a `settings.yaml` file to store SCM credentials and defaults:\n\n```bash\nscm-clone settings\n```\n\nYou\u2019ll be prompted for source/destination credentials, logging level, and defaults for `auto_approve`, `create_report`,\n`dry_run`, and `quiet`. Once done, `settings.yaml` will be created in the current directory. Subsequent commands read\nfrom it, eliminating the need to re-enter credentials or defaults.\n\n## Cloning Objects\n\nWith `settings.yaml` ready, cloning objects typically involves specifying a folder and object type. For example, to\nclone address objects:\n\n```bash\nscm-clone addresses --source-folder \"Texas\"\n```\n\nIf `auto_approve` is disabled by default in `settings.yaml`, you\u2019ll be prompted before actual creation. If you wish to\noverride this at runtime:\n\n```bash\nscm-clone addresses --source-folder \"Texas\" -A\n```\n\nThis command auto-approves without prompting. Similarly, to run in dry-run mode or commit after creation:\n\n```bash\nscm-clone addresses --source-folder \"Texas\" -D --commit-and-push\n```\n\nThis simulates the creation without applying changes (`-D`) and would commit changes if actually applied. Remove `-D` to\nrun it for real.\n\n## Testing\n\nThe project includes a comprehensive test suite with both unit and integration tests. Tests are written using pytest and use Factory Boy for creating test objects.\n\nTo run the tests:\n\n```bash\n# Install development dependencies\npoetry install\n\n# Run all tests with coverage\n./run_tests.sh\n\n# Run only unit tests\n./run_tests.sh unit\n\n# Run only integration tests\n./run_tests.sh integration\n```\n\nFor more details about the test suite, see [tests/README.md](tests/README.md).\n\n## Further Reading\n\n- [Commands Reference](https://cdot65.github.io/scm-config-clone/user-guide/python/commands/): Detailed command flags,\n workflows, and parameters.\n- [Examples](https://cdot65.github.io/scm-config-clone/user-guide/python/examples/): Practical, real-world usage\n patterns and integrations.\n- [Getting Started](https://cdot65.github.io/scm-config-clone/user-guide/python/getting-started/): Step-by-step guide to\n initial setup and cloning workflows.\n\n## Contributing\n\nContributions are welcome! Please see the [CONTRIBUTING](CONTRIBUTING.md) file for guidelines.\n\n## License\n\n`scm-config-clone` is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for more details.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A command-line tool to clone configuration objects between Palo Alto Networks Strata Cloud Manager (SCM) tenants.",
"version": "0.3.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "668821293782567e6d600567af136c5119a2edb803e910e02780c599d96c664d",
"md5": "941e43c9b3bb68fc8f75c0b38b064f09",
"sha256": "decab3557abdc979afad08bacbe34653cd5a2192fe44bd1ee48db7e0f81208eb"
},
"downloads": -1,
"filename": "scm_config_clone-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "941e43c9b3bb68fc8f75c0b38b064f09",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 160027,
"upload_time": "2025-07-18T16:29:17",
"upload_time_iso_8601": "2025-07-18T16:29:17.222843Z",
"url": "https://files.pythonhosted.org/packages/66/88/21293782567e6d600567af136c5119a2edb803e910e02780c599d96c664d/scm_config_clone-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e22324f23deca2b7aa56d38e62f60f0e7f0e9f5bbfec390eec75da58f23a3aac",
"md5": "26f5bc43266c4e6c203f11c7b40302c4",
"sha256": "a0c1f9fdfc5fa86f3c3eeb2fc582e75bc662408465fb0e81011d19ff545761bc"
},
"downloads": -1,
"filename": "scm_config_clone-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "26f5bc43266c4e6c203f11c7b40302c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 41204,
"upload_time": "2025-07-18T16:29:18",
"upload_time_iso_8601": "2025-07-18T16:29:18.478382Z",
"url": "https://files.pythonhosted.org/packages/e2/23/24f23deca2b7aa56d38e62f60f0e7f0e9f5bbfec390eec75da58f23a3aac/scm_config_clone-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 16:29:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "scm-config-clone"
}