# orpy
Python library and CLI for the INDIGO PaaS Orchestrator.
<img src="https://marketplace.deep-hybrid-datacloud.eu/images/logo-deep.png" width=200 alt="DEEP-Hybrid-DataCloud logo"/>
* 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>
Please check the [documentation](https://docs.deep-hybrid-datacloud.eu/projects/orpy/en/stable/user/shell.html)
for more details on how to set the credentials.
Then, the usage is as follows:
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
>>>
Raw data
{
"_id": null,
"home_page": "https://github.com/indigo-dc/orpy",
"name": "orpy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Alvaro Lopez Garcia",
"author_email": "aloga@ifca.unican.es",
"download_url": "https://files.pythonhosted.org/packages/21/34/9fbaeba9a38037f59937796e241f2f82810ebf1fa414948ba42945d888a8/orpy-1.0.4.tar.gz",
"platform": null,
"description": "# orpy\n\nPython library and CLI for the INDIGO PaaS Orchestrator.\n\n<img src=\"https://marketplace.deep-hybrid-datacloud.eu/images/logo-deep.png\" width=200 alt=\"DEEP-Hybrid-DataCloud logo\"/>\n\n* Free software: Apache License 2.0\n* Source: https://github.com/indigo-dc/orpy\n* Documentation: https://orpy.readthedocs.io/\n* Bugs: https://github.com/indigo-dc/orpy/issues\n\n## Installation.\n\nYou can install it directly from PyPI:\n\n pip install orpy\n\n## Usage as CLI\n\nBefore using the orchestrator with orpy you need to export your IAM access\ntoken. As long as the access token is valid orchent can tell the orchestrator\nwhat to do.\n\n export ORCHESTRATOR_TOKEN=<your access token here>\n\nPlease check the [documentation](https://docs.deep-hybrid-datacloud.eu/projects/orpy/en/stable/user/shell.html)\nfor more details on how to set the credentials.\n\nThen, the usage is as follows:\n\n usage: orpy [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]\n [--url <orchestrator-url>]\n\n Command line client for the INDIGO PaaS Orchestrator.\n\n Please, before using this command put your a valid OpenID Connnect access\n token into the ORCHESTRATOR_TOKEN environment variable, so that we can use\n this token for authentication.\n\n\n optional arguments:\n --version show program's version number and exit\n -v, --verbose Increase verbosity of output. Can be repeated.\n -q, --quiet Suppress output except warnings and errors.\n --log-file LOG_FILE Specify a file to log output. Disabled by default.\n -h, --help Show help message and exit.\n --debug Show tracebacks on errors.\n --url <orchestrator-url>\n The base url of the orchestrator rest interface.\n Alternative the environment variable ORCHESTRATOR_URL\n can be used.\n\n Commands:\n complete print bash completion command (cliff)\n dep create Create a deployment.\n dep delete Show details about an existing deployment.\n dep list List existing deployments at orchestrator.\n dep show Show details about an existing deployment.\n dep template Get template used for a given deployment.\n dep update Update an existing deployment.\n deployment create Create a deployment.\n deployment delete Show details about an existing deployment.\n deployment list List existing deployments at orchestrator.\n deployment show Show details about an existing deployment.\n deployment template Get template used for a given deployment.\n deployment update Update an existing deployment.\n help print detailed help for another command (cliff)\n resources list List Resources for a given deployment.\n resources show Show details about a resource for a given deployment.\n test Test if the given URL is pointing to an orchestrator.\n\n## Usage as API\n\nBesides being a CLI application, `orpy` can be used as a library:\n\n >>> from orpy.client import client\n >>> orpy = client.OrpyClient(\n ... url=ORCHESTRATOR_URL,\n ... token=ORCHESTRATOR_TOKEN)\n >>> deployments = orpy.deployments.list()\n >>> deployments[0]\n <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>\n >>> deployments[0].status\n CREATE_FAILED\n >>>\n\n",
"bugtrack_url": null,
"license": "Apache-2",
"summary": "Python library and CLI for the INDIGO PaaS Orchestrator.",
"version": "1.0.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81ec5f3d29195700aedd4e4078c2cd8d416b23ca6edb807cc4cf116e480de37a",
"md5": "153d7ee6363494480bbb5d18307b6911",
"sha256": "0b63fb3b6366809a2d77c6359144930c9db1194667079c37062ec872bc83e7b1"
},
"downloads": -1,
"filename": "orpy-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "153d7ee6363494480bbb5d18307b6911",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 33816,
"upload_time": "2023-04-14T07:16:45",
"upload_time_iso_8601": "2023-04-14T07:16:45.814515Z",
"url": "https://files.pythonhosted.org/packages/81/ec/5f3d29195700aedd4e4078c2cd8d416b23ca6edb807cc4cf116e480de37a/orpy-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "21349fbaeba9a38037f59937796e241f2f82810ebf1fa414948ba42945d888a8",
"md5": "3749bf3b28dad899d259935dea947d7c",
"sha256": "026836144d82aac40fdd77e84163a366473341670bde30258412398953e089ef"
},
"downloads": -1,
"filename": "orpy-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "3749bf3b28dad899d259935dea947d7c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 58244,
"upload_time": "2023-04-14T07:16:48",
"upload_time_iso_8601": "2023-04-14T07:16:48.096002Z",
"url": "https://files.pythonhosted.org/packages/21/34/9fbaeba9a38037f59937796e241f2f82810ebf1fa414948ba42945d888a8/orpy-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-14 07:16:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "indigo-dc",
"github_project": "orpy",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "orpy"
}