Skip to content

Commit aebda5c

Browse files
author
Ghanshyam Mann
committed
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: I60bc1bf949919b49887ad8de9c09e6e683a41626
1 parent 1ac6bb0 commit aebda5c

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

magnum/common/config.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# under the License.
1717

1818
from oslo_middleware import cors
19-
from oslo_policy import opts
2019

2120
from magnum.common import rpc
2221
import magnum.conf
@@ -44,11 +43,6 @@ def set_config_defaults():
4443
"""
4544
set_cors_middleware_defaults()
4645

47-
# TODO(gmann): Remove setting the default value of config policy_file
48-
# once oslo_policy change the default value to 'policy.yaml'.
49-
# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d279ab578/oslo_policy/opts.py#L49
50-
opts.set_defaults(CONF, 'policy.yaml')
51-
5246

5347
def set_cors_middleware_defaults():
5448
"""Update default configuration options for oslo.middleware."""

magnum/common/policy.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import decorator
1919
from oslo_config import cfg
2020
from oslo_log import log as logging
21-
from oslo_policy import opts
2221
from oslo_policy import policy
2322
from oslo_utils import importutils
2423
import pecan
@@ -32,15 +31,6 @@
3231
_ENFORCER = None
3332
CONF = cfg.CONF
3433

35-
# TODO(ricolin): Remove overriding the default value of config options
36-
# 'policy_file' once oslo_policy change its default value to what
37-
# is overridden here.
38-
DEFAULT_POLICY_FILE = 'policy.yaml'
39-
opts.set_defaults(
40-
CONF,
41-
DEFAULT_POLICY_FILE
42-
)
43-
4434

4535
# we can get a policy enforcer by this init.
4636
# oslo policy support change policy rule dynamically.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ oslo.i18n>=5.0.0 # Apache-2.0
2323
oslo.log>=4.8.0 # Apache-2.0
2424
oslo.messaging>=14.1.0 # Apache-2.0
2525
oslo.middleware>=4.1.0 # Apache-2.0
26-
oslo.policy>=4.4.0 # Apache-2.0
26+
oslo.policy>=4.5.0 # Apache-2.0
2727
oslo.reports>=2.1.0 # Apache-2.0
2828
oslo.serialization>=3.2.0 # Apache-2.0
2929
oslo.service>=2.2.0 # Apache-2.0

0 commit comments

Comments
 (0)