This function uses make ldif to generate LDIF data files
Location of target host
Pathname to installation root
Display Directory Server version information
Path to the template file
Path to the LDIF file
The seed to use to initialize the random number generator
Help option
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
Known issue. Corresponds to an issue number.
{ 'name' : 'Make Ldif Script',
'location' : location,
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
STAXResult
This function makes a make-ldif template file
Number of entries
Start entries number
Suffix
Template file name
Template file location
Add (or not) additional attributes
Extra line to add to the mkae-ldif template
'creation of a make-ldif template failed (Code=%s,Reason=%s).' % (STAXCode,STAXReason)
{ 'returncode' : STAXCode ,
'result' : STAXReason }
{ 'location' : STAXServiceMachine,
'srcfile' : tmpTemplateFile,
'destfile' : templateFile,
'remotehost' : templateLocation }
{
'returncode' : RC ,
'result' : STAXResult
}
[RC, STAXResult]
This function compares two LDIF files and reports the differences in LDIF format
Location of target host
Pathname to installation root
Display Directory Server version information
LDIF file to use as the source data
LDIF file to use as the target data
File to which the diffs should be written
File containing a list of attributes to ignore when computing the
difference
Overwrite existing output file rather than append to it
Write each attribute-level change as a separate modification
per attribute value rather than one modification per entry
Help option
'Running command:\n %s %s\nlocation: %s\nworkdir: %s' \
% (STAFCmd,STAFCmdParams,location,dsBinPath)
location
STAFCmd
STAFCmdParams
dsBinPath
['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
{
'location' : location,
'entry' : outputLdif,
'attribute' : 'SIZE'
}
'LdifDiffWithScript: %s' % msg
{ 'location' : location,
'filename' : outputLdif
}
'LdifDiffWithScript: command run FAILED.'
-1
'NO DIFFERENCES were detected between the source and the target \
LDIF files.'
'Source and target LDIF files are DIFFERENT: \n\n%s' % \
diffsFileContent
diffRC
This function modifies an LDIF file with the changes contained in another LDIF file
Location of target host
Pathname to installation root
Display Directory Server version information
LDIF file containing the data to be updated
LDIF file that will contain the updated data
LDIF file containing the changes to apply
Help option
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
Known issue. Corresponds to an issue number.
{ 'name' : 'LDIF Modify Script',
'location' : location,
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
STAXResult
This function verifies that the trees in a group of ldap servers are
synchronized.
Location of target host
Pathname to installation root
Server that should be taken as reference.
List of the servers to verify against the referenceServer.
Suffix of the tree to verify.
Known issue. Corresponds to an issue number.
File containing a list of attributes to ignore when computing the
difference
{ 'location' : location,
'dsPath' : dsPath,
'dsInstanceHost' : referenceServer.getHostname(),
'dsInstanceAdminPort' : referenceServer.getAdminPort(),
'replicationDnList' : [treeSuffix],
'noOfLoops' : 10,
'noOfMilliSeconds' : 6000
}
'Verify tree %s taking %s as reference.' \
% (treeSuffix, referenceServerPath)
{ 'location' : location,
'dsPath' : dsPath,
'dsInstanceHost' : referenceServer.getHostname(),
'dsInstanceAdminPort' : referenceServer.getAdminPort(),
'dsInstanceDn' : referenceServer.getRootDn(),
'dsInstancePswd' : referenceServer.getRootPwd(),
'ldifFile' : '%s/../%s' % (dsPath, referenceTree),
'includeBranches' : [treeSuffix]
}
[1, None]
{ 'location' : location,
'dsPath' : dsPath,
'dsInstanceHost' : server.getHostname(),
'dsInstanceAdminPort' : server.getAdminPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'ldifFile' : '%s/../%s' % (filePath, sampleTree),
'includeBranches' : [treeSuffix]
}
{ 'location' : server.getHostname(),
'remotehost' : location,
'srcfile' : '%s/../%s' % (filePath, sampleTree),
'destfile' : '%s/../%s' % (dsPath, sampleTree)
}
{ 'location' : location,
'dsPath' : dsPath,
'sourceLdif' : '%s/../%s' % (dsPath, sampleTree),
'targetLdif' : '%s/../%s' % (dsPath, referenceTree),
'outputLdif' : '%s/../%s' % (dsPath, treeDiffs),
'ignoreAttrsFile' : ignoreAttrsFile
}
'Tree is DIFFERENT for %s:%s compared to %s:%s' % \
(server.getHostname(), server.getPort(),
referenceServer.getHostname(), referenceServer.getPort())
'All servers synchronized (tree verify SUCCEEDED).'
{ 'returncode' : myRC,
'result' : failingServerList,
'expected' : 0,
'issue' : myKnownIssue
}
[myRC, failedServers]
This function verifies that a schema file is synchronized all over a group of servers.
Location of target host
Pathname to installation root
Server that should be taken as reference.
List of the servers to verify against the referenceServer.
Schema file to verify.
Known issue. Corresponds to an issue number.
'Verify schema file %s taking %s as reference.' % (schemaFile, referenceServerPath)
{ 'location' : referenceServer.getHostname(),
'remotehost' : server.getHostname(),
'srcfile' : referenceSchema,
'destfile' : '%s/reference_%s' % (server.getDir(),schemaFile)
}
{ 'location' : location,
'dsPath' : dsPath,
'sourceLdif' : '%s/config/schema/%s' % (serverPath, schemaFile),
'targetLdif' : '%s/reference_%s' % (server.getDir(), schemaFile),
'outputLdif' : '%s/%s' % (server.getDir(), schemaDiffs)
}
'All servers synchronized (schema verify SUCCEEDED).'
{ 'returncode' : myRC,
'result' : failingServerList ,
'expected' : 0,
'issue' : myKnownIssue
}
[myRC, failedServers]
This function deletes a (sub)tree from a list of servers.
List of the servers (instances of "Server" class) where the tree will be deleted.
Suffix of the tree to delete.
Need to start the Directory Servers before deleting.
[serverList]
'Delete suffix %s on server running on host %s on port %s' % (treeSuffix, server.getHostname(), server.getPort())
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME),
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'dsDn' : [treeSuffix],
'dsDeleteSubtree' : True
}
[serverList]
This function starts a list of servers.
List of the servers (instances of "Server" class) to be started.
{
'location' : STAF_REMOTE_HOSTNAME ,
'entry' : '%s/%s/lib/emma.jar' % (serverList[0].getDir(),OPENDSNAME) ,
'attribute' : 'TYPE'
}
'tools.xml - coverage=%s' % coverage
'starting servers in sequence using "iterate"'
'Start DS on host %s to run on port %s' % (server.getHostname(),server.getPort())
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME)
}
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME),
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000
}
'starting servers in parallel using "paralleliterate"'
'Start DS on host %s to run on port %s' % (server.getHostname(),server.getPort())
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME)
}
{ 'location' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME),
'dsInstanceHost' : server.getHostname(),
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'noOfLoops' : 10 ,
'noOfMilliSeconds' : 2000
}
This function stops a list of servers.
List of the servers (instances of "Server" class) to be stopped.
Number of iterations (for isStopped())
Number of seconds to wait between iterations (for isStopped())
'Stop DS on host %s running on port %s' % (server.getHostname(),server.getPort())
{ 'location' : server.getHostname(),
'dsHost' : server.getHostname(),
'dsPath' : '%s/%s' % (server.getDir(),OPENDSNAME),
'dsAdminPort' : server.getAdminPort(),
'dsBindDN' : server.getRootDn(),
'dsBindPwd' : server.getRootPwd(),
'noOfLoops' : noOfLoops,
'noOfMilliSeconds' : noOfMilliSeconds
}
This function perform a search operation in a LDIF file
Location of target host
Pathname to installation root
The baseDN for the search operation
File containing a list of search filter strings
LDIF file to use as the source data
File to which the search results should be written
Overwrite the output file specified
The scope of the search operation
Maximum length of time in seconds to allow for the search
Maximum number of entries to return from the search
Do not wrap long lines
Display this usage information
Display Directory Server version information
The filter for the search operation
Only return these attributes
Expected return code value. Default value is 0
Wildcard 'noCheck' to not check the RC
{
'name' : 'LDIF Search Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC' : expectedRC
}
STAXResult
This function execute the encode-password tool
Location of target host
Pathname to installation root
Use the authentication password syntax.
Specify the clear-text password.
Specify the encoded password.
Use the encoded password from the specified file.
Use the clear-text password from the specified file.
Display a list of the password storage schemes that are available
for use in the OpenDS server.
Use an exit code that indicates whether a given clear-text password
matched a provided encoded password.
Results are an exit code of 6 (COMPARE_TRUE) or
an exit code of 5 (COMPARE_FALSE).
Specify the name of the password storage scheme to use when
encoding a clear-text password.
Display this usage information
Display Directory Server version information
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
Known issue. Corresponds to an issue number.
{
'name' : 'Encode password script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC' : expectedRC,
'knownIssue' : knownIssue
}
STAXResult
This functioncheck task execution
Location of target host
Pathname to installation root
The output result of the task
Bind DN
Directory server admin port number
Directory server hostname or IP address
Bind password
'Command task Id : %s' % taskId
'Check ldif command successfully completed with manage-task'
'LOOP %s' % loop
{
'dsPath' : dsPath,
'dsInstanceHost' : dsInstanceHost ,
'dsInstanceAdminPort' : dsInstanceAdminPort,
'dsInstanceDn' : dsInstanceDn ,
'dsInstancePswd' : dsInstancePswd ,
'dsInfo' : taskId ,
'dsQuiet' : 'True' ,
'expectedRC' : 'noCheck'
}
{
'expectedString' : msg ,
'returnString' : returnString ,
'expectedRC' : 'noCheck'
}
{ 'sleepForMilliSeconds' : 2000 }
{ 'returncode' : checkRC ,
'result' : "Task succeeds" ,
'expected' : 0
}
This function compares two LDIF files and reports the differences
in LDIF format
Location of target host
Pathname to installation root
Display Directory Server version information
LDIF file to use as the source data
LDIF file to use as the target data
File to which the diffs should be written
Overwrite existing output file rather than append to it
Write each attribute-level change as a separate modification
per attribute value rather than one modification per entry
Help option
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
Known issue. Corresponds to an issue number.
{
'name' : 'Ldif diff script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC' : expectedRC ,
'knownIssue' : knownIssue
}
STAXResult
This function execute the dsjavaproperties tool
Location of target host
Pathname to installation root
Display Directory Server version information
Run dsjavaproperties in quiet mode
Quiet mode does not output progress information to standard output
Help option
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
{
'name' : 'dsjavaproperties script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC' : expectedRC
}
STAXResult
This function uses manage-account to manage users account
Location of target host
Pathname to installation root
Directory server hostname or IP address
Directory server admin port number
Bind DN
Specifies the DN of the user entry for which to get and set password
policy state information
Bind password
Bind password file
manage-account subcommand to execute
Expected return code value. Default value is 0.
Wildcard 'noCheck' to not check the RC
Help option
Display Directory Server version information
Nickname of certificate for SSL client authentication
Certificate keystore path
SASL bind options
Certificate trust store path
Use StartTLS to secure communication with the server
Certificate trust store PIN
Certificate trust store PIN file
Certificate keystore PIN file
Certificate keystore PIN
Use SSL for secure communication with the server
Trust all server SSL certificates
dsOperationValue is true or false
{ 'name' : 'Manage-account script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC
}
STAXResult
This function verifies that replication is working, that is, the updates
done on any of the servers in the topology are being pushed to the other
servers.
List of the servers to verify against the referenceServer.
Suffix of the tree to verify.
Known issue. Corresponds to an issue number.
'verifyReplication: Verify updates on the suffix %s are being \
replicated.' % replicatedSuffix
'verifyReplication: Add entry %s to server %s:%s' % \
(entryDn, serverHost, server.getPort())
{ 'location' : serverHost,
'dsPath' : serverPath,
'dsInstanceHost' : serverHost,
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'DNToAdd' : entryDn,
'listAttributes' : listAttr
}
{ 'sleepForMilliSeconds' : 2000 }
{ 'location' : otherServer.getHostname(),
'dsPath' : '%s/%s' \
% (otherServer.getDir(), OPENDSNAME),
'dsInstanceHost' : otherServer.getHostname(),
'dsInstancePort' : otherServer.getPort(),
'dsInstanceDn' : otherServer.getRootDn(),
'dsInstancePswd' : otherServer.getRootPwd(),
'dsBaseDN' : entryDn,
'dsFilter' : 'objectclass=*',
'logStderr' : False
}
'+++++++++++ LDAPSEARCH RESULT for %s:%s ++++++++\n%s' \
% (otherServer.getHostname(), otherServer.getPort(),
searchResult)
'verifyReplication: Entry %s NOT found in server %s:%s' % \
(entryDn, otherServer.getHostname(), otherServer.getPort())
'All servers synchronized (replication verify SUCCEEDED for \
entry %s)' % entryDn
{ 'returncode' : myRC,
'result' : failingServerList,
'expected' : 0,
'issue' : myKnownIssue
}
{ 'location' : serverHost,
'dsPath' : serverPath,
'dsInstanceHost' : serverHost,
'dsInstancePort' : server.getPort(),
'dsInstanceDn' : server.getRootDn(),
'dsInstancePswd' : server.getRootPwd(),
'dsDn' : [entryDn]
}