Previous topic

The cinder.openstack.common.cfg Module

Next topic

The cinder.openstack.common.exception 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.openstack.common.context Module

Simple class that stores security context information in the web request.

Projects should subclass this class if they wish to enhance the request context or provide additional information in their specific WSGI pipeline.

class RequestContext(auth_tok=None, user=None, tenant=None, is_admin=False, read_only=False, show_deleted=False, request_id=None)

Bases: object

Stores information about the security context under which the user accesses the system, as well as additional request information.

to_dict()
generate_request_id()
get_admin_context(show_deleted='no')
get_context_from_function_and_args(function, args, kwargs)

Find an arg of type RequestContext and return it.

This is useful in a couple of decorators where we don’t know much about the function we’re wrapping.