magnum/magnum/api/controllers
Mark Goddard 3afe70ad80 Pass a mutable target to oslo policy enforcer
Magnum API previously passed magnum.objects.cluster.Cluster objects as
the target argument to magnum.common.policy.enforce(). However, enforce()
expects target to be a mutable mapping, as it adds an entry for
trustee_domain_id which is used by the magnum policy.json. This causes
cluster detailed GET requests to fail with the following message:

AttributeError: 'Cluster' object has no attribute 'trustee_domain_id'

This change uses the as_dict() method of the magnum RPC objects to
provide a mutable mapping to the policy enforcer.

Change-Id: I54b136243afff9e0fadae3be4b36cad1679e5721
Closes-Bug: #1689797
(cherry picked from commit f1326626b9)
2017-06-15 10:03:24 +01:00
..
v1 Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
__init__.py Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
base.py Rename Bay DB, Object, and internal usage to Cluster 2016-09-08 13:01:12 -07:00
link.py Bay to Cluster api cleanup 2016-08-23 15:55:22 -07:00
root.py Rename Bay to Cluster in api 2016-08-17 22:24:45 +00:00
versions.py Add microversion and release notes for quotas API 2017-02-09 10:47:07 -06:00