From df20700117e38bd5c1afe0e1d4b14a2f47668bcb Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 2 Jun 2025 14:33:10 +0900 Subject: [PATCH] Drop override of [oslo_policy] policy_file oslo.policy uses a yaml policy file since 4.5.0 release[1]. [1] https://docs.openstack.org/releasenotes/oslo.policy/2025.1.html#upgrade-notes Change-Id: I8a93f808fe3aa22af69c04d4db1afddf1f1ffd4e --- octavia/common/policy.py | 8 -------- requirements.txt | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/octavia/common/policy.py b/octavia/common/policy.py index e7e13f6027..328f0ccff1 100644 --- a/octavia/common/policy.py +++ b/octavia/common/policy.py @@ -13,7 +13,6 @@ """Policy Engine For Octavia.""" from oslo_config import cfg from oslo_log import log as logging -from oslo_policy import opts from oslo_policy import policy as oslo_policy from oslo_utils import excutils @@ -25,13 +24,6 @@ LOG = logging.getLogger(__name__) OCTAVIA_POLICY = None -# 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) - - def get_enforcer(): global OCTAVIA_POLICY if OCTAVIA_POLICY is None: diff --git a/requirements.txt b/requirements.txt index b79ff24a44..7a6ca8e51e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ oslo.i18n>=3.20.0 # Apache-2.0 oslo.log>=4.3.0 # Apache-2.0 oslo.messaging>=14.1.0 # Apache-2.0 oslo.middleware>=4.0.1 # Apache-2.0 -oslo.policy>=3.7.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.reports>=1.18.0 # Apache-2.0 oslo.serialization>=2.28.1 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0