summaryrefslogtreecommitdiffstats
path: root/ipa-python/rpcclient.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-10-22 17:06:52 -0400
committerRob Crittenden <rcritten@redhat.com>2007-10-22 17:06:52 -0400
commit04636b8ae7b759291fe0c49991b3df760d6ad4c2 (patch)
tree5ef85e2b057c2dc94c5744492ddd83f70efa3a2b /ipa-python/rpcclient.py
parenta47f893957a2b07b87f26429183f61d781a257fc (diff)
downloadfreeipa-04636b8ae7b759291fe0c49991b3df760d6ad4c2.tar.gz
freeipa-04636b8ae7b759291fe0c49991b3df760d6ad4c2.tar.xz
freeipa-04636b8ae7b759291fe0c49991b3df760d6ad4c2.zip
Add an LDAP attribute -> label mapping function to XML-RPC layer
Move some ACI functions around in preparation for cli delegation
Diffstat (limited to 'ipa-python/rpcclient.py')
-rw-r--r--ipa-python/rpcclient.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py
index 53fb690bb..615f4a0a5 100644
--- a/ipa-python/rpcclient.py
+++ b/ipa-python/rpcclient.py
@@ -561,3 +561,16 @@ class RPCClient:
raise xmlrpclib.Fault(value, msg)
return ipautil.unwrap_binary_data(result)
+
+ def attrs_to_labels(self,attrs):
+ """Convert a list of LDAP attributes into a more readable form."""
+
+ server = self.setup_server()
+ try:
+ result = server.attrs_to_labels(attrs)
+ 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)