This function sets up a Directory Server using a script Location of target host Pathname to installation root Directory server port number Directory server JMX port number Base DN (only single base DN supported). Bind DN Bind password Bind password file Enable as a Windows Service Help option '%s %s' % (STAFCmd, STAFCmdParams) '%s' % location '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsPath ['PATH=/bin:/usr/bin:%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : RC , 'result' : STAXResult } This function configures a Directory Server using a script Location of target host Pathname to installation root Display Directory Server version information Directory server LDAP port number Directory server LDAPS port number Specifies whether to enable or not StartTLS Directory server JMX port number DN of the key manager provider to use for SSL and/or StartTLS DN of the trust manager provider to use for SSL and/or StartTLS Path of the keystore to be used by the key manager provider Nickname of the certificate Base DN (only single base DN supported). Root User Bind DN Root User Bind password Root User password file Help option '%s %s' % (STAFCmd, STAFCmdParams) '%s' % location '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : RC , 'result' : STAXResult } This function starts a Directory Server Location of target host Pathname to installation root Directory server version Directory server system info Do not detach directory server from process Help option Directory server build information '%s %s' % (STAFCmd, STAFCmdParams) '%s' % location '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : startRC , 'result' : startResult } startResult[0] This function starts a Directory Server using the script Location of target host Pathname to installation root Directory server hostname or IP address Directory server port number Use SSL for secure communication with the server Use StartTLS for secure communication with the server Bind DN Bind password Bind password file SASL bind options Use the proxied authorization control with the given authorization ID Reason the server is being stopped or restarted Attempt to automatically restart the server once it has stopped Time to begin the shutdown in YYYYMMDDhhmmss format (local time) Trust all server SSL certificates Certificate keystore path Certificate keystore PIN Certificate keystore PIN file Certificate trust store path Certificate trust store PIN Certificate trust store PIN file Help option '%s %s' % (STAFCmd, STAFCmdParams) '%s' % (location) '%s' % (STAFCmd) '%s' % (STAFCmdParams) '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : RC , 'result' : STAXResult } This function generates a server jks certificate '%s' % (STAF_REMOTE_HOSTNAME) '%s/bin/keytool' % JAVA_HOME '-genkey -alias server-cert -keyalg rsa -dname "cn=client,O=Sun Microsystems,C=US" -keystore "keystore" -storepass "servercert" -keypass "servercert"' '%s/../config' % (OPENDS_BINPATH) ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)] { 'returncode' : RC , 'result' : STAXResult } This function generates a server PKCS12 certificate '%s' % (STAF_REMOTE_HOSTNAME) '%s/bin/keytool' % JAVA_HOME '-genkey -alias server-cert -keyalg rsa -dname "cn=client,O=Sun Microsystems,C=US" -keystore "keystore" -storepass "servercert" -keypass "servercert" -storetype "PKCS12"' '%s/../config' % (OPENDS_BINPATH) ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)] { 'returncode' : RC , 'result' : STAXResult } This function self-signs a server JKS certificate '%s' % (STAF_REMOTE_HOSTNAME) '%s/bin/keytool' % JAVA_HOME '-selfcert -alias server-cert -keystore "keystore" -storepass "servercert"' '%s/../config' % (OPENDS_BINPATH) ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)] { 'returncode' : RC , 'result' : STAXResult } This function self-signs a server PKCS12 certificate '%s' % (STAF_REMOTE_HOSTNAME) '%s/bin/keytool' % JAVA_HOME '-selfcert -alias server-cert -keystore "keystore" -storepass "servercert" -storetype "PKCS12"' '%s/../config' % (OPENDS_BINPATH) ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)] { 'returncode' : RC , 'result' : STAXResult } This function performs an offline import of an ldif file Location of target host Pathname to installation root Path to the LDIF file to be imported Backend ID for the backend to import Optional extra parameters for specific test cases '%s/import-ldif%s -l %s -n %s %s' % (dsBinPath,fileExt,ldifFile,backEnd,extraParams) '%s' % location '%s/import-ldif%s' % (dsBinPath,fileExt) '-l %s -n %s %s' % (ldifFile,backEnd,extraParams) '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : importRC , 'result' : importResult } importRC This function performs an offline import of an ldif file using the script Location of target host Pathname to installation root Path to the LDIF file to be imported Path to a MakeLDIF template to use to generate the import data Append to an existing database rather than overwriting it Replace existing entries when appending to the database Backend ID for the backend to import Base DN of a branch to include in the LDIF import Base DN of a branch to include in the LDIF import Base DN of a branch to exclude from the LDIF import Attribute to include in the LDIF import Attribute to exclude in the LDIF import Filter to identify entries to include in the LDIF import Filter to identify entries to exclude from the LDIF import Write rejected entries to the specified file Overwrite an existing rejects file rather than appending to it Seed for the MakeLDIF random number generator Skip schema validation during the LDIF import LDIF file is compressed LDIF file is encrypted Use quiet mode (no output) Display usage information '%s %s' % (STAFCmd, STAFCmdParams) '%s' % location '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : RC , 'result' : STAXResult } This function performs an on line import task of an ldif file Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task The name of the ldif file Optional the name of the database backend Optional imported ldif data file compressed Optional imported ldif data file encrypted Optional name of rejects file Optional name of rejects file Optional append imported ldif data Optional don't do schema validation on import Optional replace existing data Optional exclude branches Optional include branches Optional exclude attributes Optional include attributes Optional exclude filters Optional exclude filters 'Copy import task ldif (%s) to %s' % (tmpTaskLdif,taskLdif) { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Import Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function verifies an import of an ldif file Location of target host Pathname to installation root Directory server hostname or IP address Directory server port number Bind DN Bind password Entries expected to be present after import Optional entries expected to be missing after import Optional attributes expected to be present after import Optional attributes expected to be missing after import Optional main suffix for the import Optional start the Directory Server after import { 'location' : myLocation, 'dsPath' : myPath } { 'location' : myLocation, 'dsPath' : myPath, 'dsInstanceHost' : myhost , 'dsInstancePort' : myport , 'dsInstanceDn' : mydn , 'dsInstancePswd' : mypswd , 'noOfLoops' : 5 , 'noOfMilliSeconds' : 2000 } { 'location' : myLocation , 'dsPath' : myPath, 'dsInstanceHost' : myhost , 'dsInstancePort' : myport , 'dsInstanceDn' : mydn , 'dsInstancePswd' : mypswd , 'dsBaseDN' : '%s' % expectedEntry , 'dsFilter' : 'objectclass=*' } { 'returncode' : RC , 'result' : STAXResult } { 'location' : myLocation , 'dsPath' : myPath, 'dsInstanceHost' : myhost , 'dsInstancePort' : myport , 'dsInstanceDn' : mydn , 'dsInstancePswd' : mypswd , 'dsBaseDN' : '%s' % missingEntry , 'dsFilter' : 'objectclass=*' , 'expectedRC' : 32 } { 'location' : myLocation , 'dsPath' : myPath, 'dsHost' : myhost , 'dsPort' : myport , 'dsBindDN' : mydn , 'dsBindPwd' : mypswd } This function performs an export to an ldif file on or off line Location of target host Pathname to installation root The name of the ldif file to be written The name of the database backend Optional extra parameters for specific test cases '%s/export-ldif%s -l %s -n %s %s' % (dsBinPath,fileExt,ldifFile,backEnd,extraParams) '%s' % location '%s/export-ldif%s' % (dsBinPath,fileExt) '-l %s -n %s %s' % (ldifFile,backEnd,extraParams) '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : exportRC , 'result' : exportResult } exportRC This function performs an on line export task of an ldif file Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task The name of the ldif file Optional the name of the database backend Optional exported ldif data file compressed Optional exported ldif data file encrypted Optional append exported ldif data Optional exclude branches Optional include branches Optional exclude attributes Optional include attributes Optional exclude filters Optional exclude filters Optional generate a signed hash of the export data 'Copy export task ldif (%s) to %s' % (tmpTaskLdif,taskLdif) { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Export Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function performs an off line backup Location of target host Pathname to installation root Optional the name of the database backend The directory where the backup files will be placed Optional extra parameters for specific test cases 'backup%s -n %s -d %s %s' % (fileExt,backEnd,backupDir,extraParams) '%s' % myLocation '%s/backup%s' % (dsBinPath,fileExt) '-d %s -n %s %s' % (backupDir,backEnd,extraParams) '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : backupRC , 'result' : backupResult } backupRC This function performs an on line backup task Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task Path to the target directory for the backup file(s) Optional the name of the database backend Optional back up all backends in the server Optional perform an incremental backup rather than a full backup Optional use the provided identifier for the backup Optional backup contents compressed Optional backup contents encrypted Optional generate a signed hash of the backup data Optional generate a hash of the backup data 'Copy backup task ldif file.' { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Backup Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function performs an off line restore Location of target host Pathname to installation root The directory where the backup files will be placed Optional extra parameters for specific test cases 'restore%s -d %s %s' % (fileExt,backupDir,extraParams) '%s' % myLocation '%s/restore%s' % (dsBinPath,fileExt) '-d %s %s' % (backupDir,extraParams) '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] { 'returncode' : restoreRC , 'result' : restoreResult } restoreRC This function performs an on line restore task of a backup file Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task The name of the backup directory Optional the name of the backupId Optional verify the contents of the backup but do not restore it 'Copy restore task ldif file.' { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Restore Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function performs an on line export task for shutdown of the directory Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task 'Copy shutdown task ldif (%s) to %s' % (tmpTaskLdif,taskLdif) { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Export Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } STAFCmdRC This function performs an on line export task for restart of the directory Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task 'Copy restart task ldif (%s) to %s' % (tmpTaskLdif,taskLdif) { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Export Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'noOfLoops' : 5 , 'noOfMilliSeconds' : 2000 } STAFCmdRC This function performs a dynamic schema add task Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task The name of the ldif file that contains the schema updates 'Copy schema task ldif file.' { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } 'Copy schema update ldif file.' { 'location' : myLocation, 'srcfile' : '%s/schema/ldifs/%s' % (logsRemoteDataDir,ldifFile), 'destfile' : '%s/%s/config/schema/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME,ldifFile), 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Schema Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function performs a leave lockdown task Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task 'Copy task ldif file.' { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } { 'location' : myLocation, 'taskLabel' : 'Online Schema Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } { 'location' : myLocation, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } This function performs a total update of a replication domain Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password The identifier for the task The dn of the domain to be replicated The id of the replica server 'Copy totalupdate task ldif file.' { 'location' : STAXServiceMachine, 'srcfile' : tmpTaskLdif, 'destfile' : taskLdif, 'remotehost' : myLocation } 'Copy of totalupdate task failed (STAXCode=%s)' % STAXCode [STAXCode, STAXReason] { 'location' : myLocation, 'dsPath' : myPath, 'taskLabel' : 'Online Total Update Task', 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd, 'dsTaskLdif' : taskLdif } 'Start of totalupdate task failed (Code=%s)' % STAXCode [STAXCode, STAXReason] { 'location' : myLocation, 'dsPath' : myPath, 'dsTaskDn' : taskDN, 'dsHost' : dsInstanceHost, 'dsPort' : dsInstancePort, 'dsBindDn' : dsInstanceDn, 'dsBindPswd' : dsInstancePswd } 'Check of totalupdate task failed (Code=%s)' % STAXCode [STAXCode, STAXReason] [STAXCode, STAXReason] This function starts a task using the ldap task interface Location of target host Location of target host Pathname to installation root Directory server host name Directory server port number Bind DN Bind password Ldif file for task '%s %s' % (STAFCmd, STAFCmdParams) '%s' % myLocation '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] '%s' % dsTaskLdif { 'returncode' : STAFCmdRC , 'result' : STAFCmdResult } [STAFCmdRC, STAFCmdResult[0][1]] This function checks a task using the ldap task interface Location of target host Dn of the task to be performed Pathname to installation root Directory server host name Directory server port number Bind DN Bind password '%s %s' % (STAFCmd, STAFCmdParams) '%s' % myLocation '%s' % STAFCmd '%s' % STAFCmdParams '%s' % dsBinPath ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME] '%s' % STAFCmdResult [taskRC, STAFCmdResult[0][1]] '%s' % STAFCmdResult [taskRC, STAFCmdResult[0][1]] '%s' % STAFCmdResult { 'returncode' : STAFCmdRC , 'result' : STAFCmdResult } { 'sleepForMilliSeconds' : '2000' } [taskRC, STAFCmdResult[0][1]]