glance.context module

class glance.context.RequestContext(service_catalog=None, policy_enforcer=None, **kwargs)[source]

Bases: oslo_context.context.RequestContext

Stores information about the security context.

Stores how the user accesses the system, as well as additional request information.

property can_see_deleted

Admins can see deleted by default


Return a copy of this context with admin flag set.

classmethod from_dict(values)[source]

Construct a context object from a provided dictionary.

property owner

Return the owner to correlate with an image.


Return a dictionary of context attributes.


Create an administrator context.


Returns a keystoneauth Adapter using token from context.

This will return a simple keystoneauth adapter that can be used to make requests against a remote service using the token provided (and already authenticated) from the user and stored in a RequestContext.


context – User request context


keystoneauth1 Adapter object