From 7854024896de8fb09551b1d10c088b49f2dd12fc Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Sun, 10 Nov 2024 21:37:08 -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: I547c2f8d3679b657ae14a08145c84c4c81f0733b --- requirements.txt | 2 +- tacker/policy.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index b0a902632..cd373d490 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ oslo.db>=5.0.0 # Apache-2.0 oslo.log>=3.36.0 # Apache-2.0 oslo.messaging>=14.2.0 # Apache-2.0 oslo.middleware>=3.31.0 # Apache-2.0 -oslo.policy>=3.11.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.privsep>=2.4.0 # Apache-2.0 oslo.reports>=1.18.0 # Apache-2.0 oslo.rootwrap>=5.8.0 # Apache-2.0 diff --git a/tacker/policy.py b/tacker/policy.py index 081aa8069..1f1636767 100644 --- a/tacker/policy.py +++ b/tacker/policy.py @@ -39,14 +39,11 @@ _ENFORCER = None ADMIN_CTX_POLICY = 'context_is_admin' # TODO(gmann): Remove setting the default value of config options: -# - 'policy_file' once oslo_policy change their default value to what is -# overridden here. # - 'enforce_scope', and 'enforce_new_defaults' once cinder is ready with the # new RBAC (oslo_policy enable them by default) DEFAULT_POLICY_FILE = 'policy.yaml' opts.set_defaults( cfg.CONF, - DEFAULT_POLICY_FILE, enforce_scope=False, enforce_new_defaults=False)