Create an OCCI Resource
Unsupported test: Creating compute instances without os_tpl is not supported.
Add an OCCI Mixin definition
Unsupported test: Not implemented.
Read OCCI Entity Description
Parameters: | filter{} (string) – required attribute names and values |
---|---|
Returns: | status, err_msg, url, entity description |
Return type: | [bool, string[], string, occi.Category[], occi.Link[], occi.Attribute[]] |
Full update of a specific OCCI Entity
Requires existing compute machine.
OpenNebula issues:
Unsupported test, os_tpl required.
It can be called by pOCCI -t ‘INFRA/CREATE/005’
Opennebula requires running compute instance.
Opennebula requires running compute instance.
Generic help function to create OCCI Infrastructure resources.
HTTP Headers renderer is always used.
Parameters: |
|
---|---|
Returns: | status and error message list |
Return type: | [bool, string[]] |
Opennebula requires running compute instance.
Parameters: |
|
---|---|
Returns: | status, err_msg |
Return type: | [bool, string[]] |
Base class for OCCI compliance tests
Fill attribute values from example_attributes for all required attributes.
Parameters: |
|
---|---|
Returns: | all required attributes has a value |
Return type: | bool |
OCCI Attribute Instance
Variables: |
|
---|
OCCI Attribute Definition
Variables: |
|
---|
OCCI Category
Variables: |
|
---|
Initialize pOCCI configuration.
Reads the configuration file: /etc/pOCCI.cfg, ~/.pOCCI.cfg.
OCCI Renderer base skeleton.
Parse OCCI Category Collection
Parameters: |
|
---|---|
Returns: | Array of OCCI Categories |
Return type: | occi.Category[] |
Parse OCCI Entity collection
Parameters: |
|
---|---|
Returns: | array of renderer-specific strings |
Return type: | string[] |
Parse OCCI Resource instance
Parameters: |
|
---|---|
Returns: | categories, links, and attributes |
Return type: | [occi.Category categories[], occi.Link links[], occi.Attribute attributes[]] |
Render OCCI Category collection
Parameters: | category[] (occi.Category) – OCCI Category array |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Category
Parameters: | category (occi.Category) – OCCI Category object |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Resource instance
Parameters: |
|
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Check validity of URL.
Parameters: |
|
---|---|
Returns: | URL validity, empty string considered as not valid |
Return type: | bool |
HTTP Headers OCCI Renderer
RFC 7230 http://www.ietf.org/rfc/rfc7230.txt.
Empty string is always returned as body during rendering.
Beware of HTTP Headers size limitations. It is better to not use ‘text/occi’ mimetype for transfering OCCI Category Collection.
Parse OCCI Category Collection
Beware of HTTP Headers size limitations. It is better to not use ‘text/occi’ mimetype for transfering OCCI Category Collection.
Parameters: |
|
---|---|
Returns: | Array of OCCI Categories |
Return type: | occi.Category[] |
Helper generator method to split values in HTTP Header.
Parameters: | body (string) – parsed text |
---|---|
Returns: | result values |
Return type: | string |
Parse OCCI Entity collection
Parameters: |
|
---|---|
Returns: | Array of links |
Return type: | string[] |
Parse OCCI Resource instance
Parameters: |
|
---|---|
Returns: | categories, links, and attributes |
Return type: | [occi.Category categories[], occi.Link links[], occi.Attribute attributes[]] |
Render Attributes
Parameters: | attribute[] (occi.Attribute) – OCCI Attribute object |
---|---|
Returns: | render result |
Return type: | string[] |
Render OCCI Category collection
Parameters: | category[] (occi.Category) – OCCI Category array |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Category
Parameters: | category (occi.Category) – OCCI Category object |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Links
Parameters: | link[] (occi.Link) – OCCI Link array |
---|---|
Returns: | render result |
Return type: | string[] |
Plain Text OCCI Renderer
Empty array is always returned as headers during rendering.
Parse OCCI Actions.
Example:
http://schemas.ogf.org/occi/infrastructure/compute/action#start http://schemas.ogf.org/occi/infrastructure/compute/action#stop http://schemas.ogf.org/occi/infrastructure/compute/action#restart http://schemas.ogf.org/occi/infrastructure/compute/action#suspend
Parameters: | body (string) – text to parse |
---|---|
Returns: | array of string |
Return type: | string[] |
Parse OCCI Attribute body
Parameters: | body (string) – text to parse |
---|---|
Returns: | attribute type and value |
Return type: | occi.Attribute |
Parse OCCI Attribute Definitions.
Example:
occi.core.id{immutable required} occi.core.title occi.core.target occi.core.source{required}
Parameters: | body (string) – text to parse |
---|---|
Returns: | array of OCCI Attribute Definition |
Return type: | occi.AttributeDefinition[] |
Parse OCCI Attribute value and detect its type
string, number, and boolean types are detected, enum is returned as string.
Parameters: | body (string) – text to parse |
---|---|
Returns: | attribute type and value |
Return type: | [string, any] |
Parse OCCI Category Collection
Parameters: |
|
---|---|
Returns: | Array of OCCI Categories |
Return type: | occi.Category[] |
Parse OCCI Category body
Example:
entity;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="entity";location="/entity/";attributes="occi.core.id{immutable required} occi.core.title"
Parameters: | body (string) – text to parse |
---|---|
Returns: | OCCI Category |
Return type: | occi.Category |
Parse OCCI Link body
Example:
</storage/0>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/link/storagelink/compute_103_disk_0";category="http://schemas.ogf.org/occi/infrastructure#storagelink http://opennebula.org/occi/infrastructure#storagelink";occi.core.id="compute_103_disk_0";occi.core.title="ttylinux";occi.core.target="/storage/0";occi.core.source="/compute/103";occi.storagelink.deviceid="/dev/hda";occi.storagelink.state="active"
Parameters: | body (string) – text to parse |
---|---|
Returns: | OCCI Link |
Return type: | occi.Link |
Parse OCCI Entity collection
Parameters: |
|
---|---|
Returns: | Array of links |
Return type: | string[] |
Parse OCCI Resource instance
Parameters: |
|
---|---|
Returns: | categories, links, and attributes |
Return type: | [occi.Category categories[], occi.Link links[], occi.Attribute attributes[]] |
Render Attribute
Parameters: | attribute (occi.Attribute) – OCCI Attribute object |
---|---|
Returns: | render result |
Return type: | string |
Render OCCI Category collection
Parameters: | category[] (occi.Category) – OCCI Category array |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Category
Parameters: | category (occi.Category) – OCCI Category object |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Link
Parameters: | link (occi.Link) – OCCI Link object |
---|---|
Returns: | render result |
Return type: | string |
Render Locations
Parameters: | location[] (string) – location URI |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Resource instance
Parameters: |
|
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Returns: | render result |
URI list OCCI Renderer
Empty array is always returned as headers during rendering.
Parse OCCI Category Collection
This method can’t be used in URI list rendering.
Parameters: |
|
---|---|
Returns: | Array of OCCI Categories |
Return type: | occi.Category[] |
Parse OCCI Entity collection
Parameters: |
|
---|---|
Returns: | array of renderer-specific strings |
Return type: | string[] |
Parse OCCI Resource instance
This method can’t be used in URI list rendering.
Parameters: |
|
---|---|
Returns: | categories, links, and attributes |
Return type: | [occi.Category categories[], occi.Link links[], occi.Attribute attributes[]] |
Render OCCI Category collection
This method can’t be used in URI list rendering.
Parameters: | category[] (occi.Category) – OCCI Category array |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render Locations
Parameters: | location[] (string) – location URI |
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Render OCCI Resource instance
This method can’t be used in URI list rendering.
Parameters: |
|
---|---|
Returns: | render result |
Return type: | [string, string[]] |
Transport base class. Curl is used, keystone authentication supported.
Available methods: delete(), get(), post(), put().
Send HTTP DELETE request
Parameters: |
|
---|---|
Returns: | [body, header, HTTP status, content type] |
Return type: | [string[], string[], string, string] |
Send HTTP GET request
Parameters: |
|
---|---|
Returns: | [body, header, HTTP status, content type] |
Return type: | [string[], string[], string, string] |
Send HTTP POST request
Parameters: |
|
---|---|
Returns: | [body, header, HTTP status, content type] |
Return type: | [string[], string[], string, string] |
Send HTTP POST request
Parameters: |
|
---|---|
Returns: | [body, header, HTTP status, content type] |
Return type: | [string[], string[], string, string] |