gva/gnuviechadmin/osusers/tasks.py

73 lines
1.3 KiB
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
class FileRouter(object):
def route_for_task(self, task, args=None, kwargs=None):
if 'file' in task:
return {'exchange': 'file',
'exchange_type': 'direct',
'queue': 'file'}
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
@shared_task
def setup_file_sftp_userdir(username):
pass
@shared_task
def delete_file_sftp_userdir(username):
pass
@shared_task
def setup_file_mail_userdir(username):
pass
@shared_task
def delete_file_mail_userdir(username):
pass