Skip to main content

Python library and CLI for the INDIGO PaaS Orchestrator.

Project description

orpy

Python library and CLI for the INDIGO PaaS Orchestrator.

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
>>> import pprint
>>> orpy = client.OrpyClient(
...     url=ORCHESTRATOR_URL,
...     token=ORCHESTRATOR_TOKEN)
>>> deployments = orpy.deployments.list()
>>> pprint.pprint(deployments[0])
{u'cloudProviderName': u'provider-BARI',
 u'createdBy': {u'issuer': u'https://iam.deep-hybrid-datacloud.eu/',
                u'subject': u'658e9821-af25-485e-a9e2-942c32c7ece8'},
 u'creationTime': u'2019-06-07T15:46+0000',
 u'links': [{u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e9893b-5e42-ea0d-9258-0242ac140005',
             u'rel': u'self'},
            {u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e9893b-5e42-ea0d-9258-0242ac140005/resources',
             u'rel': u'resources'},
            {u'href': u'https://paas.cloud.cnaf.infn.it/orchestrator/deployments/11e9893b-5e42-ea0d-9258-0242ac140005/template',
             u'rel': u'template'}],
 u'outputs': {},
 u'physicalId': u'11e9893b-5e42-ea0d-9258-0242ac140005',
 u'status': u'CREATE_IN_PROGRESS',
 u'task': u'NONE',
 u'updateTime': u'2019-06-07T15:46+0000',
 u'uuid': u'11e9893b-5e42-ea0d-9258-0242ac140005'}
>>>

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

orpy-0.2.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distributions

orpy-0.2.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

orpy-0.2.0-py2-none-any.whl (25.1 kB view details)

Uploaded Python 2

File details

Details for the file orpy-0.2.0.tar.gz.

File metadata

  • Download URL: orpy-0.2.0.tar.gz
  • Upload date:
  • Size: 36.5 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

Hashes for orpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 33ac734295adb0732dcc074af76f0b946386c1894948bad9c9ebb8124853db7f
MD5 8da1afeed1592e44d072889f6671e3db
BLAKE2b-256 8084c253c6df55f221aa9cf37507f53e75f18b1819223b8d5804a0d0bddb8179

See more details on using hashes here.

File details

Details for the file orpy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: orpy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 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

Hashes for orpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c8a530a7c98dbea5b6c285481d95c08719d67c15a2b83c62e1ada0dfa14811d
MD5 7d8f4585f9fbe98d3e14c5793d2038ff
BLAKE2b-256 336e86e80997f54a9a2c82bc932e0a0713d8d937046b46c0bff9d649422e216d

See more details on using hashes here.

File details

Details for the file orpy-0.2.0-py2-none-any.whl.

File metadata

  • Download URL: orpy-0.2.0-py2-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 2
  • 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

Hashes for orpy-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 76242ec22a6924fdd5874c9652eb62e8880d5c91095a2d16a4bc377ccdca5012
MD5 4ec9bc48c6f0851afa044903c6b03b88
BLAKE2b-256 51969fd0d4b215bbd733409b22f67c0d871abbf5770ea79a3e49504bed00c72a

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