@@ -9,78 +9,72 @@ Python library and CLI for the INDIGO PaaS Orchestrator.
9
9
10
10
## Installation.
11
11
12
- You can install it directly from PyPI
12
+ You can install it directly from PyPI:
13
13
14
- ```
15
- pip install orpy
16
- ```
14
+ pip install orpy
17
15
18
16
## Usage as CLI
19
17
20
18
Before using the orchestrator with orpy you need to export your IAM access
21
19
token. As long as the access token is valid orchent can tell the orchestrator
22
20
what to do.
23
21
24
- ```
25
- export ORCHESTRATOR_TOKEN=<your access token here>
26
- ```
27
-
28
- ```
29
- usage: orpy [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
30
- [--url <orchestrator-url>]
31
-
32
- Command line client for the INDIGO PaaS Orchestrator.
33
-
34
- Please, before using this command put your a valid OpenID Connnect access
35
- token into the ORCHESTRATOR_TOKEN environment variable, so that we can use
36
- this token for authentication.
37
-
38
-
39
- optional arguments:
40
- --version show program's version number and exit
41
- -v, --verbose Increase verbosity of output. Can be repeated.
42
- -q, --quiet Suppress output except warnings and errors.
43
- --log-file LOG_FILE Specify a file to log output. Disabled by default.
44
- -h, --help Show help message and exit.
45
- --debug Show tracebacks on errors.
46
- --url <orchestrator-url>
47
- The base url of the orchestrator rest interface.
48
- Alternative the environment variable ORCHESTRATOR_URL
49
- can be used.
50
-
51
- Commands:
52
- complete print bash completion command (cliff)
53
- dep create Create a deployment.
54
- dep delete Show details about an existing deployment.
55
- dep list List existing deployments at orchestrator.
56
- dep show Show details about an existing deployment.
57
- dep template Get template used for a given deployment.
58
- dep update Update an existing deployment.
59
- deployment create Create a deployment.
60
- deployment delete Show details about an existing deployment.
61
- deployment list List existing deployments at orchestrator.
62
- deployment show Show details about an existing deployment.
63
- deployment template Get template used for a given deployment.
64
- deployment update Update an existing deployment.
65
- help print detailed help for another command (cliff)
66
- resources list List Resources for a given deployment.
67
- resources show Show details about a resource for a given deployment.
68
- test Test if the given URL is pointing to an orchestrator.
69
- ```
22
+ export ORCHESTRATOR_TOKEN=<your access token here>
23
+
24
+ Then, the usage is as follows:
25
+
26
+ usage: orpy [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
27
+ [--url <orchestrator-url>]
28
+
29
+ Command line client for the INDIGO PaaS Orchestrator.
30
+
31
+ Please, before using this command put your a valid OpenID Connnect access
32
+ token into the ORCHESTRATOR_TOKEN environment variable, so that we can use
33
+ this token for authentication.
34
+
35
+
36
+ optional arguments:
37
+ --version show program's version number and exit
38
+ -v, --verbose Increase verbosity of output. Can be repeated.
39
+ -q, --quiet Suppress output except warnings and errors.
40
+ --log-file LOG_FILE Specify a file to log output. Disabled by default.
41
+ -h, --help Show help message and exit.
42
+ --debug Show tracebacks on errors.
43
+ --url <orchestrator-url>
44
+ The base url of the orchestrator rest interface.
45
+ Alternative the environment variable ORCHESTRATOR_URL
46
+ can be used.
47
+
48
+ Commands:
49
+ complete print bash completion command (cliff)
50
+ dep create Create a deployment.
51
+ dep delete Show details about an existing deployment.
52
+ dep list List existing deployments at orchestrator.
53
+ dep show Show details about an existing deployment.
54
+ dep template Get template used for a given deployment.
55
+ dep update Update an existing deployment.
56
+ deployment create Create a deployment.
57
+ deployment delete Show details about an existing deployment.
58
+ deployment list List existing deployments at orchestrator.
59
+ deployment show Show details about an existing deployment.
60
+ deployment template Get template used for a given deployment.
61
+ deployment update Update an existing deployment.
62
+ help print detailed help for another command (cliff)
63
+ resources list List Resources for a given deployment.
64
+ resources show Show details about a resource for a given deployment.
65
+ test Test if the given URL is pointing to an orchestrator.
70
66
71
67
## Usage as API
72
68
73
69
Besides being a CLI application, ` orpy ` can be used as a library:
74
70
75
- ```
76
- >>> from orpy.client import client
77
- >>> orpy = client.OrpyClient(
78
- ... url=ORCHESTRATOR_URL,
79
- ... token=ORCHESTRATOR_TOKEN)
80
- >>> deployments = orpy.deployments.list()
81
- >>> deployments[0]
82
- <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>
83
- >>> deployments[0].status
84
- CREATE_FAILED
85
- >>>
86
- ```
71
+ >>> from orpy.client import client
72
+ >>> orpy = client.OrpyClient(
73
+ ... url=ORCHESTRATOR_URL,
74
+ ... token=ORCHESTRATOR_TOKEN)
75
+ >>> deployments = orpy.deployments.list()
76
+ >>> deployments[0]
77
+ <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>
78
+ >>> deployments[0].status
79
+ CREATE_FAILED
80
+ >>>
0 commit comments