ironic_inspector.policy
Module¶A shortcut for policy.Enforcer.authorize()
Checks authorization of a rule against the target and credentials, and raises an exception if the rule is not defined. args and kwargs are passed directly to oslo.policy Enforcer.authorize Always returns True if CONF.auth_strategy != keystone.
Parameters: |
|
---|---|
Returns: | True if request is authorized against given policy, False otherwise |
Raises: | oslo_policy.policy.PolicyNotRegistered if supplied policy is not registered in oslo_policy |
ironic_inspector.policy.
get_enforcer
()[source]¶Provides access to the single instance of Policy enforcer.
ironic_inspector.policy.
get_oslo_policy_enforcer
()[source]¶Get the enforcer instance to generate policy files.
This method is for use by oslopolicy CLI scripts. Those scripts need the ‘output-file’ and ‘namespace’ options, but having those in sys.argv means loading the inspector config options will fail as those are not expected to be present. So we pass in an arg list with those stripped out.
ironic_inspector.policy.
init_enforcer
(*args, **kwargs)[source]¶Synchronously initializes the policy enforcer
Parameters: |
|
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.