summaryrefslogtreecommitdiffstats
path: root/pykolab/wap_client/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-07-30 14:24:07 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-07-30 14:24:07 +0200
commiteedee64b0811fb9e95417feaf851cb9cb19a280a (patch)
treef0b6329efcf7daa3e84b75375f63c9cd5f58a8f6 /pykolab/wap_client/__init__.py
parentbae16970b5d9d5379214658397834499fb3755d8 (diff)
downloadpykolab-eedee64b0811fb9e95417feaf851cb9cb19a280a.tar.gz
Add some basic ou functions to the wap client
Diffstat (limited to 'pykolab/wap_client/__init__.py')
-rw-r--r--pykolab/wap_client/__init__.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/pykolab/wap_client/__init__.py b/pykolab/wap_client/__init__.py
index eabc893..299b847 100644
--- a/pykolab/wap_client/__init__.py
+++ b/pykolab/wap_client/__init__.py
@@ -69,6 +69,7 @@ def authenticate(username=None, password=None, domain=None):
if response.has_key('session_token'):
session_id = response['session_token']
+ return True
def connect():
global conn
@@ -288,8 +289,17 @@ def group_members_list(group=None):
def group_types_list():
return request('GET', 'group_types.list')
-def groups_list():
- return request('GET', 'groups.list')
+def groups_list(params={}):
+ return request('POST', 'groups.list', post=json.dumps(params))
+
+def ou_add(params={}):
+ return request('POST', 'ou.add', post=json.dumps(params))
+
+def ou_delete(params={}):
+ return request('POST', 'ou.delete', post=json.dumps(params))
+
+def ous_list(params={}):
+ return request('POST', 'ous.list', post=json.dumps(params))
def request(method, api_uri, get=None, post=None, headers={}):
response_data = request_raw(method, api_uri, get, post, headers)
@@ -525,8 +535,8 @@ def user_info(user=None):
def user_types_list():
return request('GET', 'user_types.list')
-def users_list():
- return request('GET', 'users.list')
+def users_list(params={}):
+ return request('POST', 'users.list', post=json.dumps(params))
def resource_types_list():
return request('GET', 'resource_types.list')