forked from openstack/magnum
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
09ce349
commit 186e10f
Showing
5 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters