The apmec.context Module

The apmec.context Module

Context: context for security/db session.

class apmec.context.Context(*args, **kwargs)

Bases: apmec.context.ContextBaseWithSession

session
class apmec.context.ContextBase(user_id, tenant_id, is_admin=None, roles=None, timestamp=None, request_id=None, tenant_name=None, user_name=None, overwrite=True, auth_token=None, **kwargs)

Bases: oslo_context.context.RequestContext

Security context and request information.

Represents the user taking a given action within the system.

elevated()

Return a version of this context with admin flag set.

classmethod from_dict(values)

Construct a context object from a provided dictionary.

project_id
tenant_id
to_dict()

Return a dictionary of context attributes.

user_id
class apmec.context.ContextBaseWithSession(user_id, tenant_id, is_admin=None, roles=None, timestamp=None, request_id=None, tenant_name=None, user_name=None, overwrite=True, auth_token=None, **kwargs)

Bases: apmec.context.ContextBase

connection
session
transaction
transaction_ctx
apmec.context.get_admin_context()
apmec.context.get_admin_context_without_session()
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.