tacker.context module

tacker.context module

Context: context for security/db session.

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

Bases: tacker.context.ContextBaseWithSession

session
class tacker.context.ContextBase(user_id=None, tenant_id=None, is_admin=None, timestamp=None, tenant_name=None, user_name=None, is_advsvc=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
tenant_name
to_dict()

Return a dictionary of context attributes.

to_policy_values()

A dictionary of context attributes to enforce policy with.

oslo.policy enforcement requires a dictionary of attributes representing the current logged in user on which it applies policy enforcement. This dictionary defines a standard list of attributes that should be available for enforcement across services.

It is expected that services will often have to override this method with either deprecated values or additional attributes used by that service specific policy.

user_id
class tacker.context.ContextBaseWithSession(user_id=None, tenant_id=None, is_admin=None, timestamp=None, tenant_name=None, user_name=None, is_advsvc=None, **kwargs)

Bases: tacker.context.ContextBase

connection
session
transaction
transaction_ctx
tacker.context.generate_tacker_service_context()
tacker.context.get_admin_context()
tacker.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.