magnum/magnum/api/controllers/v1
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
..
__init__.py Resource Quota - Adding quota API 2017-01-23 11:00:11 -06:00
bay.py Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
baymodel.py Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
certificate.py Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
cluster.py Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
cluster_template.py Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
collection.py Fix quotas API pagination 2017-02-14 12:33:27 -06:00
magnum_services.py Merge "Restrict magnum service name" 2016-09-16 08:09:15 +00:00
quota.py Fix quotas API pagination 2017-02-14 12:33:27 -06:00
stats.py Don't enforce microversion for stats API 2017-02-09 10:38:41 -06:00
types.py Use cls in class method and remove unused CONF 2016-09-01 15:03:01 +08:00