Package occi :: Module wsgi
[hide private]
[frames] | no frames]

Module wsgi

source code

Module which incorporates the WSGI integration.

Created on 22.11.2011


Author: tmetsch

Classes [hide private]
  Application
An WSGI application for OCCI.
Functions [hide private]
 
_parse_headers(environ)
Will parse the HTTP Headers and only return those who are needed for the OCCI service.
source code
 
_parse_body(environ)
Parse the body from the WSGI environ.
source code
 
_parse_query(environ)
Parse the query from the WSGI environ.
source code
 
_set_hostname(environ, registry)
Set the hostname of the service.
source code
Variables [hide private]
  RETURN_CODES = {200: '200 OK', 201: '201 Created', 400: '400 B...
  __package__ = 'occi'

Imports: VERSION, KindBackend, MixinBackend, ActionBackend, HTTPError, QUERY_STRING, QueryHandler, CollectionHandler, ResourceHandler, CATEGORY, LINK, ATTRIBUTE, LOCATION, ACCEPT, CONTENT_TYPE, HTMLRendering, JsonRendering, TextOcciRendering, TextPlainRendering, TextUriListRendering, NonePersistentRegistry, StringIO, logging


Function Details [hide private]

_parse_headers(environ)

source code 

Will parse the HTTP Headers and only return those who are needed for the OCCI service.

Also translates the WSGI notion of the Header field names to those used by OCCI.

environ -- The WSGI environ

_parse_body(environ)

source code 

Parse the body from the WSGI environ.

environ -- The WSGI environ.

_parse_query(environ)

source code 

Parse the query from the WSGI environ.

environ -- The WSGI environ.

_set_hostname(environ, registry)

source code 

Set the hostname of the service.

environ -- The WSGI environ. registry -- The OCCI registry.


Variables Details [hide private]

RETURN_CODES

Value:
{200: '200 OK',
 201: '201 Created',
 400: '400 Bad Request',
 403: '403 Forbidden',
 404: '404 Not Found',
 405: '405 Method Not Allowed',
 406: '406 Not Acceptable',
 500: '500 Internal Server Error',
...