Mark Goddard f1326626b9 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
2017-05-10 17:47:38 +01:00
..
2017-03-30 17:05:10 +08:00
2017-02-16 00:20:01 -08:00
2015-07-13 20:03:23 -05:00
2016-11-18 11:05:55 +08:00
2017-03-30 17:05:10 +08:00
2017-02-16 00:20:01 -08:00