OCCI Attribute Instance
| Variables: |
|
|---|
Compare two OCCI Attribute Values
:param occi.Attribute self :param {} a1: attribute value :param {} a2: attribute value :return: attributes equals :rtype: bool
OCCI Attribute Definition
| Variables: |
|
|---|
OCCI Category
| Variables: |
|
|---|
Base class for pOCCI exceptions.
Generic OCCI object in python.
Validate OCCI object.
| Returns: | OCCI object is valid |
|---|---|
| Return type: | bool |
OCCI Link
| Variables: |
|
|---|
Parse exception.
Render exception.
Transport exception.
Create OCCI Renderer.
| Parameters: | req_mimetype (string) – requested mimetype |
|---|---|
| Returns: | renderer or None |
| Return type: | RenderBase |
Parse mimetype name string.
| Parameters: | mimetype (string) – mimetype |
|---|---|
| Result : | (mimetype, charset) tuple |
| Return type: | (string, string) |
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[] |
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[]] |
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 |
Render one OCCI Attribute.
Render OCCI Attribute value.
| Parameters: | attribute (occi.Attribute) – attribute with a value to render |
|---|---|
| Returns: | attribute value rendering |
| Return type: | string |
Render Link Attribute
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[]] |