Remove default override for config options policy_file

olso.policy 4.5.0[1] changed the config options policy_file
default value to 'policy.yaml', which means it is changed
for all the OpenStack services and they do not need to
override the default anymore.

NOTE: There is no change in behaviour here, oslo.policy provides
the same configuration that services have overridden till now.

[1] https://review.opendev.org/c/openstack/releases/+/934012
[2] https://review.opendev.org/c/openstack/requirements/+/934295

Change-Id: Ibf67383682595d5a14975164ab30cbac7ea0cf66
This commit is contained in:
Ghanshyam Mann 2024-11-10 21:43:32 -08:00
parent 570cb89285
commit cec01cef03
3 changed files with 1 additions and 14 deletions

View File

@ -16,7 +16,6 @@
from keystonemiddleware import auth_token
from oslo_config import cfg
from oslo_policy import opts
from oslo_policy import policy
from mistral import exceptions as exc
@ -28,13 +27,6 @@ CONF = cfg.CONF
_ENFORCER = None
# 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)
def setup(app):
if cfg.CONF.pecan.auth_enable and cfg.CONF.auth_type == 'keystone':
conf = dict(cfg.CONF.keystone_authtoken)

View File

@ -27,7 +27,6 @@ from keystoneauth1 import loading
from oslo_config import cfg
from oslo_log import log
from oslo_middleware import cors
from oslo_policy import opts
from osprofiler import opts as profiler
from mistral import version
@ -888,10 +887,6 @@ def parse_args(args=None, usage=None, default_config_files=None):
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(CONF, 'policy.yaml')
def set_cors_middleware_defaults():

View File

@ -16,7 +16,7 @@ oslo.db>=4.40.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.messaging>=14.1.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.utils>=7.0.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.serialization>=2.21.1 # Apache-2.0