summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/host.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-06-24 15:18:34 +0200
committerRob Crittenden <rcritten@redhat.com>2009-07-02 13:33:03 -0400
commit57123f2a9993be9e9ea83c1203f0670e67986de9 (patch)
tree295b2cc697f4d4eee150a9f647673a4df772141e /ipalib/plugins/host.py
parent341a47f5a3786f96602bcc0c0ecd12aa86f5b9c1 (diff)
downloadfreeipa.git-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.gz
freeipa.git-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.xz
freeipa.git-57123f2a9993be9e9ea83c1203f0670e67986de9.zip
Fix minor bugs, typos, etc. discovered by unit tests in plugins.
Diffstat (limited to 'ipalib/plugins/host.py')
-rw-r--r--ipalib/plugins/host.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 9d8df1db..472f8262 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -212,10 +212,10 @@ class host_del(crud.Delete):
dn = get_host(ldap, hostname)
# Remove all service records for this host
- services = api.Command['service2_find'](hostname)
+ (services, truncated) = api.Command['service_find'](hostname)
for (dn, entry_attrs) in services:
principal = entry_attrs['krbprincipalname']
- api.Command['service2_del'](principal)
+ api.Command['service_del'](principal)
ldap.delete_entry(dn)
@@ -298,6 +298,10 @@ class host_find(crud.Search):
search_kw[a] = term
term_filter = ldap.make_filter(search_kw, exact=False)
+ filter = ldap.combine_filters(
+ (filter, term_filter), rules=ldap.MATCH_ALL
+ )
+
if kw['all']:
attrs_list = ['*']
else:
@@ -310,7 +314,7 @@ class host_find(crud.Search):
except errors.NotFound:
(entries, truncated) = (tuple(), False)
- return entries
+ return (entries, truncated)
def output_for_cli(self, textui, result, term, **options):
(entries, truncated) = result