Bases: nova.api.openstack.wsgi.ResponseHeadersSerializer
Bases: nova.api.openstack.wsgi.XMLDeserializer
Marshal the metadata attribute of a parsed request
Bases: nova.api.openstack.wsgi.XMLDictSerializer
Return the id or uuid portion of a url.
Given: ‘http://www.foo.com/bar/123?q=4‘ Returns: ‘123’
Given: ‘http://www.foo.com/bar/abc123?q=4‘ Returns: ‘abc123’
Return marker, limit tuple from request.
Parameters: | request – wsgi.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. |
---|
Returns the api version in the href.
Returns the api version in the href. If no version is found, 1.0 is returned
Given: ‘http://www.nova.com/123‘ Returns: ‘1.0’
Given: ‘http://www.nova.com/v1.1‘ Returns: ‘1.1’
Return a slice of items according to requested offset and limit.
@param items: A sliceable entity @param request: wsgi.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.
@kwarg max_limit: The maximum number of items to return from ‘items’
Return a slice of items according to the requested marker and limit.
Removes the first api version from the href.
Given: ‘http://www.nova.com/v1.1/123‘ Returns: ‘http://www.nova.com/123‘
Given: ‘http://www.nova.com/v1.1‘ Returns: ‘http://www.nova.com‘
Given vm_state and task_state, return a status string.
Map the server status string to a vm state.