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: I0374be2b69020201d0aa8558dd07ca15dd438574
This commit is contained in:
@@ -26,7 +26,6 @@ from oslo_config import cfg
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from oslo_middleware import cors
|
from oslo_middleware import cors
|
||||||
from oslo_policy import opts
|
|
||||||
from oslo_service import wsgi
|
from oslo_service import wsgi
|
||||||
|
|
||||||
from neutron._i18n import _
|
from neutron._i18n import _
|
||||||
@@ -150,11 +149,6 @@ def set_config_defaults():
|
|||||||
"""This method updates all configuration default values."""
|
"""This method updates all configuration default values."""
|
||||||
set_cors_middleware_defaults()
|
set_cors_middleware_defaults()
|
||||||
|
|
||||||
# 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
|
|
||||||
opts.set_defaults(cfg.CONF, policy.DEFAULT_POLICY_FILE)
|
|
||||||
|
|
||||||
|
|
||||||
def set_cors_middleware_defaults():
|
def set_cors_middleware_defaults():
|
||||||
"""Update default configuration options for oslo.middleware."""
|
"""Update default configuration options for oslo.middleware."""
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ from neutron_lib.services import constants as service_const
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_policy import opts
|
|
||||||
from oslo_policy import policy
|
from oslo_policy import policy
|
||||||
from oslo_utils import excutils
|
from oslo_utils import excutils
|
||||||
import stevedore
|
import stevedore
|
||||||
@@ -51,14 +50,6 @@ _RESOURCE_FOREIGN_KEYS = {
|
|||||||
'security_groups': 'security_group_id'
|
'security_groups': 'security_group_id'
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(slaweq): Remove overriding the default value of config options
|
|
||||||
# 'policy_file' once oslo_policy change its default value to what
|
|
||||||
# is overridden here.
|
|
||||||
DEFAULT_POLICY_FILE = 'policy.yaml'
|
|
||||||
opts.set_defaults(
|
|
||||||
cfg.CONF,
|
|
||||||
DEFAULT_POLICY_FILE)
|
|
||||||
|
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
global _ENFORCER
|
global _ENFORCER
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ oslo.i18n>=3.20.0 # Apache-2.0
|
|||||||
oslo.log>=5.3.0 # Apache-2.0
|
oslo.log>=5.3.0 # Apache-2.0
|
||||||
oslo.messaging>=7.0.0 # Apache-2.0
|
oslo.messaging>=7.0.0 # Apache-2.0
|
||||||
oslo.middleware>=3.31.0 # Apache-2.0
|
oslo.middleware>=3.31.0 # Apache-2.0
|
||||||
oslo.policy>=4.4.0 # Apache-2.0
|
oslo.policy>=4.5.0 # Apache-2.0
|
||||||
oslo.privsep>=2.3.0 # Apache-2.0
|
oslo.privsep>=2.3.0 # Apache-2.0
|
||||||
oslo.reports>=1.18.0 # Apache-2.0
|
oslo.reports>=1.18.0 # Apache-2.0
|
||||||
oslo.rootwrap>=5.15.0 # Apache-2.0
|
oslo.rootwrap>=5.15.0 # Apache-2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user