From 5ff43ec017922ec383e757865a329b1067a78cad Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Sun, 10 Nov 2024 21:37:41 -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: If0fe65619b246660b3ed5837af72f51d223af25d --- masakari/policy.py | 7 ------- requirements.txt | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/masakari/policy.py b/masakari/policy.py index 6faef4c7..ecbd7a1c 100644 --- a/masakari/policy.py +++ b/masakari/policy.py @@ -21,7 +21,6 @@ import re import sys from oslo_config import cfg -from oslo_policy import opts from oslo_policy import policy from oslo_utils import excutils @@ -33,12 +32,6 @@ from masakari import policies 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(cfg.CONF, DEFAULT_POLICY_FILE) - _ENFORCER = None # saved_file_rules and used to compare with new rules to determine the # rules whether were updated. diff --git a/requirements.txt b/requirements.txt index 337c2d26..74e4b6d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ oslo.messaging>=14.1.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.log>=3.36.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.service!=1.28.1,>=1.24.0 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0