The cinder.api.urlmap Module

class Accept(value)

Bases: object

best_match(supported_content_types)
content_type_params(best_content_type)

Find parameters in Accept header for given content type.

class URLMap(not_found_app=None)

Bases: paste.urlmap.URLMap

parse_list_header(value)

Parse lists as described by RFC 2068 Section 2.

In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the middle. Quotes are removed automatically after parsing.

The return value is a standard list:

>>> parse_list_header('token, "quoted value"')
['token', 'quoted value']
Parameters:value – a string with a list header.
Returns:list
parse_options_header(value)

Parse ‘Content-Type’-like header into a tuple.

Parse a Content-Type like header into a tuple with the content type and the options:

>>> parse_options_header('Content-Type: text/html; mimetype=text/html')
('Content-Type:', {'mimetype': 'text/html'})
Parameters:value – the header to parse.
Returns:(str, options)
unquote_header_value(value)

Unquotes a header value.

This does not use the real unquoting but what browsers are actually using for quoting.

Parameters:value – the header value to unquote.
urlmap_factory(loader, global_conf, **local_conf)

Previous topic

The cinder.api.openstack.wsgi Module

Next topic

The cinder.api.v1.limits Module

This Page