Merge "Use the domain filter provided by keystoneclient"

This commit is contained in:
Jenkins 2014-04-11 18:01:52 +00:00 committed by Gerrit Code Review
commit 5ed79c9435

View File

@ -430,15 +430,7 @@ def group_delete(request, group_id):
def group_list(request, domain=None, project=None, user=None): def group_list(request, domain=None, project=None, user=None):
manager = keystoneclient(request, admin=True).groups manager = keystoneclient(request, admin=True).groups
groups = manager.list(user=user) groups = manager.list(user=user, domain=domain)
# TODO(dklyle): once keystoneclient supports filtering by
# domain change this to use that cleaner implementation
if domain:
domain_groups = []
for group in groups:
if group.domain_id == domain:
domain_groups.append(group)
groups = domain_groups
if project: if project:
project_groups = [] project_groups = []