The nova.api.openstack.urlmap Module

class Accept(value)

Bases: object

class URLMap(not_found_app=None)

Bases: paste.urlmap.URLMap


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.

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)

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 nova.api.openstack.extensions Module

Next topic

The nova.api.openstack.versioned_method Module

Project Source

This Page