occi man page

occi — Open Cloud Computing Interface Client

Synopsis

occi [Options]

Description

Client implementation of the Open Cloud Computing Interface in Ruby.

Options

-a, --action ACTION
Action to be performed on a resource instance, required.
-c, --ca-path PATH [/etc/grid-security/certificates]
Path to CA certificates director.
-d, --debug
Enable debugging messages.
-e, --endpoint URI [http://localhost:3000]
OCCI server URI.
-g, --trigger-action ACTION
Action to be triggered on the resource, formatted as SCHEME#TERM or TERM.
-h, --help
Show this message.
-j, --link URI
URI of an instance to be linked with the given resource, applicable only for action 'link'.
-l, --log-to OUTPUT [stderr]
Log to the specified device, only: {stdout|stderr}.
-M, --mixin IDENTIFIER
Identifier of a mixin, formatted as SCHEME#TERM or SHORT_SCHEME#TERM.
-n, --auth METHOD [none]
Authentication method. Only {x509|basic|digest|none}.
-f, --ca-file PATH
Path to CA certificates in a file.
-F, --filter CATEGORY
Category type identifier to filter categories from model. Must be used together with the -m option.
-k, --timeout TIMEOUT
Default timeout for all HTTP connections, in seconds.
-m, --dump-model
Contact the endpoint and dump its model.
-o, --output-format FORMAT [plain]
Output format, only: {json|plain|json_pretty|json_extended|json_extended_pretty}.
-p, --password PASSWORD
Password for basic, digest and x509 authentication.
-r, --resource RESOURCE
Term, identifier or URI of a resource to be queried, required.
-t, --attribute ATTRIBUTE
An "attribute='value'" pair, mandatory attributes for creating new resource instances: [occi.core.title].
-T, --context CTX_VAR
A "context_variable='value'" pair for new 'compute' resource instances, only: {public_key|user_data}.
-s, --skip-ca-check
Skip server certificate verification [NOT recommended].
-u, --username USER [anonymous]
Username for basic or digest authentication.
-v, --version
Show version.
-x, --user-cred FILE [~/.globus/usercred.pem]
Path to user's x509 credentials.
-X, --voms
Using VOMS credentials; modifies behavior of the X509 authN module.
-y, --media-type MEDIA_TYPE [text/plain,text/occi]
Media type for client <-> server communication. Only: {application/occi+json|text/plain,text/occi|text/plain|text/occi}.
-z, --examples
Show usage examples.

Examples

Quick reference guide

occi --endpoint http://localhost:3000/ --action list --resource os_tpl
occi --endpoint http://localhost:3000/ --action list --resource resource_tpl
occi --endpoint http://localhost:3000/ --action describe --resource os_tpl#debian6
occi --endpoint http://localhost:3000/ --action create --resource compute --mixin os_tpl#debian6 --mixin resource_tpl#small --attribute occi.core.title="My rOCCI VM"
occi --endpoint http://localhost:3000/ --action delete --resource /compute/65sd4f654sf65g4-s5fg65sfg465sfg-sf65g46sf5g4sdfg

Listing resources

occi --endpoint http://localhost:3000/ --action list --resource compute
occi --endpoint http://localhost:3000/ --action list --resource network
occi --endpoint http://localhost:3000/ --action list --resource storage
occi --endpoint http://localhost:3000/ --action list --resource os_tpl
occi --endpoint http://localhost:3000/ --action list --resource resource_tpl

Describing resources

occi --endpoint http://localhost:3000/ --action describe --resource compute
occi --endpoint http://localhost:3000/ --action describe --resource network
occi --endpoint http://localhost:3000/ --action describe --resource storage
occi --endpoint http://localhost:3000/ --action describe --resource os_tpl
occi --endpoint http://localhost:3000/ --action describe --resource resource_tpl

Creating resources

occi --endpoint http://localhost:3000/ --action create [ --attribute attribute_name='attribute_value' ]+ [ --mixin mixin_type#mixin_term ]+ --resource compute
occi --endpoint http://localhost:3000/ --action create [ --attribute attribute_name='attribute_value' ]+ [ --mixin mixin_type#mixin_term ]+ --resource network
occi --endpoint http://localhost:3000/ --action create [ --attribute attribute_name='attribute_value' ]+ [ --mixin mixin_type#mixin_term ]+ --resource storage

Linking/unlinking resources

occi --endpoint http://localhost:3000/ --action link --resource /compute/instance_id --link /network/instance_id
occi --endpoint http://localhost:3000/ --action link --resource /compute/instance_id --link /storage/instance_id

Deleting resources

occi --endpoint http://localhost:3000/ --action delete --resource compute
occi --endpoint http://localhost:3000/ --action delete --resource network
occi --endpoint http://localhost:3000/ --action delete --resource storage

Triggering actions on resources

occi --endpoint http://localhost:3000/ --action trigger --trigger-action action_scheme#action_term [ --attribute attribute_name='attribute_value' ]+ --resource computeocci --endpoint http://localhost:3000/ --action trigger --trigger-action action_term [ --attribute attribute_name='attribute_value' ]+ --resource compute
occi --endpoint http://localhost:3000/ --action trigger --trigger-action action_scheme#action_term [ --attribute attribute_name='attribute_value' ]+ --resource networkocci --endpoint http://localhost:3000/ --action trigger --trigger-action action_term [ --attribute attribute_name='attribute_value' ]+ --resource network
occi --endpoint http://localhost:3000/ --action trigger --trigger-action action_scheme#action_term [ --attribute attribute_name='attribute_value' ]+ --resource storageocci --endpoint http://localhost:3000/ --action trigger --trigger-action action_term [ --attribute attribute_name='attribute_value' ]+ --resource storage

Authentication

occi --endpoint http://localhost:3000/ [ --auth none ]
occi --endpoint http://localhost:3000/ --auth basic [ --username user ] [ --password pass ]
occi --endpoint http://localhost:3000/ --auth digest [ --username user ] [ --password pass ]
occi --endpoint http://localhost:3000/ --auth x509 [ --user-cred /home/user/.globus/usercred.pem ] [ --ca-file /etc/grid-security/certificates/ca.pem ] [ --ca-path /etc/grid-security/certificates ] [ --voms ] [ --password pass ]
occi --endpoint http://localhost:3000/ --auth x509 --user-cred /home/user/.globus/usercred.pem
occi --endpoint http://localhost:3000/ --auth x509 --user-cred /tmp/x509_1000 --voms
occi --endpoint http://localhost:3000/ --auth x509 --user-cred /tmp/x509_1000 --ca-path /etc/grid-security/certificates --voms

Media types

occi --endpoint http://localhost:3000/ [ ... ] --media-type application/occi+json
occi --endpoint http://localhost:3000/ [ ... ] --media-type text/plain,text/occi
occi --endpoint http://localhost:3000/ [ ... ] --media-type text/plain
occi --endpoint http://localhost:3000/ [ ... ] --media-type text/occi

Output formats

occi --endpoint http://localhost:3000/ [ ... ] --output-format json
occi --endpoint http://localhost:3000/ [ ... ] --output-format plain
occi --endpoint http://localhost:3000/ [ ... ] --output-format json_pretty
occi --endpoint http://localhost:3000/ [ ... ] --output-format json_extended
occi --endpoint http://localhost:3000/ [ ... ] --output-format json_extended_pretty

Attribute values (type-casting)

occi --endpoint http://localhost:3000/ [ ... ] --attribute attribute_name='attribute_value'
occi --endpoint http://localhost:3000/ [ ... ] --attribute attribute_name='num(attribute_value)'
occi --endpoint http://localhost:3000/ [ ... ] --attribute attribute_name='float(attribute_value)'
occi --endpoint http://localhost:3000/ [ ... ] --attribute attribute_name='bool(attribute_value)'

Bugs

Please report all bugs to EGI-TF rOCCI-cli issue tracker available at https://github.com/EGI-FCTF/rOCCI-cli/i…

Authors

EGI-FCTF, CESNET

GWDG

Info

August 2014 CESNET Ruby OCCI