This function creates the topology required by the Test Group/Suite.
Topology Description file
Specifies whether the instance should be initialised with some default data.
'SINGLE instance deployment: read parameters from config.py'
'MULTIPLE instance deployment: read parameters from %s' % topologyDescFile
{ 'file' : topologyDescFile }
'Number of server instances required by the deployment: %s' % len(_topologyServerList)
{ 'dsHost' : server.getHostname(),
'dsDir' : server.getDir(),
'dsPort' : server.getPort(),
'dsSslPort' : server.getSslPort(),
'dsJmxPort' : server.getJmxPort(),
'dsBindDN' : server.getRootDn(),
'dsBindPwd' : server.getRootPwd(),
'dsBaseDN' : server.getBaseDn() }
'Instance requires SYNCHRONIZATION configuration.'
[serverMap]
This function prepares locally the necessary
files to create an instance: data zip file and OpenDS zip file.
'Delete the temporary staging area'
{ 'location' : STAXServiceMachine,
'foldername' : '%s' % TMP_DATA_DIR }
'Delete existing zip archive.'
{ 'location' : STAXServiceMachine,
'filename' : '%s/ldifdata.zip' % TMPDIR }
'Copy ldif data files'
{ 'location' : STAXServiceMachine,
'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
'extension' : 'ldif' }
{ 'location' : STAXServiceMachine,
'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
'extension' : 'pwd' }
'Copy gz data files'
{ 'location' : STAXServiceMachine,
'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
'extension' : 'gz' }
'Zip up data directory.'
{ 'location' : STAXServiceMachine,
'zipfile' : '%s/ldifdata.zip' % TMPDIR ,
'folder' : TMP_DATA_DIR ,
'relativeto' : TMPDIR }
This function creates an instance on a given host.
It copies both data and OpenDS zip files onto the host,
unzips them, and configures OpenDS.
Hostname where the instance is to be created
Directory where OpenDS will be installed
Directory Server port number
Directory Server SSL port number
Directory Server JMX port number
Directory Manager DN
Directory Server SSL port number
Directory Server base suffix dn
'Create instance in host %s at directory %s' % (dsHost,dsDir)
'Delete folder %s/%s on host %s' % (dsDir,OPENDSNAME,dsHost)
{ 'location' : dsHost,
'foldername' : '%s/%s' % (dsDir,OPENDSNAME) }
'Create folder %s on host %s' % (dsDir,dsHost)
{ 'location' : dsHost,
'foldername' : '%s' % dsDir }
'Copy tests to %s on %s' % (dsDir,dsHost)
{ 'srcfile' : '%s/ldifdata.zip' % TMPDIR,
'destfile' : '%s/ldifdata.zip' % dsDir,
'remotehost' : dsHost }
'Extract contents of test data %s on %s' % (dsDir,dsHost)
{ 'location' : dsHost,
'zipfile' : '%s/ldifdata.zip' % dsDir,
'unzipdir' : dsDir }
'Copy DS zip archive to %s on %s' % (DSTFILE,dsHost)
{ 'srcfile' : SRCFILE,
'destfile' : DSTFILE,
'remotehost' : dsHost }
'Extract DS zip archive to %s on %s' % (dsDir,dsHost)
{ 'location' : dsHost,
'zipfile' : DSTFILE,
'unzipdir' : dsDir }
'Configure DS on %s : %s/%s' % (dsHost,dsDir,OPENDSNAME)
{ 'location' : dsHost,
'dsPath' : '%s/%s' % (dsDir, OPENDSNAME),
'dsPort' : dsPort,
'dsJmxPort' : dsJmxPort,
'dsBindDN' : dsBindDN,
'dsBindPwd' : dsBindPwd,
'dsBaseDN' : dsBaseDN }
{ 'returncode' : RC ,
'result' : STAXResult }
'Instance created.'
'Failed to create instance.'
This function configures synchronization in a given server.
Map containing a Server class instance representing the server to configure.
'Configure synchronization on server on host %s at directory %s' % (syncserver.getHostname(),syncserver.getDir())
'Copy %s file from %s to %s' % (filename,TMP_DATA_DIR,dataDir)
{ 'srcfile' : filePath,
'destfile' : '%s/%s' % (dataDir,filename),
'remotehost' : syncserver.getHostname() }
{ 'location' : syncserver.getHostname(),
'dsPath' : syncserverPath }
{ 'returncode' : RC ,
'result' : STAXResult }
'Add synchronization configuration entries in %s' % remoteFilePath
{ 'location' : syncserver.getHostname(),
'dsPath' : syncserverPath,
'dsInstanceHost' : syncserver.getHostname(),
'dsInstancePort' : syncserver.getPort(),
'dsInstanceDn' : syncserver.getRootDn(),
'dsInstancePswd' : syncserver.getRootPwd(),
'entryToBeAdded' : remoteFilePath }
{ 'returncode' : RC,
'result' : STAXResult }
{ 'location' : syncserver.getHostname(),
'dsHost' : syncserver.getHostname(),
'dsPath' : syncserverPath,
'dsPort' : syncserver.getPort(),
'dsBindDN' : syncserver.getRootDn(),
'dsBindPwd' : syncserver.getRootPwd() }
{ 'returncode' : RC ,
'result' : STAXResult }
This function reads the topology from a given file.
It parses the topology description file and sets _topologyServerList, a list of the servers
that form the topology.
File containing the topology description.
'Parse file %s for topology parameters' % file
This function removes an instance on a given host.
Hostname where the instance is to be created
Directory where OpenDS will be installed
'Removing instance %s/%s on host %s' % (dsDir,OPENDSNAME,dsHost)
'Delete staging data file %s/ldifdata.zip' % dsDir
{ 'location' : dsHost,
'filename' : '%s/ldifdata.zip' % dsDir }
'Delete staging data folder %s/functional-tests' % dsDir
{ 'location' : dsHost,
'foldername' : '%s/functional-tests' % dsDir }
'Delete OPENDS zip file %s' % DSTFILE
{ 'location' : dsHost,
'filename' : '%s' % DSTFILE }
{ 'returncode' : RC ,
'result' : STAXResult }
'Instance removed.'
'Failed to remove instance.'
This function removes the topology created for the Test Group/Suite.
Tells whether it is a single (i.e. parameters read from config.py) or
a multiple-instance topology (i.e. parameters read from topology desc file).
{ 'dsHost' : server.getHostname(),
'dsDir' : server.getDir() }