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: I6e4c517eb81a50056563189753b21191bbf6b92d
This commit is contained in:
Ghanshyam Mann 2024-11-10 21:37:04 -08:00 committed by Ghanshyam
parent 3b530ac15b
commit ce045b9723
3 changed files with 1 additions and 15 deletions

View File

@ -18,14 +18,12 @@
import logging
from oslo_log import log
from oslo_policy import opts as policy_opts
from oslo_utils import importutils
import nova.conf
from nova.db.api import api as api_db_api
from nova.db.main import api as main_db_api
from nova import middleware
from nova import policy
from nova import rpc
from nova import version
@ -54,9 +52,6 @@ def set_lib_defaults():
# logging_context_format_string config option.
set_log_defaults()
# Update default value of oslo.policy policy_file config option.
policy_opts.set_defaults(CONF, policy.DEFAULT_POLICY_FILE)
def rabbit_heartbeat_filter(log_record):
message = "Unexpected error during heartbeat thread processing"

View File

@ -19,7 +19,6 @@ import re
from oslo_config import cfg
from oslo_log import log as logging
from oslo_policy import opts
from oslo_policy import policy
from oslo_utils import excutils
@ -41,14 +40,6 @@ USER_BASED_RESOURCES = ['os-keypairs']
saved_file_rules = []
KEY_EXPR = re.compile(r'%\((\w+)\)s')
# TODO(gmann): Remove overriding the default value of config options
# 'policy_file' once oslo_policy change its default value to what
# is overridden here.
DEFAULT_POLICY_FILE = 'policy.yaml'
opts.set_defaults(
cfg.CONF,
DEFAULT_POLICY_FILE)
def reset():
global _ENFORCER

View File

@ -42,7 +42,7 @@ oslo.utils>=7.3.0 # Apache-2.0
oslo.db>=10.0.0 # Apache-2.0
oslo.rootwrap>=5.15.0 # Apache-2.0
oslo.messaging>=14.1.0 # Apache-2.0
oslo.policy>=4.4.0 # Apache-2.0
oslo.policy>=4.5.0 # Apache-2.0
oslo.privsep>=2.6.2 # Apache-2.0
oslo.i18n>=5.1.0 # Apache-2.0
oslo.service>=2.8.0 # Apache-2.0