The ironic.common.context Module

class ironic.common.context.RequestContext(auth_token=None, domain_id=None, domain_name=None, user=None, tenant=None, is_admin=False, is_public_api=False, read_only=False, show_deleted=False, request_id=None, roles=None, overwrite=True)[source]

Bases: oslo_context.context.RequestContext

Extends security contexts from the oslo.context library.

ensure_thread_contain_context()[source]

Ensure threading contains context

For async/periodic tasks, the context of local thread is missing. Set it with request context and this is useful to log the request_id in log messages.

classmethod from_dict(values)[source]
to_dict()[source]

Project Source

This Page