[Da-tools-commits] ./da-tools/userdir-ldap-cgi-python r11: changing udldapng controller to use the new classes

Robin Wittler real at geek-at-work.org
Tue Jan 20 21:27:23 UTC 2009


------------------------------------------------------------
revno: 11
committer: Robin Wittler <real at geek-at-work.org>
branch nick: userdir-ldap-cgi-python
timestamp: Tue 2009-01-20 22:27:23 +0100
message:
  changing udldapng controller to use the new classes
  fixed docstring in ud_ldap_ng
modified:
  ud_ldap_ng/controllers/udldapng.py
  ud_ldap_ng/lib/ud_ldap_ng.py
-------------- next part --------------
=== modified file 'ud_ldap_ng/controllers/udldapng.py'
--- a/ud_ldap_ng/controllers/udldapng.py	2009-01-13 21:13:30 +0000
+++ b/ud_ldap_ng/controllers/udldapng.py	2009-01-20 21:27:23 +0000
@@ -8,13 +8,13 @@
 
 log = logging.getLogger(__name__)
 
-from ud_ldap_ng.lib.ud_ldap_ng import connectDebianLDAP, getDebianHostsAttributes, getDebianUser
+from ud_ldap_ng.lib.ud_ldap_ng import AnonymousDebianLDAP, DebianLDAPResult
 
 
 class UdldapngController(BaseController):
 	def index(self):
-		con = connectDebianLDAP()
-		c.result = getDebianHostsAttributes(con)
+		con = AnonymousDebianLDAP()
+		c.result = con.getDebianHosts(attrlist=['hostname', 'architecture', 'purpose', 'status', 'sponsor'], adjust=False)
 		#c.result = dict()
 		return render('/machines.html')
 	

=== modified file 'ud_ldap_ng/lib/ud_ldap_ng.py'
--- a/ud_ldap_ng/lib/ud_ldap_ng.py	2009-01-20 19:54:58 +0000
+++ b/ud_ldap_ng/lib/ud_ldap_ng.py	2009-01-20 21:27:23 +0000
@@ -7,7 +7,7 @@
 import ldap
 
 class DebianLDAPResult(object):
-	'''This class represents a ldap result.
+	'''This class represents a ldap result - without the search dn.
 	If the optional argument adjust is True, this class automaticly adjust all
 	entrys in this way:
 	



More information about the Da-tools-commits mailing list