Jan Dittberner
865f54ab67
- modify osusers.tasks and osusers.models to avoid serialization of full models for celery tasks and use the required fields only
43 lines
774 B
Python
43 lines
774 B
Python
from __future__ import absolute_import
|
|
|
|
from celery import shared_task
|
|
|
|
|
|
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
|
|
|
|
|
|
@shared_task
|
|
def create_ldap_group(groupname, gid, descr):
|
|
pass
|
|
|
|
|
|
@shared_task
|
|
def create_ldap_user(username, uid, gid, gecos, homedir, shell, password):
|
|
pass
|
|
|
|
|
|
@shared_task
|
|
def add_ldap_user_to_group(username, groupname):
|
|
pass
|
|
|
|
|
|
@shared_task
|
|
def remove_ldap_user_from_group(username, groupname):
|
|
pass
|
|
|
|
|
|
@shared_task
|
|
def delete_ldap_user(username):
|
|
pass
|
|
|
|
|
|
@shared_task
|
|
def delete_ldap_group_if_empty(groupname):
|
|
pass
|