ds.py revision a035366f622f42c865dbaa1579f741a81548fde2
#
# Abstract directory server instance class
#
# Copyright (c) 2015 Red Hat, Inc.
# Author: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
#
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import ldap
class DS:
"""Abstract directory server instance."""
"""
Initialize the instance.
Arguments:
dir Path to the root of the filesystem hierarchy to create
the instance under.
port TCP port on localhost to bind the server to.
base_dn Base DN.
admin_rdn Administrator DN, relative to BASE_DN.
admin_pw Administrator password.
"""
"""Setup the instance"""
raise NotImplementedError()
"""Teardown the instance"""
raise NotImplementedError()
"""Connect to the server and bind as admin, return connection."""
return conn