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/hostgroup.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ipalib/plugins/hostgroup.py') diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index f2966e3c..272d5720 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -80,8 +80,8 @@ class hostgroup_find(basegroup_find): """ container = _container_dn - def execute(self, cn, **kw): - return super(hostgroup_find, self).execute(cn, **kw) + def execute(self, term, **kw): + return super(hostgroup_find, self).execute(term, **kw) api.register(hostgroup_find) @@ -132,7 +132,9 @@ class hostgroup_add_member(basegroup_add_member): """ assert self.container ldap = self.api.Backend.ldap2 - dn = get_dn_by_attr(ldap, 'cn', cn, self.filter_class, self.container) + (dn, entry_attrs) = ldap.find_entry_by_attr( + 'cn', cn, self.filter_class, [''], self.container + ) to_add = [] add_failed = [] completed = 0 @@ -202,7 +204,9 @@ class hostgroup_del_member(basegroup_del_member): """ assert self.container ldap = self.api.Backend.ldap2 - dn = get_dn_by_attr(ldap, 'cn', cn, self.filter_class, self.container) + (dn, entry_attrs) = ldap.find_entry_by_attr( + 'cn', cn, self.filter_class, [''], self.container + ) to_remove = [] remove_failed = [] completed = 0 -- cgit