From 034b171f52cadcccc0a71e57bbf109cade038837 Mon Sep 17 00:00:00 2001 From: Cristian Tomoiaga Date: Fri, 11 Apr 2014 11:20:29 +0300 Subject: [PATCH] Use the domain filter provided by keystoneclient The keystone api client in horizon has it's own filter by domain implementation for group listing. Switch this over to use the keystoneclient domain filter for a cleaner implementation. Change-Id: Ie47b27ddc8bcaa9b9f22c5925580b8889a65c1d0 Closes-Bug: #1306213 --- openstack_dashboard/api/keystone.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 636e4cb660..3f5e3d8682 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -430,15 +430,7 @@ def group_delete(request, group_id): def group_list(request, domain=None, project=None, user=None): manager = keystoneclient(request, admin=True).groups - groups = manager.list(user=user) - # 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 + groups = manager.list(user=user, domain=domain) if project: project_groups = []