From 57123f2a9993be9e9ea83c1203f0670e67986de9 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Wed, 24 Jun 2009 15:18:34 +0200 Subject: Fix minor bugs, typos, etc. discovered by unit tests in plugins. --- ipalib/plugins/host.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ipalib/plugins/host.py') 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 -- cgit