Previous topic

The cinder.api.openstack.auth Module

Next topic

The cinder.api.openstack.extensions Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.api.openstack.common Module

class MetaItemDeserializer(metadata=None)

Bases: cinder.api.openstack.wsgi.MetadataXMLDeserializer

deserialize(text)
class MetaItemTemplate

Bases: cinder.api.openstack.xmlutil.TemplateBuilder

construct()
class MetadataDeserializer(metadata=None)

Bases: cinder.api.openstack.wsgi.MetadataXMLDeserializer

deserialize(text)
class MetadataTemplate

Bases: cinder.api.openstack.xmlutil.TemplateBuilder

construct()
class MetadataTemplateElement(tag, attrib=None, selector=None, subselector=None, **extra)

Bases: cinder.api.openstack.xmlutil.TemplateElement

will_render(datum)
class MetadataXMLDeserializer(metadata=None)

Bases: cinder.api.openstack.wsgi.XMLDeserializer

create(datastring)
extract_metadata(metadata_node)

Marshal the metadata attribute of a parsed request

update(datastring)
update_all(datastring)
class ViewBuilder

Bases: object

Model API responses as dictionaries.

dict_to_query_str(params)
get_pagination_params(request)

Return marker, limit tuple from request.

Parameters:requestwsgi.Request possibly containing ‘marker’ and ‘limit’ GET variables. ‘marker’ is the id of the last element the client has seen, and ‘limit’ is the maximum number of items to return. If ‘limit’ is not specified, 0, or > max_limit, we default to max_limit. Negative values for either marker or limit will cause exc.HTTPBadRequest() exceptions to be raised.
limited(items, request, max_limit=1000)

Return a slice of items according to requested offset and limit.

Parameters:
  • items – A sliceable entity
  • requestwsgi.Request possibly containing ‘offset’ and ‘limit’ GET variables. ‘offset’ is where to start in the list, and ‘limit’ is the maximum number of items to return. If ‘limit’ is not specified, 0, or > max_limit, we default to max_limit. Negative values for either offset or limit will cause exc.HTTPBadRequest() exceptions to be raised.
  • max_limit – The maximum number of items to return from ‘items’
limited_by_marker(items, request, max_limit=1000)

Return a slice of items according to the requested marker and limit.

remove_version_from_href(href)

Removes the first api version from the href.

Given: ‘http://www.cinder.com/v1.1/123‘ Returns: ‘http://www.cinder.com/123

Given: ‘http://www.cinder.com/v1.1‘ Returns: ‘http://www.cinder.com