summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-01 21:49:39 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-01 21:49:39 +0200
commit8c4c9e8643dc4489a42f22e5a25b737103169b5b (patch)
tree31e0874c96086fcd51e23295d2afa7138bb9f51b
parentf1b19fd7d9eab2b110a317e50141dd74d3497090 (diff)
downloadpykolab-8c4c9e8643dc4489a42f22e5a25b737103169b5b.tar.gz
Add group functions
-rw-r--r--pykolab/wap_client/__init__.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pykolab/wap_client/__init__.py b/pykolab/wap_client/__init__.py
index bf35f79..9549fe8 100644
--- a/pykolab/wap_client/__init__.py
+++ b/pykolab/wap_client/__init__.py
@@ -303,10 +303,18 @@ def group_form_value_generate_mail(params=None):
return request('POST', 'group_form_value.generate_mail', params)
-def group_info():
- group = utils.ask_question("Group email address")
- group = request('GET', 'group.info?group=%s' % (group))
- return group
+def group_find(params=None):
+ post = { 'search': { 'params': {} } }
+
+ for (k,v) in params.iteritems():
+ post['search']['params'][k] = { 'value': v, 'type': 'exact' }
+
+ return request('POST', 'group.find', post=json.dumps(post))
+
+def group_info(group=None):
+ if group == None:
+ group = utils.ask_question("group DN")
+ return request('GET', 'group.info', get={ 'id': group })
def group_members_list(group=None):
if group == None: