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: I15539e313a952da7ddea716a95222dadb3d31aa6
This commit is contained in:
Ghanshyam Mann 2024-11-10 21:36:58 -08:00 committed by Ghanshyam
parent 52c7cc2352
commit 29852a21c5
2 changed files with 1 additions and 8 deletions

View File

@ -17,7 +17,7 @@ oslo.messaging>=5.36.0 # Apache-2.0
oslo.middleware>=3.35.0 # Apache-2.0
oslo.serialization>=2.25.0 # Apache-2.0
oslo.log>=3.44.0 # Apache-2.0
oslo.policy>=3.6.0 # Apache-2.0
oslo.policy>=4.5.0 # Apache-2.0
oslo.i18n>=3.20.0 # Apache-2.0
oslo.upgradecheck>=1.3.0 # Apache-2.0
pecan>=1.2.1 # BSD

View File

@ -14,7 +14,6 @@ import oslo_messaging
from oslo_config import cfg
from oslo_context import context
from oslo_policy import opts
from oslo_policy import policy
from pecan import hooks
@ -26,12 +25,6 @@ from vitrage import storage
CONF = cfg.CONF
# 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)
class ConfigHook(hooks.PecanHook):
"""Attach the configuration and policy enforcer object to the request. """