Py Control Repository - Python SDK for Puppet Control Repository
Py Control Repository is SDK for Pyththon which allows developpers to manage a Puppet Control Repository based on GitHub.
Install
$ pip install py-control-repository
Usage
Get Puppet Environment
control_repository = ControlRepository('myorga', 'my_control_repository', 'token')
puppet_environment = control_repository.get_environment('production')
Get all Puppet Environment
Returns the list of all Puppet Environment.
control_repository = ControlRepository('myorga', 'my_control_repository', 'token')
puppet_environments = control_repository.get_environments()
Get all Puppet Environment names
Returns the list of all Puppet Environment names.
control_repository = ControlRepository('myorga', 'my_control_repository', 'token')
puppet_environment_names = control_repository.get_environment_names()
Create a Puppet Environment
Returns the new Puppet Environment.
control_repository = ControlRepository('myorga', 'my_control_repository', 'token')
new_puppet_environments = control_repository.create_environment('source_environment_name',
'new_environment_name')
Get Puppetfile
puppetfile = puppet_environment.get_puppetfile()
List Puppet modules in Puppetfile
module_list = puppetfile.list_modules()
Add a forge module
puppetfile.add_forge_module('puppetlabs/apache', version='0.10.1')
Update a forge module
puppetfile.update_forge_module('puppetlabs/apache', '0.11.0')
Remove a forge module
puppetfile.remove_forge_module('puppetlabs/apache')
Add a git module
With no version spicified, it will install the current master branch.
puppetfile.add_git_module('custom_module', 'https://url.my.git/orga/custom_module')
You can specify a specific git reference. Supported are :
branch
ref
tag
commit
puppetfile.add_git_module('custom_module',
'https://url.my.git/orga/custom_module',
reference_type='commit',
reference='ae1fe')
Update a git module
Bump module version
puppetfile.update_git_module('mymodule', '12.0.2')
You can also change a module reference type and its value.
For example you have a module deployed by its master branch and want to track it by a specific tag.
puppetfile.update_git_module('mymodule', '1.0.0', reference_type='tag')
Remove a git module
puppetfile.remove_git_module('apache')
Metadata
Release files for py-control-repository 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_control_repository-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for py_control_repository-1.0.0-py3-none-any.whl |
Release files / py_control_repository-1.0.0-py3-none-any.whl
| Download URL | py_control_repository-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59fbd68c006679f072082c671b4a6f70221681fd94ffa03604dc1b94b1f4fb90
|
|
BLAKE2b-256 checksum How to use checksums |
796d64ab341c58b873ef9cd2696dce039518c6ce1ff1da1a075e9bdc6f114b53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.7
|
Security for py-control-repository 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.