Python library and CLI for the INDIGO PaaS Orchestrator.
Project description
orpy
Python library and CLI for the INDIGO PaaS Orchestrator.
- Free software: Apache License 2.0
- Source: https://github.com/indigo-dc/orpy
- Documentation: https://orpy.readthedocs.io/
- Bugs: https://github.com/indigo-dc/orpy/issues
Installation.
You can install it directly from PyPI
pip install orpy
Usage as CLI
Before using the orchestrator with orpy you need to export your IAM access token. As long as the access token is valid orchent can tell the orchestrator what to do.
export ORCHESTRATOR_TOKEN=<your access token here>
usage: orpy [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
[--url <orchestrator-url>]
Command line client for the INDIGO PaaS Orchestrator.
Please, before using this command put your a valid OpenID Connnect access
token into the ORCHESTRATOR_TOKEN environment variable, so that we can use
this token for authentication.
optional arguments:
--version show program's version number and exit
-v, --verbose Increase verbosity of output. Can be repeated.
-q, --quiet Suppress output except warnings and errors.
--log-file LOG_FILE Specify a file to log output. Disabled by default.
-h, --help Show help message and exit.
--debug Show tracebacks on errors.
--url <orchestrator-url>
The base url of the orchestrator rest interface.
Alternative the environment variable ORCHESTRATOR_URL
can be used.
Commands:
complete print bash completion command (cliff)
dep create Create a deployment.
dep delete Show details about an existing deployment.
dep list List existing deployments at orchestrator.
dep show Show details about an existing deployment.
dep template Get template used for a given deployment.
dep update Update an existing deployment.
deployment create Create a deployment.
deployment delete Show details about an existing deployment.
deployment list List existing deployments at orchestrator.
deployment show Show details about an existing deployment.
deployment template Get template used for a given deployment.
deployment update Update an existing deployment.
help print detailed help for another command (cliff)
resources list List Resources for a given deployment.
resources show Show details about a resource for a given deployment.
test Test if the given URL is pointing to an orchestrator.
Usage as API
Besides being a CLI application, orpy
can be used as a library:
>>> from orpy.client import client
>>> orpy = client.OrpyClient(
... url=ORCHESTRATOR_URL,
... token=ORCHESTRATOR_TOKEN)
>>> deployments = orpy.deployments.list()
>>> deployments[0]
<Deployment cloudProviderName=provider-BARI, createdBy={u'subject': u'de28e179-ec86-4915-a748-7a37f8d80311', u'issuer': u'https://iam.deep-hybrid-datacloud.eu/'}, creationTime=2019-05-27T11:31+0000, links=[{u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e98073-06f3-6797-9258-0242ac140005', u'rel': u'self'}, {u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e98073-06f3-6797-9258-0242ac140005/resources', u'rel': u'resources'}, {u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e98073-06f3-6797-9258-0242ac140005/template', u'rel': u'template'}], outputs={}, physicalId=11e98073-06f3-6797-9258-0242ac140005, status=CREATE_FAILED, statusReason=Error while checking the deployment status; nested exception is feign.RetryableException: mesos.ui.sav.sk executing GET https://mesos.ui.sav.sk/marathon/v2/groups/11e98073-06f3-6797-9258-0242ac140005, task=NONE, updateTime=2019-05-29T02:05+0000, uuid=11e98073-06f3-6797-9258-0242ac140005>
>>> deployments[0].status
CREATE_FAILED
>>>
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
orpy-0.4.0.tar.gz
(50.4 kB
view details)
Built Distribution
orpy-0.4.0-py3-none-any.whl
(26.9 kB
view details)
File details
Details for the file orpy-0.4.0.tar.gz
.
File metadata
- Download URL: orpy-0.4.0.tar.gz
- Upload date:
- Size: 50.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf397e029a608e0b8f986ac0471e37e0fc362f901e5854da70cff963df28ca9a |
|
MD5 | 8f2e09de38a98a4dbb7c5682e753d0df |
|
BLAKE2b-256 | a4466225b7927bf4c7d8907ed220bc2e8ca237670bcc0c3d5ac15b1a3bc27321 |
File details
Details for the file orpy-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: orpy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56959082dab483dc452fe8c5824ef00e1b673219b3804e7fee9e2393812b635b |
|
MD5 | 4ead12ec259c0fccfbab56bec1d97e20 |
|
BLAKE2b-256 | 54a1fc454bc6f5928d8ab63bf491620c77cb1d0762e4afad5f19de955d4d91a5 |