2788N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
2788N/A ! The contents of this file are subject to the terms of the 2788N/A ! Common Development and Distribution License, Version 1.0 only 2788N/A ! (the "License"). You may not use this file except in compliance 2788N/A ! You can obtain a copy of the license at 2788N/A ! See the License for the specific language governing permissions 2788N/A ! and limitations under the License. 2788N/A ! When distributing Covered Code, include this CDDL HEADER in each 2788N/A ! file and include the License file at 2788N/A ! add the following below this CDDL HEADER, with the fields enclosed 2788N/A ! by brackets "[]" replaced with your own identifying information: 2788N/A ! Portions Copyright [yyyy] [name of copyright owner] 5061N/A ! Copyright 2007-2010 Sun Microsystems, Inc. 6066N/A ! Portions Copyright 2013 ForgeRock AS 2788N/A <!-- This function uses make ldif to generate LDIF data files --> 3327N/A <
function name="MakeLdifWithScript">
2788N/A This function uses make ldif to generate LDIF data files
2788N/A <
function-
arg-
def name="location" 2788N/A default="STAF_REMOTE_HOSTNAME">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="hostname"/>
2788N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
2788N/A Pathname to installation root
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="version" type="optional">
2788N/A Display Directory Server version information
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="string"/>
2788N/A <
function-
arg-
def name="templateFile" type="optional">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filename"/>
2788N/A <
function-
arg-
def name="ldifFile" type="optional">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filename"/>
3332N/A <
function-
arg-
def name="randomSeed" type="optional">
2788N/A The seed to use to initialize the random number generator
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="integer"/>
2788N/A <
function-
arg-
def name="Help" type="optional">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="help" value="option"/>
3194N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3194N/A Expected return code value. Default value is 0.
3194N/A Wildcard 'noCheck' to not check the RC
3194N/A </
function-
arg-
description>
3951N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
3951N/A Known issue. Corresponds to an issue number.
3951N/A </
function-
arg-
description>
2788N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
2788N/A STAFCmdParams=' '.join(STAFCmdParamsList)
5976N/A <
call function="'createMultiFolders'">
5976N/A 'folderslist' : foldersToCreate
5976N/A '%s %s' % (STAFCmd, STAFCmdParams)
2788N/A <
call function="'runCommand'">
2788N/A { 'name' : 'Make Ldif Script',
2788N/A 'arguments' : STAFCmdParams,
3332N/A <
return>STAXResult</
return>
2788N/A <!-- This function uses make ldif to generate LDIF data files --> 2788N/A <
function name="MakeAMakeLdifTemplate">
2788N/A This function makes a make-ldif template file
2788N/A <
function-
arg-
def name="numEntries" type="required">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="string"/>
4865N/A <
function-
arg-
def name="startFrom" 4495N/A </
function-
arg-
description>
4495N/A <
function-
arg-
property name="type" value="string"/>
4865N/A <
function-
arg-
def name="suffix" 4495N/A default="DIRECTORY_INSTANCE_SFX">
4495N/A </
function-
arg-
description>
4495N/A <
function-
arg-
property name="type" value="string"/>
2788N/A <
function-
arg-
def name="templateFile" type="required">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filename"/>
4495N/A <
function-
arg-
def name="templateLocation" 4495N/A default="STAXServiceMachine">
4495N/A </
function-
arg-
description>
4495N/A <
function-
arg-
property name="type" value="filename"/>
4865N/A <
function-
arg-
def name="additionalAttributes" 4495N/A Add (or not) additional attributes
4495N/A </
function-
arg-
description>
4495N/A <
function-
arg-
property name="type" value="integer"/>
2788N/A <
function-
arg-
def name="extraLine" type="optional">
2788N/A Extra line to add to the mkae-ldif template
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="string"/>
2788N/A <!-- Build the import task configuration object --> 4495N/A if additionalAttributes == True:
2788N/A <!-- Write out the make-ldif template file --> 4495N/A outfile = open(tmpTemplateFile,"w")
2788N/A 'creation of a make-ldif template failed (Code=%s,Reason=%s).' % (STAXCode,STAXReason)
2788N/A <
call function="'checktestRC'">
2788N/A { 'returncode' : STAXCode ,
4495N/A <
call function="'copyFile'">
4495N/A { 'location' : STAXServiceMachine,
4495N/A 'srcfile' : tmpTemplateFile,
4495N/A 'remotehost' : templateLocation }
4495N/A <
call function="'checktestRC'">
4495N/A <
return>[RC, STAXResult]</
return>
2788N/A <!-- This function compares two LDIF files using the ldif-diff script --> 2788N/A <
function name="LdifDiffWithScript">
2788N/A This function compares two LDIF files and reports the differences in LDIF format
2788N/A <
function-
arg-
def name="location" 2788N/A default="STAF_REMOTE_HOSTNAME">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="hostname"/>
2788N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
2788N/A Pathname to installation root
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="version" type="optional">
2788N/A Display Directory Server version information
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="string"/>
2788N/A <
function-
arg-
def name="sourceLdif" type="required">
2788N/A LDIF file to use as the source data
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="targetLdif" type="required">
2788N/A LDIF file to use as the target data
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="outputLdif" type="required">
2788N/A File to which the diffs should be written
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
5047N/A <
function-
arg-
def name="ignoreAttrsFile" 5047N/A File containing a list of attributes to ignore when computing the
5047N/A </
function-
arg-
description>
5047N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="overwriteExisting" type="optional" default="True">
2788N/A Overwrite existing output file rather than append to it
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="option"/>
2788N/A <
function-
arg-
def name="singleValueChanges" type="optional">
2788N/A Write each attribute-level change as a separate modification
2788N/A per attribute value rather than one modification per entry
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="option"/>
2788N/A <
function-
arg-
def name="Help" type="optional">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="help" value="option"/>
2788N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
2788N/A STAFCmdParams=' '.join(STAFCmdParamsList)
5976N/A <
call function="'createMultiFolders'">
5976N/A 'folderslist' : foldersToCreate
5976N/A '%s %s' % (STAFCmd, STAFCmdParams)
2788N/A <
process name="'LDIF Diff Script'">
2788N/A <
location>location</
location>
2788N/A <
parms>STAFCmdParams</
parms>
2788N/A <
workdir>dsBinPath</
workdir>
2788N/A ['PATH=/bin:/
usr/
bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
4616N/A <!-- Check the size of the diff file, and avoid reading its 4616N/A content with getFile if the file is too big to prevent 4616N/A the staf process from running out of memory --> 4616N/A <
call function="'GetEntry'">
4616N/A # GetEntry returns: STAXResult = [cmdRC, cmdResult]
4616N/A diffsFileSize = int(STAXResult[1]['lowerSize'])
4616N/A msg = 'File: %s Size (bytes): %s' % (outputLdif, diffsFileSize)
4616N/A diffsFileSize = MAX_READABLE_SIZE
4616N/A msg = 'Could not retrieve the size of file %s' % outputLdif
4616N/A <
message log="1"> 'LdifDiffWithScript: %s' % msg </
message>
4616N/A <
if expr="diffsFileSize < MAX_READABLE_SIZE">
4616N/A <
call function="'getFile'">
4616N/A # getFile returns: STAXResult = [cmdRC, cmdResult]
4616N/A diffsFileContent = STAXResult[1]
4616N/A # diffs file to big to be read
4616N/A diffsFileContent = 'File too big to be read.'
4616N/A # if the diff file is too big, it means that there ARE
4616N/A # actually some diffs, so we may deduce diffRC = 1
4631N/A <
message log="1" level="'Error'">
4631N/A 'LdifDiffWithScript: command run FAILED.'
4616N/A 'NO DIFFERENCES were detected between the source and the target \
4616N/A <
message log="1" level="'Error'">
4616N/A 'Source and target LDIF files are DIFFERENT: \n\n%s' % \
2788N/A <!-- This function modifies an LDIF file using ldifmodify script --> 2788N/A <
function name="LdifModifyWithScript">
2788N/A This function modifies an LDIF file with the changes contained in another LDIF file
2788N/A <
function-
arg-
def name="location" 2788N/A default="STAF_REMOTE_HOSTNAME">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="hostname"/>
2788N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
2788N/A Pathname to installation root
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="version" type="optional">
2788N/A Display Directory Server version information
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="string"/>
2788N/A <
function-
arg-
def name="sourceLdif" type="required">
2788N/A LDIF file containing the data to be updated
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="targetLdif" type="required">
2788N/A LDIF file that will contain the updated data
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="changesLdif" type="required">
2788N/A LDIF file containing the changes to apply
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="Help" type="optional">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="help" value="option"/>
3194N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3194N/A Expected return code value. Default value is 0.
3194N/A Wildcard 'noCheck' to not check the RC
3194N/A </
function-
arg-
description>
3951N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
3951N/A Known issue. Corresponds to an issue number.
3951N/A </
function-
arg-
description>
2788N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
2788N/A STAFCmdParams=' '.join(STAFCmdParamsList)
5976N/A <
call function="'createMultiFolders'">
5976N/A 'folderslist' : foldersToCreate
5976N/A '%s %s' % (STAFCmd, STAFCmdParams)
2788N/A <
call function="'runCommand'">
2788N/A { 'name' : 'LDIF Modify Script',
2788N/A 'arguments' : STAFCmdParams,
2788N/A <
return>STAXResult</
return>
2788N/A <
function name="verifyTrees">
3812N/A This function verifies that the trees in a group of ldap servers are
2788N/A <
function-
arg-
def name="location" 2788N/A default="STAF_REMOTE_HOSTNAME">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="hostname"/>
2788N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
2788N/A Pathname to installation root
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="referenceServer" type="required">
2788N/A Server that should be taken as reference.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server"/>
2788N/A <
function-
arg-
def name="serverList" type="required">
2788N/A List of the servers to verify against the referenceServer.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server-list"/>
2788N/A <
function-
arg-
def name="treeSuffix" type="required">
2788N/A Suffix of the tree to verify.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="DN"/>
4267N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
4267N/A Known issue. Corresponds to an issue number.
4267N/A </
function-
arg-
description>
5047N/A <
function-
arg-
def name="ignoreAttrsFile" 5047N/A File containing a list of attributes to ignore when computing the
5047N/A </
function-
arg-
description>
5047N/A <
function-
arg-
property name="type" value="filepath"/>
4648N/A <!-- Verify the synchronization of the trees among the servers in 4648N/A <
call function="'getReplicationStatus'">
4865N/A 'replicationDnList' : [treeSuffix],
3812N/A 'Verify tree %s taking %s as reference.' \
3812N/A % (treeSuffix, referenceServerPath)
4616N/A <!-- Retrieve the tree from the reference server --> 4865N/A <
call function="'exportLdifWithScript'">
4865N/A 'ldifFile' : '%s/../%s' % (dsPath, referenceTree),
4865N/A 'includeBranches' : [treeSuffix]
2788N/A <!-- If the reference tree could not be retrieved, return an error --> 2788N/A <
return> [1, None] </
return>
2788N/A <
iterate var="server" in="serverList">
2788N/A <!-- Retrieve the same tree for every other server in the list --> 4865N/A <
call function="'exportLdifWithScript'">
4865N/A 'ldifFile' : '%s/../%s' % (filePath, sampleTree),
4865N/A 'includeBranches' : [treeSuffix]
4865N/A <
if expr="not isSameLocation">
4616N/A <!-- Copy sample tree file to reference server --> 4616N/A <
call function="'copyFile'">
4616N/A 'srcfile' : '%s/../%s' % (filePath, sampleTree),
4616N/A 'destfile' : '%s/../%s' % (dsPath, sampleTree)
2788N/A <!-- Compare this tree to the reference one --> 2788N/A <
call function="'LdifDiffWithScript'">
5047N/A 'sourceLdif' : '%s/../%s' % (dsPath, sampleTree),
5047N/A 'targetLdif' : '%s/../%s' % (dsPath, referenceTree),
5047N/A 'outputLdif' : '%s/../%s' % (dsPath, treeDiffs),
5047N/A 'ignoreAttrsFile' : ignoreAttrsFile
4616N/A <
if expr="STAXResult != 0">
4616N/A <
message log="1" level="'Error'">
4616N/A 'Tree is DIFFERENT for %s:%s compared to %s:%s' % \
2788N/A <
if expr="len(failedServers) > 0">
3812N/A <!-- If at least one server failed to successfully compare to the 3812N/A ! reference tree, return an error, along with the list of the 4267N/A ! servers that failed to do so --> 3812N/A 'List of non-synchronized servers (tree verify FAILED): %s ' \
2788N/A 'All servers synchronized (tree verify SUCCEEDED).'
2788N/A <
call function="'checktestRC'">
2788N/A 'result' : failingServerList,
2788N/A <
return>[myRC, failedServers]</
return>
6360N/A <
function name="verifyTreesSdk">
6360N/A This function verifies that the trees in a group of ldap servers are
6360N/A <
function-
arg-
def name="location" 6360N/A default="STAF_REMOTE_HOSTNAME">
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="hostname"/>
6360N/A <
function-
arg-
def name="dsPath" 6360N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
6360N/A Pathname to installation root
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="filepath"/>
6360N/A <
function-
arg-
def name="referenceServer" type="required">
6360N/A Server that should be taken as reference.
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="Server"/>
6360N/A <
function-
arg-
def name="serverList" type="required">
6360N/A List of the servers to verify against the referenceServer.
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="Server-list"/>
6360N/A <
function-
arg-
def name="treeSuffix" type="required">
6360N/A Suffix of the tree to verify.
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="DN"/>
6360N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
6360N/A Known issue. Corresponds to an issue number.
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
def name="ignoreAttrsFile" 6360N/A File containing a list of attributes to ignore when computing the
6360N/A </
function-
arg-
description>
6360N/A <
function-
arg-
property name="type" value="filepath"/>
6360N/A <!-- Verify the synchronization of the trees among the servers in 6360N/A <
call function="'getReplicationStatus'">
6360N/A 'replicationDnList' : [treeSuffix],
6360N/A 'Verify tree %s taking %s as reference.' \
6360N/A % (treeSuffix, referenceServerPath)
6360N/A <!-- Retrieve the tree from the reference server --> 6360N/A <
call function="'exportLdifWithScript'">
6360N/A 'ldifFile' : '%s/../%s' % (dsPath, referenceTree),
6360N/A 'includeBranches' : [treeSuffix]
6360N/A <!-- If the reference tree could not be retrieved, return an error --> 6360N/A <
return> [1, None] </
return>
6360N/A <
iterate var="server" in="serverList">
6360N/A <!-- Retrieve the same tree for every other server in the list --> 6360N/A <
call function="'exportLdifWithScript'">
6360N/A 'ldifFile' : '%s/../%s' % (filePath, sampleTree),
6360N/A 'includeBranches' : [treeSuffix]
6360N/A <
if expr="not isSameLocation">
6360N/A <!-- Copy sample tree file to reference server --> 6360N/A <
call function="'copyFile'">
6360N/A 'srcfile' : '%s/../%s' % (filePath, sampleTree),
6360N/A 'destfile' : '%s/../%s' % (dsPath, sampleTree)
6360N/A <!-- Compare this tree to the reference one --> 6360N/A <
call function="'LdifDiffSdk'">
6360N/A 'sourceLdif' : '%s/../%s' % (dsPath, sampleTree),
6360N/A 'targetLdif' : '%s/../%s' % (dsPath, referenceTree),
6360N/A 'outputLdif' : '%s/../%s' % (dsPath, treeDiffs)
6360N/A <
if expr="STAXResult[0][0] != 0">
6360N/A <
message log="1" level="'Error'">
6360N/A 'Tree is DIFFERENT for %s:%s compared to %s:%s' % \
6360N/A <
if expr="len(failedServers) > 0">
6360N/A <!-- If at least one server failed to successfully compare to the 6360N/A ! reference tree, return an error, along with the list of the 6360N/A ! servers that failed to do so --> 6360N/A 'List of non-synchronized servers (tree verify FAILED): %s ' \
6360N/A 'All servers synchronized (tree verify SUCCEEDED).'
6360N/A <
call function="'checktestRC'">
6360N/A 'result' : failingServerList,
6360N/A <
return>[myRC, failedServers]</
return>
2788N/A <
function name="verifySchemas">
2788N/A This function verifies that a schema file is synchronized all over a group of servers.
2788N/A <
function-
arg-
def name="location" 2788N/A default="STAF_REMOTE_HOSTNAME">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="hostname"/>
2788N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
2788N/A Pathname to installation root
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filepath"/>
2788N/A <
function-
arg-
def name="referenceServer" type="required">
2788N/A Server that should be taken as reference.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server"/>
2788N/A <
function-
arg-
def name="serverList" type="required">
2788N/A List of the servers to verify against the referenceServer.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server-list"/>
2788N/A <
function-
arg-
def name="schemaFile" type="required">
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="filename"/>
4267N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
4267N/A Known issue. Corresponds to an issue number.
4267N/A </
function-
arg-
description>
2788N/A 'Verify schema file %s taking %s as reference.' % (schemaFile, referenceServerPath)
2788N/A <
iterate var="server" in="serverList">
2788N/A <!-- Copy reference schema file to other server --> 2788N/A <
call function="'copyFile'">
2788N/A 'srcfile' : referenceSchema,
2788N/A <!-- Compare this schema to the reference one --> 2788N/A <
call function="'LdifDiffWithScript'">
2788N/A <
if expr="len(failedServers) > 0">
2788N/A <!-- If at least one server failed to successfully compare to the reference tree, 2788N/A ! return an error, along with the list of the servers that failed to do so --> 2788N/A failingServerList = 'List of non-synchronized servers (schema verify FAILED): %s ' %
comma.join(failedServers)
2788N/A 'All servers synchronized (schema verify SUCCEEDED).'
2788N/A <
call function="'checktestRC'">
2788N/A 'result' : failingServerList ,
2788N/A <
return>[myRC, failedServers]</
return>
2788N/A <
function name="deleteTrees">
2788N/A This function deletes a (sub)tree from a list of servers.
2788N/A <
function-
arg-
def name="serverList" type="required">
2788N/A List of the servers (instances of "Server" class) where the tree will be deleted.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server-list"/>
2788N/A <
function-
arg-
def name="treeSuffix" type="required">
2788N/A Suffix of the tree to delete.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="DN"/>
2788N/A <
function-
arg-
def name="startDS" type="optional" default="True">
2788N/A Need to start the Directory Servers before deleting.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="boolean"/>
2788N/A <!-- Start the servers in the list --> 2788N/A <
call function="'startServers'">
2788N/A <!-- Delete the tree in every server in the list --> 2788N/A <
paralleliterate var="server" in="serverList">
2788N/A <!-- Delete suffix and subtree --> 2788N/A <
call function="'ldapDeleteWithScript'">
2788N/A <!-- Stop the servers in the list --> 2788N/A <
call function="'stopServers'">
2788N/A <
function name="startServers">
2788N/A This function starts a list of servers.
2788N/A <
function-
arg-
def name="serverList" type="required">
2788N/A List of the servers (instances of "Server" class) to be started.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server-list"/>
5098N/A <!-- Check if using coverage in which case we'll avoid doing parallele iterate --> 5098N/A <
call function="'GetEntry'">
5098N/A 'location' : STAF_REMOTE_HOSTNAME ,
5098N/A <
script>coverage = True</
script>
5098N/A <
script>coverage = False</
script>
5098N/A <!-- Start the servers in the list --> 5056N/A <
if expr="coverage == True">
5056N/A <
message>'starting servers in sequence using "iterate"'</
message>
5056N/A <
iterate var="server" in="serverList">
5056N/A <
call function="'StartDsWithScript'">
5056N/A <!--- Check that DS started --> 5056N/A <
call function="'isAlive'">
5056N/A <
message>'starting servers in parallel using "paralleliterate"'</
message>
5056N/A <
paralleliterate var="server" in="serverList">
5056N/A <
call function="'StartDsWithScript'">
5056N/A <!--- Check that DS started --> 5056N/A <
call function="'isAlive'">
2788N/A <
function name="stopServers">
2788N/A This function stops a list of servers.
2788N/A <
function-
arg-
def name="serverList" type="required">
2788N/A List of the servers (instances of "Server" class) to be stopped.
2788N/A </
function-
arg-
description>
2788N/A <
function-
arg-
property name="type" value="Server-list"/>
4865N/A <
function-
arg-
def name="noOfLoops" 4865N/A Number of iterations (for isStopped())
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="integer"/>
4865N/A <
function-
arg-
def name="noOfMilliSeconds" 4865N/A Number of seconds to wait between iterations (for isStopped())
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="seconds"/>
2788N/A <!-- Stop the servers in the list --> 2788N/A <
paralleliterate var="server" in="serverList">
2788N/A <
call function="'StopDsWithScript'">
4865N/A 'noOfMilliSeconds' : noOfMilliSeconds
3315N/A <!-- This function perform a search operation in a LDIF file --> 3321N/A <
function name="ldifSearchWithScript" scope="local">
3315N/A This function perform a search operation in a LDIF file
3315N/A <
function-
arg-
def name="location" 3315N/A default="STAF_REMOTE_HOSTNAME">
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="hostname"/>
3315N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
3315N/A Pathname to installation root
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filepath"/>
3315N/A <
function-
arg-
def name="dsBaseDN" type="optional">
3315N/A The baseDN for the search operation
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="dn"/>
3315N/A <
function-
arg-
def name="dsFilterFile" type="optional">
3315N/A File containing a list of search filter strings
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filename"/>
3315N/A <
function-
arg-
def name="dsLdifFile" type="required">
3315N/A LDIF file to use as the source data
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filename"/>
3315N/A <
function-
arg-
def name="dsOutputFile" type="optional">
3315N/A File to which the search results should be written
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filename"/>
4865N/A <
function-
arg-
def name="dsOverwriteExisting" 3315N/A Overwrite the output file specified
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filename"/>
3315N/A <
function-
arg-
def name="dsSearchScope" type="optional">
3315N/A The scope of the search operation
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="option"/>
3315N/A <
function-
arg-
def name="dsTimeLimit" type="optional">
3315N/A Maximum length of time in seconds to allow for the search
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="integer"/>
3315N/A <
function-
arg-
def name="dsSizeLimit" type="optional">
3315N/A Maximum number of entries to return from the search
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="integer"/>
3315N/A <
function-
arg-
def name="dsDontWrap" type="optional">
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="option"/>
3315N/A <
function-
arg-
def name="dsHelp" type="optional">
3315N/A Display this usage information
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="option"/>
3315N/A <
function-
arg-
def name="dsVersion" type="optional">
3315N/A Display Directory Server version information
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="option"/>
3315N/A <
function-
arg-
def name="dsFilter" type="optional">
3315N/A The filter for the search operation
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="filter"/>
3315N/A <
function-
arg-
def name="dsAttributes" type="optional">
3315N/A Only return these attributes
3315N/A </
function-
arg-
description>
3315N/A <
function-
arg-
property name="type" value="string"/>
3315N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3315N/A Expected return code value. Default value is 0
3315N/A Wildcard 'noCheck' to not check the RC
3315N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="integer"/>
3315N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3315N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3315N/A <
call function="'runCommand'" >
3315N/A 'name' : 'LDIF Search Script',
3315N/A 'arguments' : STAFCmdParams,
3315N/A <
return>STAXResult</
return>
3327N/A <!-- This function execute the encode-password tool --> 3327N/A <
function name="encodePasswordWithScript" scope="local">
3327N/A This function execute the encode-password tool
3321N/A <
function-
arg-
def name="location" 3321N/A default="STAF_REMOTE_HOSTNAME">
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="hostname"/>
3321N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
3321N/A Pathname to installation root
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="filepath"/>
3327N/A <
function-
arg-
def name="authPwdSyntax" type="optional">
3327N/A Use the authentication password syntax.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="clearPwd" type="optional">
3327N/A Specify the clear-text password.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="string"/>
3327N/A <
function-
arg-
def name="encodedPwd" type="optional">
3327N/A Specify the encoded password.
3321N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="string"/>
3327N/A <
function-
arg-
def name="encodedPwdFile" type="optional">
3327N/A Use the encoded password from the specified file.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filename"/>
3327N/A <
function-
arg-
def name="clearPwdFile" type="optional">
3327N/A Use the clear-text password from the specified file.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filename"/>
3327N/A <
function-
arg-
def name="listSchemes" type="optional">
3327N/A Display a list of the password storage schemes that are available
3327N/A for use in the OpenDS server.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="useCmpRC" type="optional">
3327N/A Use an exit code that indicates whether a given clear-text password
3327N/A matched a provided encoded password.
3327N/A Results are an exit code of 6 (COMPARE_TRUE) or
3327N/A an exit code of 5 (COMPARE_FALSE).
3321N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="storageScheme" type="optional">
3327N/A Specify the name of the password storage scheme to use when
3327N/A encoding a clear-text password.
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3321N/A <
function-
arg-
def name="dsHelp" type="optional">
3321N/A Display this usage information
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="option"/>
3321N/A <
function-
arg-
def name="dsVersion" type="optional">
3321N/A Display Directory Server version information
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="option"/>
3321N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3321N/A Expected return code value. Default value is 0.
3321N/A Wildcard 'noCheck' to not check the RC
3321N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="integer"/>
5061N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
5061N/A Known issue. Corresponds to an issue number.
5061N/A </
function-
arg-
description>
3321N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3321N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3321N/A <
call function="'runCommand'">
3327N/A 'name' : 'Encode password script',
3321N/A 'arguments' : STAFCmdParams,
3321N/A <
return>STAXResult</
return>
4865N/A <!-- This function check task execution--> 4865N/A <
function name="checkTaskExecution" scope="local">
4865N/A This functioncheck task execution
4865N/A <
function-
arg-
def name="location" 4865N/A default="STAF_REMOTE_HOSTNAME">
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="hostname"/>
4865N/A <
function-
arg-
def name="dsPath" 4865N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
4865N/A Pathname to installation root
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="filepath"/>
4865N/A <
function-
arg-
def name="outputToCheck" type="required">
4865N/A The output result of the task
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="string"/>
4865N/A <
function-
arg-
def name="dsInstanceDn" type="required">
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="DN" />
4865N/A <
function-
arg-
def name="dsInstanceAdminPort" 4865N/A default="DIRECTORY_INSTANCE_ADMIN_PORT">
4865N/A Directory server admin port number
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="Port number" />
4865N/A <
function-
arg-
def name="dsInstanceHost" 4865N/A default="STAF_REMOTE_HOSTNAME">
4865N/A Directory server hostname or IP address
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="hostname" />
4865N/A <
function-
arg-
def name="dsInstancePswd" type="required">
4865N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="string" />
4865N/A resultString = outputToCheck
4865N/A 'Command task Id : %s' % taskId
4865N/A 'Check ldif command successfully completed with manage-task'
4865N/A <
script>checkRC=9999</
script>
4865N/A <
loop from="1" to="10" var="loop" while="checkRC != 0">
4865N/A <
message>'LOOP %s' % loop</
message>
4865N/A <
call function="'manage-tasks'">
4865N/A 'dsInstanceHost' : dsInstanceHost ,
4865N/A 'dsInstanceAdminPort' : dsInstanceAdminPort,
4865N/A 'dsInstanceDn' : dsInstanceDn ,
4865N/A 'dsInstancePswd' : dsInstancePswd ,
4865N/A returnString = STAXResult[0][1]
4865N/A msg = 'Status Completed successfully'
4865N/A <
call function="'searchString'">
4865N/A 'returnString' : returnString ,
4865N/A { 'sleepForMilliSeconds' : 2000 }
4865N/A <
call function="'checktestRC'">
4865N/A 'result' : "Task succeeds" ,
3327N/A <!-- This function compares two LDIF files using the ldif-diff script --> 3327N/A <
function name="LdifDiffWithScript-new" scope="local">
3327N/A This function compares two LDIF files and reports the differences
3321N/A <
function-
arg-
def name="location" 3321N/A default="STAF_REMOTE_HOSTNAME">
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="hostname"/>
3321N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
3321N/A Pathname to installation root
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="filepath"/>
3321N/A <
function-
arg-
def name="dsVersion" type="optional">
3321N/A Display Directory Server version information
3321N/A </
function-
arg-
description>
3321N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="sourceLdif" type="required">
3327N/A LDIF file to use as the source data
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filepath"/>
3327N/A <
function-
arg-
def name="targetLdif" type="required">
3327N/A LDIF file to use as the target data
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filepath"/>
3327N/A <
function-
arg-
def name="outputLdif" type="required">
3327N/A File to which the diffs should be written
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filepath"/>
3327N/A <
function-
arg-
def name="overwriteExisting" type="optional" default="True">
3327N/A Overwrite existing output file rather than append to it
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="singleValueChanges" type="optional">
3327N/A Write each attribute-level change as a separate modification
3327N/A per attribute value rather than one modification per entry
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
6066N/A <
function-
arg-
def name="useCmpRC" type="optional">
6073N/A Use an exit code that indicates whether difference were not found.
6066N/A Results are an exit code of 6 (COMPARE_TRUE) or
6066N/A an exit code of 5 (COMPARE_FALSE).
6066N/A </
function-
arg-
description>
6066N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="dsHelp" type="optional">
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="help" value="option"/>
3327N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3327N/A Expected return code value. Default value is 0.
3327N/A Wildcard 'noCheck' to not check the RC
3327N/A </
function-
arg-
description>
4865N/A <
function-
arg-
property name="type" value="integer"/>
3951N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
3951N/A Known issue. Corresponds to an issue number.
3951N/A </
function-
arg-
description>
3327N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3327N/A STAFCmdParams=' '.join(STAFCmdParamsList)
5976N/A <
call function="'createMultiFolders'">
5976N/A 'folderslist' : foldersToCreate
5976N/A '%s %s' % (STAFCmd, STAFCmdParams)
3327N/A <
call function="'runCommand'">
3327N/A 'name' : 'Ldif diff script',
3327N/A 'arguments' : STAFCmdParams,
3951N/A 'expectedRC' : expectedRC ,
3327N/A <
return>STAXResult</
return>
3327N/A <!-- This function execute the dsjavaproperties tool --> 3327N/A <
function name="dsJavaPropertiesWithScript" scope="local">
3327N/A This function execute the dsjavaproperties tool
3327N/A <
function-
arg-
def name="location" 3327N/A default="STAF_REMOTE_HOSTNAME">
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="hostname"/>
3327N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
3327N/A Pathname to installation root
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="filepath"/>
3327N/A <
function-
arg-
def name="Version" type="optional">
3327N/A Display Directory Server version information
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="Quiet" type="optional">
3327N/A Run dsjavaproperties in quiet mode
3327N/A Quiet mode does not output progress information to standard output
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="type" value="option"/>
3327N/A <
function-
arg-
def name="Help" type="optional">
3327N/A </
function-
arg-
description>
3327N/A <
function-
arg-
property name="help" value="option"/>
3321N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3321N/A Expected return code value. Default value is 0.
3321N/A Wildcard 'noCheck' to not check the RC
3321N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="integer"/>
3321N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3321N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3321N/A <
call function="'runCommand'">
3327N/A 'name' : 'dsjavaproperties script',
3321N/A 'arguments' : STAFCmdParams,
3321N/A <
return>STAXResult</
return>
3648N/A <!-- This function uses manage-account to manage users account--> 3648N/A <
function name="manageAccountWithScript">
3648N/A This function uses manage-account to manage users account
3648N/A <
function-
arg-
def name="location" 3648N/A default="STAF_REMOTE_HOSTNAME">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="hostname" />
3648N/A <
function-
arg-
def name="dsPath" 4153N/A default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
3648N/A Pathname to installation root
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filepath" />
3648N/A <
function-
arg-
def name="dsInstanceHost" 3648N/A default="STAF_REMOTE_HOSTNAME">
3648N/A Directory server hostname or IP address
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="hostname" />
3853N/A <
function-
arg-
def name="dsInstanceAdminPort" 3853N/A default="DIRECTORY_INSTANCE_ADMIN_PORT">
3853N/A Directory server admin port number
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="Port number" />
3648N/A <
function-
arg-
def name="dsInstanceDn" type="required">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="DN" />
3648N/A <
function-
arg-
def name="targetDn" type="required">
3648N/A Specifies the DN of the user entry for which to get and set password
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="dn"/>
3648N/A <
function-
arg-
def name="dsInstancePswd" type="required">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string" />
3648N/A <
function-
arg-
def name="dsBindPasswordFile" type="optional">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filename"/>
3648N/A <
function-
arg-
def name="subcommand" type="required">
3648N/A manage-account subcommand to execute
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string" />
3648N/A <
function-
arg-
def name="expectedRC" type="optional" default="0">
3648N/A Expected return code value. Default value is 0.
3648N/A Wildcard 'noCheck' to not check the RC
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string" />
4618N/A <
function-
arg-
def name="dsHelp" type="optional">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="help" value="option"/>
3648N/A <
function-
arg-
def name="dsVersion" type="optional">
3648N/A Display Directory Server version information
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="option"/>
3648N/A <
function-
arg-
def name="dsCertNickname" type="optional">
3648N/A Nickname of certificate for SSL client authentication
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string"/>
3648N/A <
function-
arg-
def name="dsKeyStorePath" type="optional">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filename"/>
3648N/A <
function-
arg-
def name="dsSaslOption" type="optional">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string"/>
3648N/A <
function-
arg-
def name="dsTrustStorePath" type="optional">
3648N/A Certificate trust store path
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filename"/>
3648N/A <
function-
arg-
def name="dsUseStartTLS" type="optional">
3648N/A Use StartTLS to secure communication with the server
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="option"/>
3648N/A <
function-
arg-
def name="dsTrustStorePassword" type="optional">
3648N/A Certificate trust store PIN
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string"/>
3648N/A <
function-
arg-
def name="dsTrustStorePasswordFile" type="optional">
3648N/A Certificate trust store PIN file
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filename"/>
3648N/A <
function-
arg-
def name="dsKeyStorePasswordFile" type="optional">
3648N/A Certificate keystore PIN file
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="filename"/>
3648N/A <
function-
arg-
def name="dsKeyStorePassword" type="optional">
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="string"/>
3648N/A <
function-
arg-
def name="dsUseSSL" type="optional">
3648N/A Use SSL for secure communication with the server
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="option"/>
3648N/A <
function-
arg-
def name="dsTrustAll" type="optional">
3648N/A Trust all server SSL certificates
3648N/A </
function-
arg-
description>
3648N/A <
function-
arg-
property name="type" value="option"/>
3707N/A <
function-
arg-
def name="dsOperationValue" type="optional">
3707N/A dsOperationValue is true or false
3707N/A </
function-
arg-
description>
3707N/A <
function-
arg-
property name="type" value="boolean"/>
3648N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3648N/A if dsTrustStorePasswordFile:
3648N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3648N/A <
call function="'runCommand'" >
3648N/A { 'name' : 'Manage-account script',
3648N/A 'arguments' : STAFCmdParams,
4616N/A <
function name="verifyReplication">
4616N/A This function verifies that replication is working, that is, the updates
4616N/A done on any of the servers in the topology are being pushed to the other
4616N/A <
function-
arg-
def name="serverList" type="required">
4616N/A List of the servers to verify against the referenceServer.
4616N/A </
function-
arg-
description>
4616N/A <
function-
arg-
property name="type" value="Server-list"/>
4616N/A <
function-
arg-
def name="replicatedSuffix" type="required">
4616N/A Suffix of the tree to verify.
4616N/A </
function-
arg-
description>
4616N/A <
function-
arg-
property name="type" value="DN"/>
4616N/A <
function-
arg-
def name="knownIssue" type="optional" default="None">
4616N/A Known issue. Corresponds to an issue number.
4616N/A </
function-
arg-
description>
4616N/A 'verifyReplication: Verify updates on the suffix %s are being \
4616N/A replicated.' % replicatedSuffix
4616N/A <
iterate var="server" in="serverList" indexvar="i">
4616N/A otherServersList = serverList[:i] + serverList[i+1:]
4616N/A entryDn = 'uid=testentry-%s, %s' % (i, replicatedSuffix)
4616N/A failedServers = STAXGlobal( [] )
4616N/A <!-- Add entry to one of the other servers --> 4616N/A 'verifyReplication: Add entry %s to server %s:%s' % \
4616N/A <
call function="'addAnEntry'">
4616N/A 'dsInstanceHost' : serverHost,
4616N/A 'listAttributes' : listAttr
4616N/A { 'sleepForMilliSeconds' : 2000 }
4616N/A <!-- Check the update has been propagated --> 4616N/A <
paralleliterate var="otherServer" in="otherServersList">
4616N/A <
call function="'ldapSearchWithScript'">
4616N/A 'dsFilter' : 'objectclass=*',
4616N/A searchResult = STAXResult[0][1]
4616N/A resultLength = len(searchResult) > 0
4616N/A <
if expr="resultLength != 0">
4616N/A '+++++++++++ LDAPSEARCH RESULT for %s:%s ++++++++\n%s' \
4616N/A 'verifyReplication: Entry %s NOT found in server %s:%s' % \
4616N/A <
if expr="len(failedServers) > 0">
4616N/A <!-- If at least one server failed to receive the update return an 4616N/A ! error, along with the list of the servers that failed to do so 4616N/A 'List of non-synchronized servers (replication verify FAILED \
4616N/A 'All servers synchronized (replication verify SUCCEEDED for \
4616N/A <
call function="'checktestRC'">
4616N/A 'result' : failingServerList,
5047N/A <!-- Remove footprint: delete the entry just added --> 5047N/A <
call function="'ldapDeleteWithScript'">
5047N/A 'dsInstanceHost' : serverHost,