summaryrefslogtreecommitdiffstats
path: root/ipa-python/rpcclient.py
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2007-12-07 17:38:15 -0500
committerSimo Sorce <ssorce@redhat.com>2007-12-07 17:38:15 -0500
commit0b51e326996dd6a01fdca8a0b5a5160ca03c660b (patch)
tree157119af9167d60cda95ba565355159d043c0a6d /ipa-python/rpcclient.py
parent11559e9a69e2131dc620ca7de7af8544e23cbb46 (diff)
parentb3fa02225a8cf58c6283d122d5a48cad506d2660 (diff)
downloadfreeipa.git-0b51e326996dd6a01fdca8a0b5a5160ca03c660b.tar.gz
freeipa.git-0b51e326996dd6a01fdca8a0b5a5160ca03c660b.tar.xz
freeipa.git-0b51e326996dd6a01fdca8a0b5a5160ca03c660b.zip
merge from upstream
Diffstat (limited to 'ipa-python/rpcclient.py')
-rw-r--r--ipa-python/rpcclient.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py
index d7ff9740..de32e9be 100644
--- a/ipa-python/rpcclient.py
+++ b/ipa-python/rpcclient.py
@@ -703,6 +703,24 @@ class RPCClient:
return ipautil.unwrap_binary_data(result)
+ def find_service_principal (self, criteria, sattrs=None, searchlimit=0, timelimit=-1):
+ """Return a list: counter followed by a Entity object for each host that
+ matches the criteria. If the results are truncated, counter will
+ be set to -1"""
+
+ server = self.setup_server()
+ try:
+ # None values are not allowed in XML-RPC
+ if sattrs is None:
+ sattrs = "__NONE__"
+ result = server.find_service_principal(criteria, sattrs, searchlimit, timelimit)
+ 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_keytab(self, princ_name):
server = self.setup_server()