diff --git a/blazar/config.py b/blazar/config.py index 621dc892..67a4f504 100644 --- a/blazar/config.py +++ b/blazar/config.py @@ -16,7 +16,6 @@ from oslo_config import cfg from oslo_log import log as logging -from oslo_policy import opts cli_opts = [ @@ -91,18 +90,3 @@ CONF.register_opts(os_opts) CONF.register_opts(api_opts) CONF.register_opts(lease_opts) logging.register_options(cfg.CONF) - - -def set_lib_defaults(): - """Update default value for configuration options from other namespace. - - Example, oslo lib config options. This is needed for - config generator tool to pick these default value changes. - https://docs.openstack.org/oslo.config/latest/cli/ - generator.html#modifying-defaults-from-other-namespaces - """ - - # 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(CONF, 'policy.yaml') diff --git a/blazar/policy.py b/blazar/policy.py index a4e2f0c5..7d37f3fb 100644 --- a/blazar/policy.py +++ b/blazar/policy.py @@ -19,7 +19,6 @@ import functools from oslo_config import cfg from oslo_log import log as logging -from oslo_policy import opts from oslo_policy import policy from blazar import context @@ -30,13 +29,6 @@ CONF = cfg.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) - - _ENFORCER = None diff --git a/requirements.txt b/requirements.txt index ab3de649..d1321be6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ oslo.i18n>=3.15.3 # Apache-2.0 oslo.log>=3.36.0 # Apache-2.0 oslo.messaging>=5.29.0 # Apache-2.0 oslo.middleware>=3.31.0 # Apache-2.0 -oslo.policy>=3.6.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.service>=1.34.0 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 98bda8ba..81ed03ea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,8 +54,6 @@ blazar.api.v2.controllers.extensions = oslo.config.opts = blazar = blazar.opts:list_opts -oslo.config.opts.defaults = - blazar = blazar.config:set_lib_defaults oslo.policy.policies = blazar = blazar.policies:list_rules