manila/manila/api
Goutham Pacha Ravi 8553962997 Clean up some policy code
oslo policy handles the mapping of
credentials from a context object to values
that oslo policy cares about. This mapping
includes some deprecations and compatibility
handling code that we must take advantage of [1].
So, stop mapping context to policy values
on our end, and rely on oslo.policy handling
this for us.

enforce and authorize methods in policy.py
do the same thing, but with a subtle
difference. The "enforce" method doesn't
raise errors when unregistered policies are
invoked - this shouldn't ever be the case
for any policies written/maintained within
manila - however, we support API extensions
and don't dictate what must be done there. So
add docstrings to clarify that we shouldn't
invoke enforce, ever.

Also handle InvalidPolicyScope exceptions
and raise the oslo.policy library version
since some test enhancements have been
committed in the latest version.

[1] d3185debdb/oslo_policy/policy.py (L1077-L1096)

Change-Id: I069bf7143d6ff66b3dcdc34c9b52d48f5808481b
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-02-25 23:41:57 -08:00
..
contrib Port share type extensions to core API 2015-11-12 14:58:20 +00:00
middleware Catch up to changes in RequestContext 2021-02-15 17:01:13 -08:00
openstack Advertise v2 API routes without project_id 2021-02-04 23:20:19 -08:00
v1 Merge "Fix logic that determines a share exists before manage" 2020-11-24 05:30:20 +00:00
v2 Advertise v2 API routes without project_id 2021-02-04 23:20:19 -08:00
views add additional driver data to migration get progress view 2021-01-25 09:50:35 +01:00
__init__.py Remove enable_v1_api and enable_v2_api config opts 2016-08-23 08:27:22 +02:00
auth.py Remove log translations in api 1/5 2017-03-29 16:55:05 +08:00
common.py Advertise v2 API routes without project_id 2021-02-04 23:20:19 -08:00
extensions.py Clean up some policy code 2021-02-25 23:41:57 -08:00
urlmap.py Trivial: Remove unused logging import 2015-12-28 21:44:26 -05:00
versions.py [goal] Migrate tox based testing to ubuntu focal 2020-09-09 13:19:39 -05:00