2 commits - pykolab/setup

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Wed Jul 11 15:27:07 CEST 2012


 pykolab/setup/setup_ldap.py |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit 69bd973cf52c04c3a0c89a6355190e235c417214
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jul 11 13:26:51 2012 +0200

    Add ou=Shared Folders to LDAP setup

diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 1ba1dec..43ed653 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -367,6 +367,19 @@ ServerAdminPwd = %(admin_pass)s
     # Do the actual synchronous add-operation to the ldapserver
     auth._auth.ldap.add_s(dn, ldif)
 
+    dn = 'ou=Shared Folders,%s' % (_input['rootdn'])
+
+    # A dict to help build the "body" of the object
+    attrs = {}
+    attrs['objectclass'] = ['top','organizationalunit']
+    attrs['ou'] = "Shared Folders"
+
+    # Convert our dict to nice syntax for the add-function using modlist-module
+    ldif = ldap.modlist.addModlist(attrs)
+
+    # Do the actual synchronous add-operation to the ldapserver
+    auth._auth.ldap.add_s(dn, ldif)
+
     log.info(_("Writing out cn=kolab,cn=config"))
 
     dn = 'cn=kolab,cn=config'


commit 0d91d43d85653d27e5c33968e5ff132bde644864
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Jul 11 13:25:56 2012 +0200

    Add ou=Resources to setting up LDAP

diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index 9175cc6..1ba1dec 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -354,6 +354,19 @@ ServerAdminPwd = %(admin_pass)s
     # Do the actual synchronous add-operation to the ldapserver
     auth._auth.ldap.add_s(dn, ldif)
 
+    dn = 'ou=Resources,%s' % (_input['rootdn'])
+
+    # A dict to help build the "body" of the object
+    attrs = {}
+    attrs['objectclass'] = ['top','organizationalunit']
+    attrs['ou'] = "Resources"
+
+    # Convert our dict to nice syntax for the add-function using modlist-module
+    ldif = ldap.modlist.addModlist(attrs)
+
+    # Do the actual synchronous add-operation to the ldapserver
+    auth._auth.ldap.add_s(dn, ldif)
+
     log.info(_("Writing out cn=kolab,cn=config"))
 
     dn = 'cn=kolab,cn=config'





More information about the commits mailing list