From dec80f9886bb967bf76789048872699cbdd10c64 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Sun, 10 Nov 2024 21:37:39 -0800 Subject: [PATCH] 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: Ie0457baf0558ba4db967c6b411a451fb29a75b04 --- manila/common/config.py | 3 --- manila/policy.py | 11 ----------- requirements.txt | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/manila/common/config.py b/manila/common/config.py index 1a086e34bf..777f48ac98 100644 --- a/manila/common/config.py +++ b/manila/common/config.py @@ -29,7 +29,6 @@ import socket from oslo_config import cfg from oslo_log import log from oslo_middleware import cors -from oslo_policy import opts as policy_opts from oslo_utils import netutils from manila.common import constants @@ -207,5 +206,3 @@ def set_lib_defaults(): 'DELETE', 'PATCH'] ) - # Update default value of oslo.policy policy_file config option. - policy_opts.set_defaults(CONF, 'policy.yaml') diff --git a/manila/policy.py b/manila/policy.py index 7ff0f72d71..cab3bdb54a 100644 --- a/manila/policy.py +++ b/manila/policy.py @@ -20,7 +20,6 @@ import sys 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 @@ -32,16 +31,6 @@ LOG = logging.getLogger(__name__) _ENFORCER = None -# TODO(gmann): Remove setting the default value of config policy_file -# 'policy_file' once oslo_policy change its default value to what -# is overridden here. -DEFAULT_POLICY_FILE = 'policy.yaml' -opts.set_defaults(CONF, DEFAULT_POLICY_FILE) -opts.set_defaults( - cfg.CONF, - DEFAULT_POLICY_FILE) - - def reset(): global _ENFORCER if _ENFORCER: diff --git a/requirements.txt b/requirements.txt index ba2038c668..11eb6ee76c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ oslo.i18n>=5.0.1 # Apache-2.0 oslo.log>=4.4.0 # Apache-2.0 oslo.messaging>=14.1.0 # Apache-2.0 oslo.middleware>=4.1.1 # Apache-2.0 -oslo.policy>=4.4.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.privsep>=2.4.0 # Apache-2.0 oslo.reports>=2.2.0 # Apache-2.0 oslo.rootwrap>=6.2.0 # Apache-2.0