diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-06-24 15:18:34 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-07-02 13:33:03 -0400 |
commit | 57123f2a9993be9e9ea83c1203f0670e67986de9 (patch) | |
tree | 295b2cc697f4d4eee150a9f647673a4df772141e /ipalib/plugins/hostgroup.py | |
parent | 341a47f5a3786f96602bcc0c0ecd12aa86f5b9c1 (diff) | |
download | freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.gz freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.xz freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.zip |
Fix minor bugs, typos, etc. discovered by unit tests in plugins.
Diffstat (limited to 'ipalib/plugins/hostgroup.py')
-rw-r--r-- | ipalib/plugins/hostgroup.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index f2966e3c1..272d5720d 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 |