summaryrefslogtreecommitdiffstats
path: root/ipa-python/ipaclient.py
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-09-19 08:42:34 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-09-19 08:42:34 -0700
commitf17071533a73c5e989ead1b243de5397d36a38d3 (patch)
tree6156ae63ae36ede5e601bbf2fcb962783d438094 /ipa-python/ipaclient.py
parent6b3d1e85da1397324fa7e8dc25706129ff8ed6fc (diff)
downloadfreeipa-f17071533a73c5e989ead1b243de5397d36a38d3.tar.gz
freeipa-f17071533a73c5e989ead1b243de5397d36a38d3.tar.xz
freeipa-f17071533a73c5e989ead1b243de5397d36a38d3.zip
Implement asynchronous search for groups.
Use the filter generation code to search on multiple fields.
Diffstat (limited to 'ipa-python/ipaclient.py')
-rw-r--r--ipa-python/ipaclient.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py
index 4e293b013..63537f269 100644
--- a/ipa-python/ipaclient.py
+++ b/ipa-python/ipaclient.py
@@ -161,13 +161,14 @@ class IPAClient:
result = self.transport.add_group(group_dict, group_container)
return result
- def find_groups(self, criteria, sattrs=None):
+ def find_groups(self, criteria, sattrs=None, searchlimit=0):
"""Find groups whose cn matches the criteria. Wildcards are
acceptable. Returns a list of Group objects."""
- result = self.transport.find_groups(criteria, sattrs)
+ result = self.transport.find_groups(criteria, sattrs, searchlimit)
+ counter = result[0]
- groups = []
- for attrs in result:
+ groups = [counter]
+ for attrs in result[1:]:
if attrs is not None:
groups.append(group.Group(attrs))