plugable: Pass API to plugins on initialization rather than using set_api

https://fedorahosted.org/freeipa/ticket/3090

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Jan Cholasta
2015-06-22 10:58:43 +00:00
parent 2d1515323a
commit e39fe4ed31
38 changed files with 209 additions and 278 deletions

View File

@@ -945,9 +945,7 @@ class user_status(LDAPQuery):
if host == api.env.host:
other_ldap = self.obj.backend
else:
other_ldap = ldap2(shared_instance=False,
ldap_uri='ldap://%s' % host,
base_dn=self.api.env.basedn)
other_ldap = ldap2(self.api, ldap_uri='ldap://%s' % host)
try:
other_ldap.connect(ccache=os.environ['KRB5CCNAME'])
except Exception, e: