Policy Engine For Glance
glance.api.policy.Enforcer[source]¶Bases: oslo_policy.policy.Enforcer
Responsible for loading and enforcing rules
check(context, action, target, registered=True)[source]¶Verifies that the action is valid on the target in this context.
context – Glance request context
action – String representing the action to be checked
target – Dictionary representing the object of the action.
A non-False value if access is allowed.
check_is_admin(context)[source]¶Check if the given context is associated with an admin role, as defined via the ‘context_is_admin’ RBAC rule.
context – Glance request context
A non-False value if context role is admin.
enforce(context, action, target, registered=True)[source]¶Verifies that the action is valid on the target in this context.
context – Glance request context
action – String representing the action to be checked
target – Dictionary representing the object of the action.
glance.common.exception.Forbidden
A non-False value if access is allowed.
glance.api.policy.ImageLocationsProxy(locations, context, policy)[source]¶Bases: object
append(*args, **kwargs)¶count(*args, **kwargs)¶extend(*args, **kwargs)¶index(*args, **kwargs)¶insert(*args, **kwargs)¶pop(*args, **kwargs)¶remove(*args, **kwargs)¶reverse(*args, **kwargs)¶glance.api.policy.ImageMemberRepoProxy(member_repo, image, context, policy)[source]¶Bases: glance.domain.proxy.Repo
glance.api.policy.ImageProxy(image, context, policy)[source]¶Bases: glance.domain.proxy.Image
locations¶visibility¶glance.api.policy.ImageRepoProxy(image_repo, context, policy)[source]¶Bases: glance.domain.proxy.Repo
glance.api.policy.ImageTarget(target)[source]¶Bases: collections.abc.Mapping
SENTINEL = <object object>¶glance.api.policy.MetadefNamespaceFactoryProxy(meta_namespace_factory, context, policy)[source]¶glance.api.policy.MetadefNamespaceRepoProxy(namespace_repo, context, namespace_policy)[source]¶Bases: glance.domain.proxy.MetadefNamespaceRepo
glance.api.policy.MetadefPropertyFactoryProxy(namespace_property_factory, context, policy)[source]¶glance.api.policy.MetadefResourceTypeFactoryProxy(resource_type_factory, context, policy)[source]¶glance.api.policy.MetadefResourceTypeRepoProxy(resource_type_repo, context, resource_type_policy)[source]¶glance.api.policy.MetadefTagRepoProxy(tag_repo, context, tag_policy)[source]¶Bases: glance.domain.proxy.MetadefTagRepo
glance.api.policy.TaskProxy(task, context, policy)[source]¶Bases: glance.domain.proxy.Task
glance.api.policy.TaskRepoProxy(task_repo, context, task_policy)[source]¶Bases: glance.domain.proxy.TaskRepo
glance.api.policy.TaskStubProxy(task_stub, context, policy)[source]¶Bases: glance.domain.proxy.TaskStub
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.