RequestContext: context for requests that persist through all of cinder.
RequestContext
(user_id=None, project_id=None, is_admin=None, read_deleted='no', project_name=None, remote_address=None, timestamp=None, quota_class=None, service_catalog=None, user_auth_plugin=None, **kwargs)¶Bases: oslo_context.context.RequestContext
Security context and request information.
Represents the user taking a given action within the system.
Verifies that the given action is valid on the target in this context.
Parameters: |
|
---|---|
Param: | target_obj: dictionary representing the object which will be used to update target. |
Raises: | cinder.exception.NotAuthorized – if verification fails and fatal is True. |
Returns: | returns a non-False value (not necessarily “True”) if authorized and False if not authorized and fatal is False. |
connection
¶deepcopy
()¶elevated
(read_deleted=None, overwrite=False)¶Return a version of this context with admin flag set.
from_dict
(values)¶get_auth_plugin
()¶read_deleted
¶session
¶to_dict
()¶to_policy_values
()¶transaction
¶transaction_ctx
¶get_admin_context
(read_deleted='no')¶get_internal_tenant_context
()¶Build and return the Cinder internal tenant context object
This request context will only work for internal Cinder operations. It will not be able to make requests to remote services. To do so it will need to use the keystone client to get an auth_token.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.