manila/manila
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
..
api Clean up some policy code 2021-02-25 23:41:57 -08:00
cmd [goal] Deprecate the JSON formatted policy file 2020-12-13 00:05:00 +00:00
common Advertise v2 API routes without project_id 2021-02-04 23:20:19 -08:00
compute remove usage of six library 2021-01-27 13:46:31 -08:00
data remove usage of six library 2021-01-27 13:46:31 -08:00
db Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
image Fix NFS/CIFS share creation failure issue 2020-06-30 12:46:28 -04:00
message Merge "[Native CephFS] Add messages for async ACL ops" 2021-02-01 20:50:46 +00:00
network remove usage of six library 2021-01-27 13:46:31 -08:00
policies Introduce base personas for secure RBAC 2020-11-19 21:41:35 +00:00
scheduler remove usage of six library 2021-01-27 13:46:31 -08:00
share Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
share_group Hacking: Fix E241 2020-04-01 09:21:01 +02:00
testing [ussuri][goal] Drop python2.7 support 2019-12-08 19:32:52 -08:00
tests Clean up some policy code 2021-02-25 23:41:57 -08:00
volume Fix parameters passed to exception 2019-03-19 17:40:40 +08:00
wsgi Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
__init__.py Removed ignored checks from tox.ini and fixed pep8 issues 2016-02-14 14:56:55 +02:00
context.py Drop "system_scope" from context constructor 2021-02-25 11:02:07 -08:00
coordination.py Remove unused configuration options 2017-12-13 22:49:35 +08:00
exception.py [Native CephFS] Add messages for async ACL ops 2021-01-27 19:46:51 -08:00
i18n.py Remove i18n.enable_lazy() translation 2018-11-14 14:09:08 +05:30
manager.py Don't send heartbeats if driver not initializing correctly 2020-01-15 11:34:08 +08:00
opts.py Fix NFS/CIFS share creation failure issue 2020-06-30 12:46:28 -04:00
policy.py Clean up some policy code 2021-02-25 23:41:57 -08:00
quota.py Fix manila OverQuota issue while managing shares 2020-09-18 21:28:11 +00:00
rpc.py Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
service.py Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
test.py Integrate OSprofiler and Manila 2021-02-25 04:59:19 +01:00
utils.py [pylint] Fix/ignore pylint errors in non-test modules 2019-02-25 17:23:15 +00:00
version.py Remove vim headers 2014-10-06 15:00:27 +02:00