diff --git a/requirements.txt b/requirements.txt index 3aa8c6bdf..1a7e7c975 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ oslo.messaging>=5.36.0 # Apache-2.0 oslo.middleware>=3.35.0 # Apache-2.0 oslo.serialization>=2.25.0 # Apache-2.0 oslo.log>=3.44.0 # Apache-2.0 -oslo.policy>=3.6.0 # Apache-2.0 +oslo.policy>=4.5.0 # Apache-2.0 oslo.i18n>=3.20.0 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0 pecan>=1.2.1 # BSD diff --git a/vitrage/api/hooks.py b/vitrage/api/hooks.py index e9044e261..a70fe25fa 100644 --- a/vitrage/api/hooks.py +++ b/vitrage/api/hooks.py @@ -14,7 +14,6 @@ import oslo_messaging from oslo_config import cfg from oslo_context import context -from oslo_policy import opts from oslo_policy import policy from pecan import hooks @@ -26,12 +25,6 @@ from vitrage import storage CONF = cfg.CONF -# 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(CONF, DEFAULT_POLICY_FILE) - class ConfigHook(hooks.PecanHook): """Attach the configuration and policy enforcer object to the request. """