f1326626b9
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