replication.py revision 05b42f00b813c3dc70cbb80d62089f9cc0f6f549
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# CDDL HEADER START
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# The contents of this file are subject to the terms of the
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# Common Development and Distribution License, Version 1.0 only
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# (the "License"). You may not use this file except in compliance
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# with the License.
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# You can obtain a copy of the license at
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# trunk/opends/resource/legal-notices/OpenDS.LICENSE
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# See the License for the specific language governing permissions
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# and limitations under the License.
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# When distributing Covered Code, include this CDDL HEADER in each
721bb987c406979bcfe705fa1ca8d54497d40fcbRobert Wapshott# file and include the License file at
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# add the following below this CDDL HEADER, with the fields enclosed
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# information:
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# Portions Copyright [yyyy] [name of copyright owner]
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# CDDL HEADER END
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# Copyright 2008 Sun Microsystems, Inc.
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# Global variable containing the list of servers ("Server" class instances) deployed
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott# Define ChangelogServer class
037097a89b82d1ebb5cd42b4be4aecfd2e3f1423Robert Wapshott def addChangelogServer(self, hostname, port):
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott self.changelogServerList.append('%s:%s' % (hostname, port))
c5dde397dc8e977c4ddfe343d0fdc4a6ac1b2f69Robert Wapshott# Define SynchronizedSuffix class:
5a49430dbff6b14e3a05db71328bad4597f7ec62Robert Wapshott def addChangelogServer(self, hostname, port):
5a49430dbff6b14e3a05db71328bad4597f7ec62Robert Wapshott self.changelogServerList.append('%s:%s' % (hostname, port))
42e6c7ccddc92321a39872bc37da61a827181cc5Robert Wapshott# Define Server class
5a49430dbff6b14e3a05db71328bad4597f7ec62Robert Wapshott def __init__(self, hostname, dir, port, sslPort, jmxPort, rootDn, rootPwd, baseDn):
42e6c7ccddc92321a39872bc37da61a827181cc5Robert Wapshott return "Server: hostname=%s, directory=%s" % (self.hostanme, self.dir)
42e6c7ccddc92321a39872bc37da61a827181cc5Robert Wapshott def addChangelogServer(self, changelogServer):
42e6c7ccddc92321a39872bc37da61a827181cc5Robert Wapshott def addSynchronizedSuffix(self, synchronizedSuffix):
42e6c7ccddc92321a39872bc37da61a827181cc5Robert Wapshott self.synchronizedSuffixList.append(synchronizedSuffix)
ldifLines = []
if changelogServer is not None :
ldifLines.append('dn: cn=Replication Server,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config')
ldifLines.append('dn: cn=domains,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config')
ldifLines.append('dn: cn=%s,cn=domains,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config' % name)
ldifLines = []
ldifLines = []
ldifLines = []
ldifLines = []
if attr_value != None :
ldifLines = []
ldifLines = []
if newsuperior != None: