INDIGO PaaS Orchestrator的Python库和CLI。
项目描述
orpy
INDIGO PaaS Orchestrator的Python库和CLI。
- 免费软件:Apache License 2.0
- 源代码: https://github.com/indigo-dc/orpy
- 文档: https://orpy.readthedocs.io/
- 错误: https://github.com/indigo-dc/orpy/issues
安装。
您可以直接从PyPI安装它
pip install orpy
作为CLI使用
在使用orpy与orchestrator之前,您需要导出您的IAM访问令牌。只要访问令牌有效,orchent就可以告诉orchestrator要做什么。
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.
作为API使用
除了作为CLI应用程序外,orpy
还可以作为库使用
>>> 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
>>>
项目详情
下载文件
下载您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分布
orpy-1.0.4.tar.gz (58.2 kB 查看哈希值)
构建分布
orpy-1.0.4-py3-none-any.whl (33.8 kB 查看哈希值)
关闭
orpy-1.0.4.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 026836144d82aac40fdd77e84163a366473341670bde30258412398953e089ef |
|
MD5 | 3749bf3b28dad899d259935dea947d7c |
|
BLAKE2b-256 | 21349fbaeba9a38037f59937796e241f2f82810ebf1fa414948ba42945d888a8 |
关闭
orpy-1.0.4-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0b63fb3b6366809a2d77c6359144930c9db1194667079c37062ec872bc83e7b1 |
|
MD5 | 153d7ee6363494480bbb5d18307b6911 |
|
BLAKE2b-256 | 81ec5f3d29195700aedd4e4078c2cd8d416b23ca6edb807cc4cf116e480de37a |