Package occi :: Package protocol :: Module occi_rendering
[hide private]
[frames] | no frames]

Module occi_rendering

source code

Actual mime-type renderings.

Created on Jun 28, 2011


Author: tmetsch

Classes [hide private]
  HTTPData
Simple class which functions as an adapter between the OCCI model and the HTTP rendering.
  TextOcciRendering
This is a rendering which will use the HTTP header to place the information in an syntax and semantics as defined in the OCCI specification.
  TextPlainRendering
This is a rendering which will use the HTTP body to place the information in an syntax and semantics as defined in the OCCI specification.
  TextUriListRendering
This is a rendering which can handle URI lists.
Functions [hide private]
 
_to_entity(data, def_kind, registry, extras)
Extract an entity from the HTTP data object.
source code
 
_from_entity(entity, registry)
Create a HTTP data object from an entity.
source code
 
_to_entities(data, registry, extras)
Extract a set of (in the service existing) entities from a request.
source code
 
_from_entities(entity_list, registry)
Return a list of entities using the X-OCCI-Location attribute.
source code
 
_from_categories(categories, registry)
Create a HTTP data object from a set of categories.
source code
 
_to_action(data, registry, extras)
Create an action from an HTTP data object.
source code
 
_to_mixins(data, registry, extras)
Create a Mixin from an HTTP data object.
source code
 
_get_filter(data, registry, extras)
Parse categories and attributes from the request.
source code
 
_extract_data_from_headers(headers)
Simple method to split out the information from the HTTP headers.
source code
 
_set_data_to_headers(data, mime_type)
Simple method to set all information in the HTTP header.
source code
 
_extract_data_from_body(body)
Simple method to split out the information from the HTTP body.
source code
 
_extract_values(entry, key)
In HTTP body OCCI renderings can either be in new lines or separated by ,.
source code
 
_set_data_to_body(data, mime_type)
Simple method to set all information in the HTTP body.
source code
Variables [hide private]
  __package__ = 'occi.protocol'

Imports: Resource, Link, CATEGORY, ATTRIBUTE, LOCATION, LINK, CONTENT_TYPE, Rendering, parser, shlex


Function Details [hide private]

_to_entity(data, def_kind, registry, extras)

source code 

Extract an entity from the HTTP data object.

data -- The http data object def_kind -- A given kind definition. registry -- The registry. extras -- Passed on extra object.

_from_entity(entity, registry)

source code 

Create a HTTP data object from an entity.

entity -- The entity to render. registry -- Registry.

_to_entities(data, registry, extras)

source code 

Extract a set of (in the service existing) entities from a request.

data -- the HTTP data. registry -- The registry used for this call. extras -- Passed on extra object.

_from_entities(entity_list, registry)

source code 

Return a list of entities using the X-OCCI-Location attribute.

entity_list -- list of entities. registry -- The registry used for this call.registry

_from_categories(categories, registry)

source code 

Create a HTTP data object from a set of categories.

categories -- list of categories. registry -- needed to retrieve hostname info.

_to_action(data, registry, extras)

source code 

Create an action from an HTTP data object.

data -- the HTTP data. registry -- The registry used for this call. extras -- Passed on extra object.

_to_mixins(data, registry, extras)

source code 

Create a Mixin from an HTTP data object.

data -- the HTTP data. registry -- The registry used for this call. extras -- Passed on extra object.

_get_filter(data, registry, extras)

source code 

Parse categories and attributes from the request.

data -- the HTTP data. registry -- The registry used for this call. extras -- Passed on extra object.

_extract_data_from_headers(headers)

source code 

Simple method to split out the information from the HTTP headers.

headers -- The HTTP headers.

_set_data_to_headers(data, mime_type)

source code 

Simple method to set all information in the HTTP header.

data -- The data to set. mime_type -- The content type to set.

_extract_data_from_body(body)

source code 

Simple method to split out the information from the HTTP body.

body -- The HTTP body.

_extract_values(entry, key)

source code 

In HTTP body OCCI renderings can either be in new lines or separated by ,.

entry -- The text line to look into. key -- The key to look for and strip away.

_set_data_to_body(data, mime_type)

source code 

Simple method to set all information in the HTTP body.

data -- The data to set. mime_type -- The content type to set.