2015-04-15 21:13:14 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim:set expandtab tabstop=4 shiftwidth=4:
|
|
|
|
#
|
|
|
|
# The MIT License (MIT)
|
|
|
|
# LdapCherry
|
|
|
|
# Copyright (c) 2014 Carpentier Pierre-Francois
|
|
|
|
|
2015-05-21 19:54:38 +02:00
|
|
|
from ldapcherry.exceptions import MissingParameter
|
|
|
|
|
2015-04-15 21:13:14 +02:00
|
|
|
class Backend:
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
2015-05-20 17:13:18 +02:00
|
|
|
def auth(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def add_to_group(self):
|
2015-04-15 21:13:14 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
def set_attr(self):
|
|
|
|
pass
|
|
|
|
|
2015-05-20 17:13:18 +02:00
|
|
|
def rm_from_group(self):
|
2015-04-15 21:13:14 +02:00
|
|
|
pass
|
2015-05-21 19:54:38 +02:00
|
|
|
|
|
|
|
def get_param(self, param, default=False):
|
|
|
|
if param in self.config:
|
|
|
|
return self.config[param]
|
|
|
|
elif default:
|
|
|
|
return default
|
|
|
|
else:
|
|
|
|
raise MissingParameter(self.backend_name+'.'+param, 'backends')
|
|
|
|
|