# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at legal-notices/CDDLv1_0.txt.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc.
# Portions Copyright 2011-2013 ForgeRock AS.
# Global variable containing the list of servers ("Server" class instances) deployed
_topologyServerList = []
# Define ChangelogServer class
class ChangelogServer:
self.changelogServerList = []
return self.changelogServerList
# Define SynchronizedSuffix class:
class SynchronizedSuffix:
self.changelogServerList = []
return self.changelogServerList
# Define Server class
class Server:
def __init__(self, hostname, dir, port, adminPort, sslPort, jmxPort, rootDn, rootPwd, baseDn, debugPort, datadir):
else:
self.changelogServer = None
return self.changelogServer
return self.synchronizedSuffixList
self.changelogServer = None
return replServer
return 1
else:
return 0
# Define the function that writes a ldif file with the replication configuration
# corresponding to the given server.
ldifLines = []
# write the main replication configuration entry
# if server is a changelog server, write its corresponding configuration
if changelogServer is not None :
ldifLines.append('dn: cn=Replication Server,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config')
for chglgServer in list:
# write the domains replication configuration entry
ldifLines.append('dn: cn=domains,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config')
# write the configuration for the synchronized suffixes, if any
name = 'SUFFIX-%s' % i
ldifLines.append('dn: cn=%s,cn=domains,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config' % name)
for chglgServer in list:
# write out the ldif file
# Define the function that writes a ldif file with the root suffix entry to add
# for a given suffix.
ldifLines = []
if commaChar == -1:
if rdnType == 'o':
objclass = 'organization'
elif rdnType == 'ou':
objclass = 'organizationalunit'
elif rdnType == 'dc':
objclass = 'domain'
else:
objclass = 'unknown'
# write out the ldif file
# Define the function that writes a ldif file with an entry to add
# under a given suffix.
ldifLines = []
# write out the ldif file
# Define the function that writes a ldif file with the entries to add
# under a given suffix.
ldifLines = []
# write out the ldif file
# Define the function that writes a ldif file with the modify to operate
# on an entry in a given suffix.
ldifLines = []
if attr_value != None :
# write out the ldif file
# Define the function that writes a ldif file with the modify to operate
# on an entry in a given suffix.
# open file and read the binary value (which is encoded in base64)
ldifLines = []
# write out the ldif file
# Define the function that writes a ldif file with the modDN to operate
# on an entry in a given suffix.
ldifLines = []
if newsuperior != None:
# write out the ldif file