Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @ egi.eu.

Difference between revisions of "HOWTO11 How to use the rOCCI Client"

From EGIWiki
Jump to navigation Jump to search
Line 4: Line 4:
The OCCI gem includes a client you can use directly from shell with the following auth methods: x509 (with --password, --user-cred and --ca-path), basic (with --username and --password), digest (with --username and --password), none. If you won't set a password using --password, the client will ask for it later on.
The OCCI gem includes a client you can use directly from shell with the following auth methods: x509 (with --password, --user-cred and --ca-path), basic (with --username and --password), digest (with --username and --password), none. If you won't set a password using --password, the client will ask for it later on.


=== To find out more about available options and defaults use ===
=== Find out more about available options and defaults use ===


<pre>occi --help</pre>
<pre>occi --help</pre>


To list available resources use
=== List available resources use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource compute --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource compute --auth x509
Line 14: Line 14:
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource network --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource network --auth x509


To describe available resources use
=== Describe available resources use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource compute --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource compute --auth x509
Line 20: Line 20:
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource network --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource network --auth x509


To describe specific resources use
=== Describe specific resources use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /compute/<OCCI_ID> --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /compute/<OCCI_ID> --auth x509
Line 26: Line 26:
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /network/<OCCI_ID> --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /network/<OCCI_ID> --auth x509


To list available OS templates or Resource templates use
=== List available OS templates or Resource templates use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource os_tpl --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource os_tpl --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource resource_tpl --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource resource_tpl --auth x509


To describe a specific OS template or Resource template use
=== Describe a specific OS template or Resource template use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource os_tpl#debian6 --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource os_tpl#debian6 --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource resource_tpl#small --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource resource_tpl#small --auth x509


To create a compute resource with mixins use
=== Create a compute resource with mixins use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action create --resource compute --mixin os_tpl#debian6 --mixin resource_tpl#small --attribute occi.core.title="My rOCCI VM" --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action create --resource compute --mixin os_tpl#debian6 --mixin resource_tpl#small --attribute occi.core.title="My rOCCI VM" --auth x509


To delete a compute resource use
=== Delete a compute resource use ===


occi --endpoint https://<ENDPOINT>:<PORT>/ --action delete --resource /compute/<OCCI_ID> --auth x509
occi --endpoint https://<ENDPOINT>:<PORT>/ --action delete --resource /compute/<OCCI_ID> --auth x509

Revision as of 12:39, 24 May 2014

Main Roadmap and Innovation Technology For Users For Resource Providers Media



The rOCCI Client

The OCCI gem includes a client you can use directly from shell with the following auth methods: x509 (with --password, --user-cred and --ca-path), basic (with --username and --password), digest (with --username and --password), none. If you won't set a password using --password, the client will ask for it later on.

Find out more about available options and defaults use

occi --help

List available resources use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource compute --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource storage --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource network --auth x509

Describe available resources use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource compute --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource storage --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource network --auth x509

Describe specific resources use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /compute/<OCCI_ID> --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /storage/<OCCI_ID> --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource /network/<OCCI_ID> --auth x509

List available OS templates or Resource templates use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource os_tpl --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action list --resource resource_tpl --auth x509

Describe a specific OS template or Resource template use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource os_tpl#debian6 --auth x509 occi --endpoint https://<ENDPOINT>:<PORT>/ --action describe --resource resource_tpl#small --auth x509

Create a compute resource with mixins use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action create --resource compute --mixin os_tpl#debian6 --mixin resource_tpl#small --attribute occi.core.title="My rOCCI VM" --auth x509

Delete a compute resource use

occi --endpoint https://<ENDPOINT>:<PORT>/ --action delete --resource /compute/<OCCI_ID> --auth x509