diff --git a/requirements.txt b/requirements.txt index 54d6d61b5..3dc4d7c34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ oslo.concurrency>=4.1.0 # Apache-2.0 oslo.config>=8.1.0 # Apache-2.0 oslo.messaging>=14.1.0 # Apache-2.0 oslo.middleware>=4.1.0 # Apache-2.0 -oslo.policy>=3.6.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.privsep>=2.2.0 # Apache-2.0 oslo.serialization>=3.2.0 # Apache-2.0 oslo.service>=2.2.0 # Apache-2.0 diff --git a/zun/common/config.py b/zun/common/config.py index c0e555c91..5c1e2b3e5 100644 --- a/zun/common/config.py +++ b/zun/common/config.py @@ -16,7 +16,6 @@ # under the License. from oslo_middleware import cors -from oslo_policy import opts from zun.common import rpc import zun.conf @@ -40,11 +39,6 @@ def set_config_defaults(): """This method updates all configuration default values.""" set_cors_middleware_defaults() - # TODO(gmann): Remove setting the default value of config policy_file - # once oslo_policy change the default value to 'policy.yaml'. - # https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49 - opts.set_defaults(zun.conf.CONF, 'policy.yaml') - def set_cors_middleware_defaults(): """Update default configuration options for oslo.middleware.""" diff --git a/zun/common/policy.py b/zun/common/policy.py index acdc087d1..54014a163 100644 --- a/zun/common/policy.py +++ b/zun/common/policy.py @@ -16,7 +16,6 @@ """Policy Engine For zun.""" from oslo_log import log as logging -from oslo_policy import opts from oslo_policy import policy from oslo_utils import excutils @@ -28,12 +27,6 @@ _ENFORCER = None CONF = zun.conf.CONF LOG = logging.getLogger(__name__) -# TODO(gmann): Remove setting the default value of config policy_file -# once oslo_policy change the default value to 'policy.yaml'. -# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49 -DEFAULT_POLICY_FILE = 'policy.yaml' -opts.set_defaults(CONF, DEFAULT_POLICY_FILE) - # we can get a policy enforcer by this init. # oslo policy support change policy rule dynamically.