diff options
| author | henriquetruta <henrique@lsd.ufcg.edu.br> | 2015-02-19 11:43:16 -0300 |
|---|---|---|
| committer | henriquetruta <henrique@lsd.ufcg.edu.br> | 2015-02-23 13:38:19 -0300 |
| commit | c756f2dab3fc31d3c120c92fb8a49d02a6e0bca1 (patch) | |
| tree | 28764e928f20ec99dd65b3f5fc511442b2a22e13 /keystoneclient/v3 | |
| parent | 96c038004fbd42b391926038ffd7429a7de12500 (diff) | |
| download | python-keystoneclient-c756f2dab3fc31d3c120c92fb8a49d02a6e0bca1.tar.gz | |
Creating parameter to list inherited role assignments
This change adds the 'os_inherit_extension_inherited_to'
parameter when calling the list role assignment method.
It adds the following query to the URL:
http://host:35357/v3/role_assignments?scope.OS-INHERIT:inherited_to=projects
Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>
Change-Id: I9bfeecf4ae9da6a0d232f0cff80af64a16ec0829
Closes-bug: 1367868
Diffstat (limited to 'keystoneclient/v3')
| -rw-r--r-- | keystoneclient/v3/role_assignments.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/keystoneclient/v3/role_assignments.py b/keystoneclient/v3/role_assignments.py index 6518e43..d71f9eb 100644 --- a/keystoneclient/v3/role_assignments.py +++ b/keystoneclient/v3/role_assignments.py @@ -47,7 +47,7 @@ class RoleAssignmentManager(base.CrudManager): raise exceptions.ValidationError(msg) def list(self, user=None, group=None, project=None, domain=None, role=None, - effective=False): + effective=False, os_inherit_extension_inherited_to=None): """Lists role assignments. If no arguments are provided, all role assignments in the @@ -66,6 +66,9 @@ class RoleAssignmentManager(base.CrudManager): :param role: Role to be used as query filter. (optional) :param boolean effective: return effective role assignments. (optional) + :param string os_inherit_extension_inherited_to: + return inherited role assignments for either 'projects' or + 'domains'. (optional) """ self._check_not_user_and_group(user, group) @@ -84,6 +87,9 @@ class RoleAssignmentManager(base.CrudManager): query_params['role.id'] = base.getid(role) if effective: query_params['effective'] = effective + if os_inherit_extension_inherited_to: + query_params['scope.OS-INHERIT:inherited_to'] = ( + os_inherit_extension_inherited_to) return super(RoleAssignmentManager, self).list(**query_params) |
