Ejemplo n.º 1
0
 def connect(self):
     """ connect to ldap as admin user """
     if FLAGS.fake_users:
         self.conn = fakeldap.initialize(FLAGS.ldap_url)
     else:
         assert(ldap.__name__ != 'fakeldap')
         self.conn = ldap.initialize(FLAGS.ldap_url)
     self.conn.simple_bind_s(self.user, self.passwd)
Ejemplo n.º 2
0
 def connect(self):
     """ connect to ldap as admin user """
     if FLAGS.fake_users:
         self.conn = fakeldap.initialize(FLAGS.ldap_url)
     else:
         assert (ldap.__name__ != 'fakeldap')
         self.conn = ldap.initialize(FLAGS.ldap_url)
     self.conn.simple_bind_s(self.user, self.passwd)
Ejemplo n.º 3
0
 def connect(self):
     """ connect to ldap as admin user """
     if FLAGS.fake_users:
         self.NO_SUCH_OBJECT = fakeldap.NO_SUCH_OBJECT
         self.OBJECT_CLASS_VIOLATION = fakeldap.OBJECT_CLASS_VIOLATION
         self.conn = fakeldap.initialize(FLAGS.ldap_url)
     else:
         self.NO_SUCH_OBJECT = ldap.NO_SUCH_OBJECT
         self.OBJECT_CLASS_VIOLATION = ldap.OBJECT_CLASS_VIOLATION
         self.conn = ldap.initialize(FLAGS.ldap_url)
     self.conn.simple_bind_s(self.user, self.passwd)