summaryrefslogtreecommitdiffstats
path: root/ipa-python/ipaclient.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/ipaclient.py
parentd53915954e68ad2fa1625ed016e7e65cd6f4e4e0 (diff)
parentb75d735b7e15198fbc0e7baad582696a97f0d5ec (diff)
downloadfreeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.tar.gz
freeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.tar.xz
freeipa-d2378f13d0ce867175952346302d42c7a9a9fb2b.zip
Merge.
Diffstat (limited to 'ipa-python/ipaclient.py')
-rw-r--r--ipa-python/ipaclient.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py
index 168f01d38..d815afa7b 100644
--- a/ipa-python/ipaclient.py
+++ b/ipa-python/ipaclient.py
@@ -117,9 +117,6 @@ class IPAClient:
user_dict = user.toDict()
- # dn is set on the server-side
- del user_dict['dn']
-
# convert to a regular dict before sending
result = self.transport.add_user(user_dict, user_container)
return result
@@ -386,6 +383,20 @@ class IPAClient:
def add_service_principal(self, princ_name):
return self.transport.add_service_principal(princ_name)
+ 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"""
+ result = self.transport.find_service_principal(criteria, sattrs, searchlimit, timelimit)
+ counter = result[0]
+
+ hosts = [counter]
+ for attrs in result[1:]:
+ if attrs is not None:
+ hosts.append(entity.Entity(attrs))
+
+ return hosts
+
def get_keytab(self, princ_name):
return self.transport.get_keytab(princ_name)