Bump oslo.policy to 3.12.0

It allows us to revert temporary fix part from [1] as now InvalidScope
exception is properly handled by oslo.policy.

[1] https://review.opendev.org/c/openstack/neutron/+/826872

Related-bug: #1959333
Change-Id: I6b42306479c134ad8b07b8bf87d5c650fef9faae
This commit is contained in:
Slawek Kaplonski 2022-05-02 12:47:16 +02:00
parent 42ce0ea42c
commit 3939ec35af
3 changed files with 6 additions and 15 deletions

View File

@ -67,7 +67,7 @@ oslo.i18n==3.20.0
oslo.log==4.5.0
oslo.messaging==7.0.0
oslo.middleware==3.31.0
oslo.policy==3.10.1
oslo.policy==3.12.0
oslo.privsep==2.3.0
oslo.reports==1.18.0
oslo.rootwrap==5.15.0

View File

@ -483,19 +483,10 @@ def check(context, action, target, plugin=None, might_not_exist=False,
action,
target,
pluralized)
# TODO(slaweq): this try..except.. block can be removed when bug
# https://bugs.launchpad.net/oslo.policy/+bug/1965315 will be fixed in
# oslo.policy
try:
result = _ENFORCER.enforce(match_rule,
target,
credentials,
pluralized=pluralized)
except policy.InvalidScope:
log_rule_list(match_rule)
LOG.debug("Failed policy check for '%s'", action)
result = False
return result
return _ENFORCER.enforce(match_rule,
target,
credentials,
pluralized=pluralized)
def enforce(context, action, target, plugin=None, pluralized=None):

View File

@ -33,7 +33,7 @@ oslo.i18n>=3.20.0 # Apache-2.0
oslo.log>=4.5.0 # Apache-2.0
oslo.messaging>=7.0.0 # Apache-2.0
oslo.middleware>=3.31.0 # Apache-2.0
oslo.policy>=3.10.1 # Apache-2.0
oslo.policy>=3.12.0 # Apache-2.0
oslo.privsep>=2.3.0 # Apache-2.0
oslo.reports>=1.18.0 # Apache-2.0
oslo.rootwrap>=5.15.0 # Apache-2.0