summaryrefslogtreecommitdiffstats
path: root/ipa-python/rpcclient.py
diff options
context:
space:
mode:
authorKarl MacMillan <kmacmill@redhat.com>2007-12-11 12:42:13 -0500
committerKarl MacMillan <kmacmill@redhat.com>2007-12-11 12:42:13 -0500
commitd2378f13d0ce867175952346302d42c7a9a9fb2b (patch)
treeadbff5e6e1715f855d08aea20e995c188dcdc248 /ipa-python/rpcclient.py
parentd53915954e68ad2fa1625ed016e7e65cd6f4e4e0 (diff)
parentb75d735b7e15198fbc0e7baad582696a97f0d5ec (diff)
downloadfreeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.tar.gz
freeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.tar.xz
freeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.zip
Merge.
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 6f039f9fa..5656b99d9 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()