summaryrefslogtreecommitdiffstats
path: root/ipa-python/rpcclient.py
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-10-18 14:33:55 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-10-18 14:33:55 -0700
commit5e651a6496848f5ee3f6415ef3b56ca140c88556 (patch)
tree3a8f78b27aa28d2125275d42fa07110fa34ad42a /ipa-python/rpcclient.py
parentf018c2123c2b0018af5d41ec007ac8ddf0f04d31 (diff)
downloadfreeipa-5e651a6496848f5ee3f6415ef3b56ca140c88556.tar.gz
freeipa-5e651a6496848f5ee3f6415ef3b56ca140c88556.tar.xz
freeipa-5e651a6496848f5ee3f6415ef3b56ca140c88556.zip
Finish the email autosuggest.
For now I've added a new API call. The field-specific searching is a ways off.
Diffstat (limited to 'ipa-python/rpcclient.py')
-rw-r--r--ipa-python/rpcclient.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py
index df3d01386..53fb690bb 100644
--- a/ipa-python/rpcclient.py
+++ b/ipa-python/rpcclient.py
@@ -165,7 +165,23 @@ class RPCClient:
raise xmlrpclib.Fault(value, msg)
return ipautil.unwrap_binary_data(result)
-
+
+ def get_user_by_email(self,email,sattrs=None):
+ """Get a specific user's entry. Return as a dict of values.
+ Multi-valued fields are represented as lists.
+ """
+ server = self.setup_server()
+ if sattrs is None:
+ sattrs = "__NONE__"
+ try:
+ result = server.get_user_by_email(email, sattrs)
+ except xmlrpclib.Fault, fault:
+ raise ipaerror.gen_exception(fault.faultCode, fault.faultString)
+ except socket.error, (value, msg):
+ raise xmlrpclib.Fault(value, msg)
+
+ return ipautil.unwrap_binary_data(result)
+
def get_users_by_manager(self,manager_dn,sattrs=None):
"""Gets the users that report to a manager.
If sattrs is not None then only those