summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2015-01-25 10:12:28 +0100
committerDaniel Hoffend <dh@dotlan.net>2015-01-26 00:36:00 +0100
commita0507f5e48a48a0e2df42093c368a630791ff65e (patch)
treeec3515cb429e80f555d2806b6c4ed7343e7d3733
parent040338f53d522a359e0e56b67c92fe6ea47ee213 (diff)
downloadpykolab-a0507f5e48a48a0e2df42093c368a630791ff65e.tar.gz
add kolab-resource-collections to setup_freebusy
-rw-r--r--pykolab/setup/setup_freebusy.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 83baf6e..dacd2d3 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -104,6 +104,7 @@ def execute(*args, **kw):
'filter': '(&(objectClass=kolabInetOrgPerson)(|(mail=%s)(alias=%s)))',
'attributes': 'mail',
'lc_attributes': 'mail',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
'fbsource': users_imap_uri,
'cacheto': '/var/cache/kolab-freebusy/%s.ifb',
'expires': '15m',
@@ -117,11 +118,29 @@ def execute(*args, **kw):
'bind_pw': conf.get('ldap', 'service_bind_pw'),
'attributes': 'mail, kolabtargetfolder',
'filter': '(&(objectClass=kolabsharedfolder)(kolabfoldertype=event)(mail=%s))',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
'fbsource': resources_imap_uri,
'cacheto': '/var/cache/kolab-freebusy/%s.ifb',
'expires': '15m',
'loglevel': 300,
},
+ 'directory "kolab-resource-collections"': {
+ 'type': 'ldap',
+ 'host': conf.get('ldap', 'ldap_uri'),
+ 'base_dn': conf.get('ldap', 'resource_base_dn'),
+ 'bind_dn': conf.get('ldap', 'service_bind_dn'),
+ 'bind_pw': conf.get('ldap', 'service_bind_pw'),
+ 'filter': '(&(objectClass=kolabgroupofuniquenames)(mail=%s))',
+ 'attributes': 'uniquemember', 'mail'
+ 'resolve_dn': 'uniquemember',
+ 'resolve_attribute': 'mail',
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
+ 'fbsource': 'aggregate://%uniquemember'
+ 'directories': 'kolab-resources',
+ 'cacheto': '/var/cache/kolab-freebusy/%mail.ifb',
+ 'expires': '15m',
+ 'loglevel': 200,
+ },
}
cfg_parser = RawConfigParser()