2014-05-25 23:35:14 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
|
|
|
from celery import shared_task
|
|
|
|
|
|
|
|
|
2014-05-30 17:10:22 +02:00
|
|
|
class LdapRouter(object):
|
|
|
|
|
|
|
|
def route_for_task(self, task, args=None, kwargs=None):
|
|
|
|
if 'ldap' in task:
|
|
|
|
return {'exchange': 'ldap',
|
|
|
|
'exchange_type': 'direct',
|
|
|
|
'queue': 'ldap'}
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
2014-05-25 23:35:14 +02:00
|
|
|
@shared_task
|
2014-05-30 18:39:51 +02:00
|
|
|
def create_ldap_group(groupname, gid, descr):
|
|
|
|
pass
|
2014-05-25 23:35:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
@shared_task
|
2014-05-30 18:39:51 +02:00
|
|
|
def create_ldap_user(username, uid, gid, gecos, homedir, shell, password):
|
|
|
|
pass
|
2014-05-30 17:10:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
@shared_task
|
|
|
|
def add_ldap_user_to_group(username, groupname):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
@shared_task
|
|
|
|
def remove_ldap_user_from_group(username, groupname):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
@shared_task
|
2014-05-30 18:39:51 +02:00
|
|
|
def delete_ldap_user(username):
|
2014-05-30 17:10:22 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
@shared_task
|
2014-05-30 17:18:42 +02:00
|
|
|
def delete_ldap_group_if_empty(groupname):
|
2014-05-30 17:10:22 +02:00
|
|
|
pass
|