From 11ee5eb7bfb127dc7f96216aa6c41c3f94fbadc7 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Thu, 01 Mar 2007 15:19:37 +0000
Subject: [PATCH] Issue 1287 prepare common shared function for synchronization
---
opendj-sdk/opends/tests/functional-tests/testcases/backends/export-tasks.xml | 6
opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_jks.xml | 12
opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml | 512 +++++++++++++++++++++---
opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_startTLS.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/setup/setup.xml | 116 +++--
opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml | 8
opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/backends/backup-tasks.xml | 29
opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml | 13
opendj-sdk/opends/tests/functional-tests/testcases/backends/import-tasks.xml | 16
opendj-sdk/opends/tests/functional-tests/testcases/security/sasl/security_sasl.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/core/core.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_pkcs12.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/schema/schema.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/quickstart/quickstart.xml | 15
opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_validator/security_pwd_validator.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_teardown_startTLS.xml | 8
opendj-sdk/opends/tests/functional-tests/testcases/security/account_activation/security_account_activation.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/aci/aci.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/security/bind_no_pwd/security_bind_no_pwd.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/cleanup/cleanup.xml | 16
opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml | 240 +++++++----
opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_teardown_pkcs12.xml | 8
opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/security/auth_pwd_syntax/security_auth_pwd_syntax.xml | 12
opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy_root/security_pwd_policy_root.xml | 12
26 files changed, 821 insertions(+), 334 deletions(-)
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
index 1b0f1a7..15d383e 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -27,34 +27,106 @@
! -->
<stax>
- <function name="configureDS">
+ <!-- This function configures DS using the configure-ds script -->
+ <function name="ConfigureDsWithScript">
<function-prolog>
- This function configures a Directory Server
+ This function configures a Directory Server using a script
</function-prolog>
+
<function-map-args>
- <function-required-arg name="dsInstancePort">
- Directory Server port number
- </function-required-arg>
- <function-optional-arg name="dsInstanceSuffix">
- Directory Server suffix
- </function-optional-arg>
- <function-optional-arg name="dsInstanceDN" default="'%s' % DIRECTORY_INSTANCE_DN" >
- Directory manager DN
- </function-optional-arg>
- <function-optional-arg name="dsInstancePassword" default="'%s' % DIRECTORY_INSTANCE_PSWD" >
- Directory Server suffix
- </function-optional-arg>
-
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
+ <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+ <function-arg-description>
+ Pathname to installation root
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsPort" type="optional" default="''">
+ <function-arg-description>
+ Directory server port number
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+ <function-arg-def name="dsBaseDN" type="optional" default="''">
+ <function-arg-description>
+ Base DN (only single base DN supported).
+ </function-arg-description>
+ <function-arg-property name="type" value="DN"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindDN" type="optional" default="''">
+ <function-arg-description>
+ Bind DN
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindPwd" type="optional" default="''">
+ <function-arg-description>
+ Bind password
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindPwdFile" type="optional" default="''">
+ <function-arg-description>
+ Bind password file
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="dsHelp" type="optional" default="''">
+ <function-arg-description>
+ Help option
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
</function-map-args>
+
<sequence>
- <process name="'Configure DS'">
- <location>'%s' % (STAF_REMOTE_HOSTNAME) </location>
- <command>'%s/configure-ds%s' % (OPENDS_BINPATH,fileExt)</command>
- <parms>'-p %s -b "%s" -D "%s" -w %s' % (dsInstancePort,dsInstanceSuffix,dsInstanceDN,dsInstancePassword)</parms>
- <workdir>'%s' % (OPENDS_BINPATH)</workdir>
+
+ <!-- Build the Command -->
+ <script>
+ STAFCmdParamsList=[]
+
+ if dsPath:
+ STAFCmd='%s/bin/configure-ds%s' % (dsPath,fileExt)
+
+ if dsPort:
+ STAFCmdParamsList.append('-p %s' % dsPort)
+
+ if dsBaseDN:
+ STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
+
+ if dsBindDN:
+ STAFCmdParamsList.append('-D "%s"' % dsBindDN)
+
+ if dsBindPwd:
+ STAFCmdParamsList.append('-w "%s"' % dsBindPwd)
+
+ if dsBindPwdFile:
+ STAFCmdParamsList.append('-W "%s"' % dsBindPwdFile)
+
+ if dsHelp:
+ STAFCmdParamsList.append('-H')
+
+ STAFCmdParams=' '.join(STAFCmdParamsList)
+ </script>
+
+ <message>
+ '%s %s' % (STAFCmd, STAFCmdParams)
+ </message>
+
+ <process name="'Configure DS Script'">
+ <location>'%s' % location</location>
+ <command>'%s' % STAFCmd</command>
+ <parms>'%s' % STAFCmdParams</parms>
+ <workdir>'%s' % dsPath</workdir>
<envs>
- ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)]
+ ['PATH=/bin:/usr/bin:%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
</envs>
+ <console use="'same'"/>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
@@ -65,66 +137,341 @@
</sequence>
</function>
- <function name="startDS">
+ <!-- This function starts DS using the start-ds script -->
+ <function name="StartDsWithScript">
<function-prolog>
This function starts a Directory Server
</function-prolog>
+
<function-map-args>
- <function-required-arg name="dsbinpath">
- location of the Directory Server binaries
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+ <function-arg-description>
+ Pathname to installation root
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsPort" type="optional" default="''">
+ <function-arg-description>
+ Directory server port number
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+ <function-arg-def name="dsVersion" type="optional" default="''">
+ <function-arg-description>
+ Directory server version
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsSystemInfo" type="optional" default="''">
+ <function-arg-description>
+ Directory server system info
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsNoDetach" type="optional" default="''">
+ <function-arg-description>
+ Do not detach directory server from process
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsHelp" type="optional" default="''">
+ <function-arg-description>
+ Help option
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
</function-map-args>
+
<sequence>
- <process name="'Start DS'">
- <location>'%s' % (STAF_REMOTE_HOSTNAME) </location>
- <command>'%s/start-ds%s' % (dsbinpath,fileExt)</command>
- <workdir>'%s' % (dsbinpath)</workdir>
+
+ <!-- Build the Command -->
+ <script>
+ STAFCmdParamsList=[]
+
+ if dsPath:
+ STAFCmd='%s/bin/start-ds%s' % (dsPath,fileExt)
+
+ if dsVersion:
+ STAFCmdParamsList.append('-v')
+
+ if dsSystemInfo:
+ STAFCmdParamsList.append('-s')
+
+ if dsNoDetach:
+ STAFCmdParamsList.append('-N')
+
+ if dsHelp:
+ STAFCmdParamsList.append('-H')
+
+ STAFCmdParams=' '.join(STAFCmdParamsList)
+ </script>
+
+ <message>
+ '%s %s' % (STAFCmd, STAFCmdParams)
+ </message>
+
+ <process name="'Start DS Script'">
+ <location>'%s' % location</location>
+ <command>'%s' % STAFCmd</command>
+ <parms>'%s' % STAFCmdParams</parms>
+ <workdir>'%s' % dsPath</workdir>
<envs>
- ['PATH=/bin:/usr/bin:%s' % (dsbinpath), 'JAVA_HOME=%s' % (JAVA_HOME)]
+ ['PATH=/bin:/usr/bin:%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
</envs>
<console use="'same'"/>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
+
<call function="'checkRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
+
</sequence>
+
</function>
- <function name="stopDS">
- <function-prolog>
- This function stops a Directory Server
- </function-prolog>
- <function-map-args>
- <function-required-arg name="dsInstancePort">
- Directory Server port number
- </function-required-arg>
- <function-optional-arg name="dsInstanceDn" default="'%s' % DIRECTORY_INSTANCE_DN" >
- Hostname
- </function-optional-arg>
- <function-optional-arg name="dsInstancePswd" default="'%s' % DIRECTORY_INSTANCE_PSWD" >
- Password
- </function-optional-arg>
- </function-map-args>
+ <!-- This function stops DS using the stop-ds script -->
+ <function name="StopDsWithScript">
+ <function-prolog>
+ This function starts a Directory Server using the script
+ </function-prolog>
+
+ <function-map-args>
+
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+ <function-arg-description>
+ Pathname to installation root
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsHost" type="optional" default="''">
+ <function-arg-description>
+ Directory server hostname or IP address
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="dsPort" type="optional" default="''">
+ <function-arg-description>
+ Directory server port number
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+ <function-arg-def name="dsUseSSL" type="optional" default="''">
+ <function-arg-description>
+ Use SSL for secure communication with the server
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsUseStartTLS" type="optional" default="''">
+ <function-arg-description>
+ Use StartTLS for secure communication with the server
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindDN" type="optional" default="''">
+ <function-arg-description>
+ Bind DN
+ </function-arg-description>
+ <function-arg-property name="type" value="DN"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindPwd" type="optional" default="''">
+ <function-arg-description>
+ Bind password
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="dsBindPwdFile" type="optional" default="''">
+ <function-arg-description>
+ Bind password file
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
+ <function-arg-def name="dsSaslOption" type="optional" default="''">
+ <function-arg-description>
+ SASL bind options
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsProxyAuthZID" type="optional" default="''">
+ <function-arg-description>
+ Use the proxied authorization control with the given authorization ID
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsStopReason" type="optional" default="''">
+ <function-arg-description>
+ Reason the server is being stopped or restarted
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="dsRestart" type="optional" default="''">
+ <function-arg-description>
+ Attempt to automatically restart the server once it has stopped
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsStopTime" type="optional" default="''">
+ <function-arg-description>
+ Time to begin the shutdown in YYYYMMDDhhmmss format (local time)
+ </function-arg-description>
+ <function-arg-property name="type" value="timestamp"/>
+ </function-arg-def>
+ <function-arg-def name="dsTrustAll" type="optional" default="''">
+ <function-arg-description>
+ Trust all server SSL certificates
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="dsKeyStoreFile" type="optional" default="''">
+ <function-arg-description>
+ Certificate keystore path
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="dsKeyStorePwd" type="optional" default="''">
+ <function-arg-description>
+ Certificate keystore PIN
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="dsKeyStorePwdFile" type="optional" default="''">
+ <function-arg-description>
+ Certificate keystore PIN file
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="dsTrustStoreFile" type="optional" default="''">
+ <function-arg-description>
+ Certificate trust store path
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="dsTrustStorePwd" type="optional" default="''">
+ <function-arg-description>
+ Certificate trust store PIN
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="dsTrustStorePwdFile" type="optional" default="''">
+ <function-arg-description>
+ Certificate trust store PIN file
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="dsHelp" type="optional" default="''">
+ <function-arg-description>
+ Help option
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ </function-map-args>
+
<sequence>
- <process name="'Stop DS'">
- <location>'%s' % (STAF_REMOTE_HOSTNAME) </location>
- <command>'%s/stop-ds%s' % (OPENDS_BINPATH,fileExt)</command>
- <parms>'-p %s -D "%s" -w %s' % (dsInstancePort, dsInstanceDn, dsInstancePswd)</parms>
- <workdir>'%s' % (OPENDS_BINPATH)</workdir>
- <envs>
- ['PATH=/bin:/usr/bin:%s' % (OPENDS_BINPATH), 'JAVA_HOME=%s' % (JAVA_HOME)]
- </envs>
- <stderr mode="'stdout'"/>
- <returnstdout/>
- </process>
+
+ <!-- Build the Command -->
+ <script>
+ STAFCmdParamsList=[]
+ if dsPath:
+ STAFCmd='%s/bin/stop-ds%s' % (dsPath,fileExt)
+
+ if dsHost:
+ STAFCmdParamsList.append('-h %s' % dsHost)
+
+ if dsPort:
+ STAFCmdParamsList.append('-p %s' % dsPort)
+
+ if dsUseSSL:
+ STAFCmdParamsList.append('-Z')
+
+ if dsUseStartTLS:
+ STAFCmdParamsList.append('-q')
+
+ if dsBindDN:
+ STAFCmdParamsList.append('-D "%s"' % dsBindDN)
+
+ if dsBindPwd:
+ STAFCmdParamsList.append('-w "%s"' % dsBindPwd)
+
+ if dsBindPwdFile:
+ STAFCmdParamsList.append('-j "%s"' % dsBindPwdFile)
+
+ if dsSaslOption:
+ STAFCmdParamsList.append('-o "%s"' % dsSaslOption)
+
+ if dsProxyAuthZID:
+ STAFCmdParamsList.append('-Y "%s"' % dsProxyAuthZID)
+
+ if dsStopReason:
+ STAFCmdParamsList.append('-r "%s"' % dsStopReason)
+
+ if dsRestart:
+ STAFCmdParamsList.append('-R')
+
+ if dsStopTime:
+ STAFCmdParamsList.append('-t "%s"' % dsStopTime)
+
+ if dsTrustAll:
+ STAFCmdParamsList.append('-X')
+
+ if dsKeyStoreFile:
+ STAFCmdParamsList.append('-K "%s"' % dsKeyStoreFile)
+
+ if dsKeyStorePwd:
+ STAFCmdParamsList.append('-W "%s"' % dsKeyStorePwd)
+
+ if dsKeyStorePwdFile:
+ STAFCmdParamsList.append('-u "%s"' % dsKeyStorePwdFile)
+
+ if dsTrustStoreFile:
+ STAFCmdParamsList.append('-P "%s"' % dsTrustStoreFile)
+
+ if dsTrustStorePwd:
+ STAFCmdParamsList.append('-T "%s"' % dsTrustStorePwd)
+
+ if dsTrustStorePwdFile:
+ STAFCmdParamsList.append('-U "%s"' % dsTrustStorePwdFile)
+
+ if dsHelp:
+ STAFCmdParamsList.append('-H')
+
+ STAFCmdParams=' '.join(STAFCmdParamsList)
+ </script>
+
+ <message>
+ '%s %s' % (STAFCmd, STAFCmdParams)
+ </message>
+
+ <process name="'Stop DS Script'">
+ <location>'%s' % (location)</location>
+ <command>'%s' % (STAFCmd)</command>
+ <parms>'%s' % (STAFCmdParams)</parms>
+ <workdir>'%s' % dsPath</workdir>
+ <envs>
+ ['PATH=/bin:/usr/bin:%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
+ </envs>
+ <stderr mode="'stdout'"/>
+ <returnstdout/>
+ </process>
<call function="'checkRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
+ { 'returncode' : RC ,
+ 'result' : STAXResult }
</call>
+
</sequence>
</function>
@@ -444,8 +791,9 @@
<!-- Copy the import-task ldif to remote host -->
<message>'Copy import task ldif (import-task.ldif) file from %s to %s' % (TMP_DATA_DIR,STAGED_DATA_DIR)</message>
- <call function="'copyfile'">
- { 'srcfile' : '%s/import-task.ldif' % TMP_DATA_DIR,
+ <call function="'copyFile'">
+ { 'location' : STAXServiceMachine,
+ 'srcfile' : '%s/import-task.ldif' % TMP_DATA_DIR,
'destfile' : '%s/import-task.ldif' % STAGED_DATA_DIR,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
@@ -483,7 +831,6 @@
</script>
<script>
- import re
searchre = re.compile('ds-task-state: COMPLETED_SUCCESSFULLY')
</script>
@@ -571,8 +918,8 @@
<if expr="startDS == 'yes'">
<sequence>
<!-- StartDS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<!-- Wait for DS to start -->
@@ -628,8 +975,12 @@
<!-- Do we need to stop the Directory Server -->
<if expr="stopDS == 'yes'">
<!-- StopDS -->
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
</if>
</sequence>
@@ -840,8 +1191,9 @@
<!-- Copy the export-task ldif to remote host -->
<message>'Copy export task ldif file.'</message>
- <call function="'copyfile'">
- { 'srcfile' : '%s/export-task.ldif' % TMP_DATA_DIR,
+ <call function="'copyFile'">
+ { 'location' : STAXServiceMachine,
+ 'srcfile' : '%s/export-task.ldif' % TMP_DATA_DIR,
'destfile' : '%s/export-task.ldif' % STAGED_DATA_DIR,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
@@ -1072,8 +1424,9 @@
<!-- Copy the backup-task ldif to remote host -->
<message>'Copy backup task ldif file.'</message>
- <call function="'copyfile'">
- { 'srcfile' : '%s/backup-task.ldif' % TMP_DATA_DIR,
+ <call function="'copyFile'">
+ { 'location' : STAXServiceMachine,
+ 'srcfile' : '%s/backup-task.ldif' % TMP_DATA_DIR,
'destfile' : '%s/backup-task.ldif' % STAGED_DATA_DIR,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
@@ -1111,7 +1464,6 @@
</script>
<script>
- import re
searchre = re.compile('ds-task-state: COMPLETED_SUCCESSFULLY')
</script>
@@ -1182,8 +1534,12 @@
<message>
'Stopping OpenDS'
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT)}
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
{ 'returncode' : RC ,
@@ -1212,10 +1568,10 @@
'result' : restoreResult }
</call>
<message>
- 'Starting OpenDS'
+ 'Starting DS'
</message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
{ 'returncode' : RC ,
@@ -1291,8 +1647,9 @@
<!-- Copy the restore-task ldif to remote host -->
<message>'Copy restore task ldif file.'</message>
- <call function="'copyfile'">
- { 'srcfile' : '%s/restore-task.ldif' % TMP_DATA_DIR,
+ <call function="'copyFile'">
+ { 'location' : STAXServiceMachine,
+ 'srcfile' : '%s/restore-task.ldif' % TMP_DATA_DIR,
'destfile' : '%s/restore-task.ldif' % STAGED_DATA_DIR,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
@@ -1330,7 +1687,6 @@
</script>
<script>
- import re
searchre = re.compile('ds-task-state: COMPLETED_SUCCESSFULLY')
</script>
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml
index 7d78564..499b82f 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml
@@ -26,11 +26,23 @@
! Portions Copyright 2006-2007 Sun Microsystems, Inc.
! -->
<stax>
- <function name="copyfile">
+ <function name="copyFile">
<function-prolog>
This function copies a source file to destination file to host
</function-prolog>
<function-map-args>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="remotehost" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ The name of remote host (default localhost)
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
<function-arg-def name="srcfile" type="required">
<function-arg-description>
The name of the source fule
@@ -43,16 +55,10 @@
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
- <function-arg-def name="remotehost" type="optional" default="localhost">
- <function-arg-description>
- The name of remote host (default localhost)
- </function-arg-description>
- <function-arg-property name="type" value="hostname"/>
- </function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Copy File'">
- <location>'%s' % (STAF_LOCAL_HOSTNAME)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
<request>'COPY FILE %s TOFILE %s TOMACHINE %s' % (srcfile,destfile,remotehost) </request>
</stafcmd>
@@ -73,39 +79,36 @@
Copies files by extension from a source to destination folder on host
</function-prolog>
<function-map-args>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
<function-arg-def name="srcfolder" type="required">
<function-arg-description>
The name of the source folder
</function-arg-description>
<function-arg-property name="type" value="foldername"/>
</function-arg-def>
-
<function-arg-def name="destfolder" type="required">
<function-arg-description>
The name of the destination fule
</function-arg-description>
<function-arg-property name="type" value="foldername"/>
</function-arg-def>
-
<function-arg-def name="extension" type="optional" default="'txt'">
<function-arg-description>
- The name of host (default txt)
+ The name of the file extension (default txt)
</function-arg-description>
- <function-arg-property name="type" value="hostname"/>
- </function-arg-def>
-
- <function-arg-def name="hostname" type="optional" default="'localhost'">
- <function-arg-description>
- The name of remote host (default localhost)
- </function-arg-description>
- <function-arg-property name="type" value="hostname"/>
+ <function-arg-property name="type" value="file extension"/>
</function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Copy all %s Files.' % (extension)">
- <location>'%s' % (STAF_LOCAL_HOSTNAME)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
- <request>'COPY DIRECTORY %s TODIRECTORY %s TOMACHINE %s EXT %s RECURSE' % (srcfolder,destfolder,hostname,extension) </request>
+ <request>'COPY DIRECTORY %s TODIRECTORY %s TOMACHINE %s EXT %s RECURSE' % (srcfolder,destfolder,location,extension) </request>
</stafcmd>
<script>
cmdRC=RC
@@ -119,28 +122,45 @@
</sequence>
</function>
- <function name="zipfile">
+ <function name="zipUpFile">
<function-prolog>
- This function zips a folder on remote machine
+ This function zips up a folder
</function-prolog>
<function-map-args>
- <function-required-arg name="zipfilename">
- name of zip file
- </function-required-arg>
- <function-required-arg name="foldername">
- name of destination folder to place zip file contents
- </function-required-arg>
- <function-required-arg name="relativeto">
- folder that the zip archive is relative to
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="zipfile" type="required">
+ <function-arg-description>
+ Name of the file to place zip file contents
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="folder" type="required">
+ <function-arg-description>
+ Name of destination folder to place zip file contents
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
+ <function-arg-def name="relativeto" type="required">
+ <function-arg-description>
+ Folder that the zip archive is relative to
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
</function-map-args>
+
<sequence>
+
<stafcmd name="'STAF Command: Zip Up Folder'">
- <location>'%s' % (STAF_LOCAL_HOSTNAME)</location>
+ <location>'%s' % location</location>
<service>'zip'</service>
<request>
- 'ADD ZIPFILE %s DIRECTORY %s RECURSE RELATIVETO %s' % (zipfilename,foldername,relativeto)
+ 'ADD ZIPFILE %s DIRECTORY %s RECURSE RELATIVETO %s' % (zipfile,folder,relativeto)
</request>
</stafcmd>
@@ -157,25 +177,34 @@
</sequence>
</function>
- <function name="unzipfile">
+ <function name="unZipFile">
<function-prolog>
- This function unzips a compressed zip archive on remote machine
+ This function unzips a compressed zip archive
</function-prolog>
<function-map-args>
- <function-required-arg name="zipfile">
- name of source zip file
- </function-required-arg>
- <function-required-arg name="unzipdir">
- name of destination folder to place zip file contents
- </function-required-arg>
- <function-optional-arg name="ziphost" default="'localhost'">
- name of host on which to unzip (default localhost)
- </function-optional-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="zipfile" type="required">
+ <function-arg-description>
+ Name of the file to place zip file contents
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="unzipdir" type="required">
+ <function-arg-description>
+ Name of destination folder to place zip file contents
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Unzip File'">
- <location>'%s' % (ziphost)</location>
+ <location>'%s' % location</location>
<service>'zip'</service>
<request>
'UNZIP ZIPFILE %s TODIRECTORY %s RESTOREPERMISSION REPLACE' % (zipfile,unzipdir)
@@ -193,21 +222,29 @@
</sequence>
</function>
- <function name="deletefile">
+ <function name="deleteFile">
<function-prolog>
- This function recursively deletes a folder
+ This function deletes a file
</function-prolog>
+
<function-map-args>
- <function-required-arg name="filename">
- name of file to be deleted
- </function-required-arg>
- <function-required-arg name="hostname">
- name of target host
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="filename" type="required">
+ <function-arg-description>
+ Name of file to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
</function-map-args>
+
<sequence>
<stafcmd name="'STAF Command: Delete Existing File'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
<request>
'GET ENTRY %s TYPE' % (filename)
@@ -231,10 +268,10 @@
</if>
<stafcmd name="'STAF Command: Delete Existing File'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
<request>
- 'DELETE ENTRY %s CONFIRM' % (filename)
+ 'DELETE ENTRY %s CONFIRM' % filename
</request>
</stafcmd>
@@ -251,25 +288,32 @@
</sequence>
</function>
- <function name="deletefolder">
+ <function name="deleteFolder">
<function-prolog>
This function recursively deletes a folder
</function-prolog>
+
<function-map-args>
- <function-required-arg name="foldername">
- name of folder to be deleted
- </function-required-arg>
- <function-required-arg name="hostname">
- name of target host
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="foldername" type="required">
+ <function-arg-description>
+ Name of folder to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Get Folder Attributes'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
- <request>'GET ENTRY %s TYPE' % (foldername)</request>
+ <request>'GET ENTRY %s TYPE' % foldername</request>
</stafcmd>
<if expr="RC == 48">
@@ -288,7 +332,7 @@
</else>
</if>
<stafcmd name="'STAF Command: Recursively Delete Folder'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
<request>
'DELETE ENTRY %s RECURSE IGNOREERRORS CONFIRM' % (foldername)
@@ -311,25 +355,31 @@
</function>
- <function name="CreateFolder">
+ <function name="createFolder">
<function-prolog>
This function creates a folder
</function-prolog>
<function-map-args>
- <function-required-arg name="hostname">
- name of target host
- </function-required-arg>
- <function-required-arg name="foldername">
- name of folder to be deleted
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="foldername" type="required">
+ <function-arg-description>
+ Name of file to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Create Folder'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'fs'</service>
<request>
'CREATE DIRECTORY %s FULLPATH' % foldername
@@ -360,26 +410,38 @@
</function-prolog>
<function-map-args>
- <function-required-arg name="hostname">
- name of target host
- </function-required-arg>
- <function-required-arg name="logname">
- name of log to query
- </function-required-arg>
- <function-required-arg name="startfrom">
- timestamp to start logging
- </function-required-arg>
- <function-required-arg name="endat">
- timestamp to end logging
- </function-required-arg>
+ <function-arg-def name="location" type="optional" default="'%s' % STAXServiceMachine">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="logname" type="required">
+ <function-arg-description>
+ Name of file to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
+ <function-arg-def name="startfrom" type="required">
+ <function-arg-description>
+ Name of file to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="timestamp"/>
+ </function-arg-def>
+ <function-arg-def name="endat" type="required">
+ <function-arg-description>
+ Name of file to be deleted
+ </function-arg-description>
+ <function-arg-property name="type" value="timestamp"/>
+ </function-arg-def>
</function-map-args>
<sequence>
<stafcmd name="'STAF Command: Log Query for Test Case Log.'">
- <location>'%s' % (hostname)</location>
+ <location>'%s' % location</location>
<service>'log'</service>
- <request>'QUERY ALL MACHINE %s LOGNAME %s FROM %s TO %s' % (hostname,logname,startfrom,endat)</request>
+ <request>'QUERY ALL MACHINE %s LOGNAME %s FROM %s TO %s' % (location,logname,startfrom,endat)</request>
</stafcmd>
</sequence>
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
index 0dd7fce..98aaecc 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
@@ -117,7 +117,6 @@
</function-map-args>
<sequence>
<script>
- import re
searchre = re.compile('%s' % expectedString)
</script>
@@ -155,7 +154,6 @@
<sequence>
<script>
- import re
searchre = re.compile('%s' % testString)
</script>
<if expr='re.search(searchre, returnString) == None'>
@@ -177,7 +175,7 @@
</sequence>
</function>
- <function name="searchStringForSubstring">
+ <function name="searchStringForSubstring">
<function-prolog>
This function simply searches a string for a substring
</function-prolog>
@@ -192,7 +190,6 @@
<sequence>
<script>
- import re
searchre = re.compile(testString)
</script>
<if expr='re.search(searchre, returnString) == None'>
@@ -214,7 +211,7 @@
<return>returnCode</return>
</sequence>
</function>
-
+
<function name="isAlive">
<function-prolog>
Checks that the ldap server is running
@@ -497,7 +494,7 @@
<sequence>
<call function="'queryLogs'">
- { 'hostname' : STAXServiceMachine,
+ { 'location' : STAXServiceMachine,
'logname' : 'STAX_Job_%s_User' % STAXJobID,
'startfrom' : starttime,
'endat' : endtime }
@@ -535,8 +532,8 @@
NewLogDir=posixpath.dirname(logfile)
</script>
- <call function="'CreateFolder'">
- { 'hostname' : STAXServiceMachine,
+ <call function="'createFolder'">
+ { 'location' : STAXServiceMachine,
'foldername' : NewLogDir }
</call>
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci.xml b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci.xml
index 0022773..8b4e66f 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/aci/aci.xml
@@ -46,8 +46,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -84,8 +84,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/backends/backup-tasks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/backends/backup-tasks.xml
index bc92071..4b65643 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/backends/backup-tasks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/backends/backup-tasks.xml
@@ -40,28 +40,29 @@
<call function="'testSuite_Preamble'"/>
- <!--- Start DS -->
- <sequence>
- <message>
- 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
- </message>
+ <!--- Start DS -->
+ <sequence>
+ <message>
+ 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
+ </message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
- </call>
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
+ </call>
- <call function="'checkRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
- </call>
+ <call function="'checkRC'">
+ { 'returncode' : RC ,
+ 'result' : STAXResult }
+ </call>
- </sequence>
+ </sequence>
<!--- Check that DS started -->
<call function="'isAlive'">
{ 'noOfLoops' : 5 ,
'noOfMilliSeconds' : 2000 }
- </call>
+ </call>
+
<testcase name="'Backend: Backup Tasks 1'">
<sequence>
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/backends/export-tasks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/backends/export-tasks.xml
index 46169a9..b5defe8 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/backends/export-tasks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/backends/export-tasks.xml
@@ -46,9 +46,9 @@
'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
- </call>
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
+ </call>
<call function="'checkRC'">
{ 'returncode' : RC ,
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/backends/import-tasks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/backends/import-tasks.xml
index dfc756d..419fdbb 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/backends/import-tasks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/backends/import-tasks.xml
@@ -51,9 +51,9 @@
'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
- </call>
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
+ </call>
<call function="'checkRC'">
{ 'returncode' : RC ,
@@ -1376,9 +1376,13 @@
</message>
<!--- Stop DS -->
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
- </call>
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
+ </call>
<call function="'checkRC'">
{ 'returncode' : RC ,
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/cleanup/cleanup.xml b/opendj-sdk/opends/tests/functional-tests/testcases/cleanup/cleanup.xml
index a1a9365..18325fe 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/cleanup/cleanup.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/cleanup/cleanup.xml
@@ -35,20 +35,20 @@
<!--- Delete file if it exists already-->
<message>
- 'Delete folder %s/ldifdata.zip' % (DIRECTORY_INSTANCE_DIR)
+ 'Delete folder %s/ldifdata.zip' % DIRECTORY_INSTANCE_DIR
</message>
- <call function="'deletefile'">
- { 'filename' : '%s/ldifdata.zip' % (DIRECTORY_INSTANCE_DIR),
- 'hostname' : STAF_REMOTE_HOSTNAME }
+ <call function="'deleteFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'filename' : '%s/ldifdata.zip' % DIRECTORY_INSTANCE_DIR }
</call>
<!--- Delete folder if it exists already-->
<message>
- 'Delete folder %s/functional-tests' % (DIRECTORY_INSTANCE_DIR)
+ 'Delete folder %s/functional-tests' % DIRECTORY_INSTANCE_DIR
</message>
- <call function="'deletefolder'">
- { 'foldername' : '%s/functional-tests' % (DIRECTORY_INSTANCE_DIR),
- 'hostname' : STAF_REMOTE_HOSTNAME }
+ <call function="'deleteFolder'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'foldername' : '%s/functional-tests' % DIRECTORY_INSTANCE_DIR }
</call>
</sequence>
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/core/core.xml b/opendj-sdk/opends/tests/functional-tests/testcases/core/core.xml
index ba13726..bad02f7 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/core/core.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/core/core.xml
@@ -49,8 +49,8 @@
'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -104,8 +104,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/quickstart/quickstart.xml b/opendj-sdk/opends/tests/functional-tests/testcases/quickstart/quickstart.xml
index a13bddb..e658cd1 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/quickstart/quickstart.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/quickstart/quickstart.xml
@@ -43,8 +43,8 @@
'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -90,14 +90,19 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
- </call>
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
+ </call>
<call function="'checkRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
</call>
+
</sequence>
</sequence>
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/schema/schema.xml b/opendj-sdk/opends/tests/functional-tests/testcases/schema/schema.xml
index e254a78..6ec2874 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/schema/schema.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/schema/schema.xml
@@ -49,8 +49,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -85,8 +85,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/account_activation/security_account_activation.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/account_activation/security_account_activation.xml
index 9698fd2..bd6da00 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/account_activation/security_account_activation.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/account_activation/security_account_activation.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -96,8 +96,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/auth_pwd_syntax/security_auth_pwd_syntax.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/auth_pwd_syntax/security_auth_pwd_syntax.xml
index e4f1cc1..6be6e7c 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/auth_pwd_syntax/security_auth_pwd_syntax.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/auth_pwd_syntax/security_auth_pwd_syntax.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -112,8 +112,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/bind_no_pwd/security_bind_no_pwd.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/bind_no_pwd/security_bind_no_pwd.xml
index e1bce8e..c0564fb 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/bind_no_pwd/security_bind_no_pwd.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/bind_no_pwd/security_bind_no_pwd.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -92,8 +92,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_jks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_jks.xml
index 5a81e80..6297016 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_jks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_jks.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -92,8 +92,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml
index a037d41..5b35c76 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_teardown_jks.xml
@@ -101,11 +101,11 @@
'Security: JKS: Postamble Step 3. Removing JKS Keystore'
</message>
- <call function="'deletefile'">
- { 'filename' : '%s/../config/keystore' % (OPENDS_BINPATH),
- 'hostname' : STAF_REMOTE_HOSTNAME }
+ <call function="'deleteFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'filename' : '%s/../config/keystore' % OPENDS_BINPATH }
</call>
-
+
<call function="'checkRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_pkcs12.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_pkcs12.xml
index 8c594ae..c201f02 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_pkcs12.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_pkcs12.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -92,8 +92,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_teardown_pkcs12.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_teardown_pkcs12.xml
index b5889cb..ab67728 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_teardown_pkcs12.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_teardown_pkcs12.xml
@@ -101,11 +101,11 @@
'Security: PKCS12: Postamble Step 3. Removing PKCS12 Keystore'
</message>
- <call function="'deletefile'">
- { 'filename' : '%s/../config/keystore' % (OPENDS_BINPATH),
- 'hostname' : STAF_REMOTE_HOSTNAME }
+ <call function="'deleteFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'filename' : '%s/../config/keystore' % OPENDS_BINPATH }
</call>
-
+
<call function="'checkRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml
index 5b2708b..1b9b437 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy/security_pwd_policy.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -132,8 +132,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy_root/security_pwd_policy_root.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy_root/security_pwd_policy_root.xml
index 6df4d93..dfcdb2f 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy_root/security_pwd_policy_root.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_policy_root/security_pwd_policy_root.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -84,8 +84,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml
index 6622b9c..5666d56 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_storage/security_pwd_storage.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -132,8 +132,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_validator/security_pwd_validator.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_validator/security_pwd_validator.xml
index 2d8c6fc..f2fa00c 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_validator/security_pwd_validator.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pwd_validator/security_pwd_validator.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -96,8 +96,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/sasl/security_sasl.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/sasl/security_sasl.xml
index 9fccfe8..6ef9909 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/sasl/security_sasl.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/sasl/security_sasl.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -104,8 +104,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_startTLS.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_startTLS.xml
index 7596c45..1cebbeb 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_startTLS.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_startTLS.xml
@@ -50,8 +50,8 @@
</message>
<!--- Start DS -->
- <call function="'startDS'">
- { 'dsbinpath' : '%s' % (OPENDS_BINPATH) }
+ <call function="'StartDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME }
</call>
<call function="'checkRC'">
@@ -96,8 +96,12 @@
'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
</message>
- <call function="'stopDS'">
- { 'dsInstancePort' : '%s' % (DIRECTORY_INSTANCE_PORT) }
+ <call function="'StopDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsHost' : DIRECTORY_INSTANCE_HOST,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
</call>
<call function="'checkRC'">
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_teardown_startTLS.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_teardown_startTLS.xml
index dcd435f..0ba259a 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_teardown_startTLS.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_teardown_startTLS.xml
@@ -79,11 +79,11 @@
'Security: TLS: Postamble Step 3. Removing JKS Keystore'
</message>
- <call function="'deletefile'">
- { 'filename' : '%s/../config/keystore' % (OPENDS_BINPATH),
- 'hostname' : STAF_REMOTE_HOSTNAME }
+ <call function="'deleteFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'filename' : '%s/../config/keystore' % OPENDS_BINPATH }
</call>
-
+
<call function="'checkRC'">
{ 'returncode' : RC ,
'result' : STAXResult }
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/setup/setup.xml b/opendj-sdk/opends/tests/functional-tests/testcases/setup/setup.xml
index 1c83ce6..e2bf86b 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/setup/setup.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/setup/setup.xml
@@ -32,51 +32,60 @@
<function name="main_setup">
<sequence>
-
- <!-- Delete any existing files -->
- <message>'Delete temporary staging area'</message>
- <call function="'deletefolder'">
- { 'foldername' : '%s' % (TMP_DATA_DIR),
- 'hostname' : STAF_LOCAL_HOSTNAME }
+
+ <!-- Locally delete any existing files from staging area -->
+ <message>'Delete the temporary staging area'</message>
+ <call function="'deleteFolder'">
+ { 'location' : STAXServiceMachine,
+ 'foldername' : '%s' % TMP_DATA_DIR }
</call>
+ <!-- Locally delete any existing files from the zip archive -->
<message>'Delete existing zip archive.'</message>
- <call function="'deletefile'">
- { 'filename' : '%s/ldifdata.zip' % TMPDIR ,
- 'hostname' : STAF_LOCAL_HOSTNAME }
+ <call function="'deleteFile'">
+ { 'location' : STAXServiceMachine,
+ 'filename' : '%s/ldifdata.zip' % TMPDIR }
</call>
- <!-- Copy static data files to temporary staging area -->
- <!-- LDIF files -->
+ <!--- Delete folder if it exists on remote host-->
+ <message>
+ 'Delete folder %s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
+ </message>
+ <call function="'deleteFolder'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'foldername' : '%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME),
+ }
+ </call>
+
+ <!-- Locally copy static data files to temporary staging area -->
+ <!-- LDIF (.ldif) files -->
<message>'Copy ldif data files'</message>
<call function="'CopyFolderByExtension'">
- { 'srcfolder' : TESTS_DIR,
+ { 'location' : STAXServiceMachine,
+ 'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
- 'extension' : 'ldif',
- 'hostname' : STAF_LOCAL_HOSTNAME
- }
+ 'extension' : 'ldif' }
</call>
+ <!-- PWD (.pwd) files -->
<call function="'CopyFolderByExtension'">
- { 'srcfolder' : TESTS_DIR,
+ { 'location' : STAXServiceMachine,
+ 'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
- 'extension' : 'pwd',
- 'hostname' : STAF_LOCAL_HOSTNAME
- }
+ 'extension' : 'pwd' }
</call>
- <!-- Archive (gz) files -->
+ <!-- Archive (.gz) files -->
<message>'Copy gz data files'</message>
<call function="'CopyFolderByExtension'">
- { 'srcfolder' : TESTS_DIR,
+ { 'location' : STAXServiceMachine,
+ 'srcfolder' : TESTS_DIR,
'destfolder' : TMP_DATA_DIR,
- 'extension' : 'gz',
- 'hostname' : STAF_LOCAL_HOSTNAME
- }
+ 'extension' : 'gz' }
</call>
<!-- Dynamically create ldif files for staging -->
- <!-- Modify SSL port to user-defined value -->
+ <!-- Modify SSL port to a user-defined value -->
<script>
write_ldaps_ldif_file('%s/shared/data' % (TMP_DATA_DIR), '%s' % (DIRECTORY_INSTANCE_SSL_PORT));
</script>
@@ -85,69 +94,66 @@
<message>
'Zip up data directory.'
</message>
- <call function="'zipfile'">
- { 'zipfilename' : '%s/ldifdata.zip' % TMPDIR ,
- 'foldername' : TMP_DATA_DIR ,
- 'relativeto' : TMPDIR }
+ <call function="'zipUpFile'">
+ { 'location' : STAXServiceMachine,
+ 'zipfile' : '%s/ldifdata.zip' % TMPDIR ,
+ 'folder' : TMP_DATA_DIR ,
+ 'relativeto' : TMPDIR }
</call>
- <!--- Copy data to remote host -->
+ <!--- Copy staging data to remote host -->
<message>
'Copy tests to %s on %s' % (DIRECTORY_INSTANCE_DIR,STAF_REMOTE_HOSTNAME)
</message>
- <call function="'copyfile'">
- { 'srcfile' : '%s/ldifdata.zip' % TMPDIR,
+ <call function="'copyFile'">
+ { 'location' : STAXServiceMachine,
+ 'srcfile' : '%s/ldifdata.zip' % TMPDIR,
'destfile' : '%s/ldifdata.zip' % DIRECTORY_INSTANCE_DIR,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
- <!--- Unzip contents of tests data on remote host -->
+ <!--- Unzip contents of staging data on remote host -->
<message>
'Extract contents of test data %s on %s' % (DIRECTORY_INSTANCE_DIR,STAF_REMOTE_HOSTNAME)
</message>
- <call function="'unzipfile'">
- { 'zipfile' : '%s/ldifdata.zip' % DIRECTORY_INSTANCE_DIR,
- 'unzipdir' : '%s' % (DIRECTORY_INSTANCE_DIR),
- 'ziphost' : STAF_REMOTE_HOSTNAME }
+ <call function="'unZipFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'zipfile' : '%s/ldifdata.zip' % DIRECTORY_INSTANCE_DIR,
+ 'unzipdir' : '%s' % DIRECTORY_INSTANCE_DIR,
+ }
</call>
<!--- Install DS Copy zip file -->
<message>
'Copy DS zip archive to %s on %s' % (DSTFILE,STAF_REMOTE_HOSTNAME)
</message>
- <call function="'copyfile'">
+ <call function="'copyFile'">
{ 'srcfile' : SRCFILE,
'destfile' : DSTFILE,
'remotehost' : STAF_REMOTE_HOSTNAME }
</call>
- <!--- Delete folder if it exists already-->
- <message>
- 'Delete folder %s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
- </message>
- <call function="'deletefolder'">
- { 'foldername' : '%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME),
- 'hostname' : STAF_REMOTE_HOSTNAME }
- </call>
-
<!--- Install DS Extract zip file -->
<message>
'Extract DS zip archive to %s on %s' % (DIRECTORY_INSTANCE_DIR,STAF_REMOTE_HOSTNAME)
</message>
- <call function="'unzipfile'">
- { 'zipfile' : DSTFILE,
- 'unzipdir' : '%s' % (DIRECTORY_INSTANCE_DIR),
- 'ziphost' : STAF_REMOTE_HOSTNAME }
+ <call function="'unZipFile'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'zipfile' : DSTFILE,
+ 'unzipdir' : '%s' % DIRECTORY_INSTANCE_DIR }
</call>
<!--- Configure DS -->
<sequence>
<message>
- 'Configure DS to run on port %s with base suffix %s' % (DIRECTORY_INSTANCE_PORT,DIRECTORY_INSTANCE_SFX)
+ 'Configuring DS on %s' % STAF_REMOTE_HOSTNAME
</message>
- <call function="'configureDS'">
- { 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
- 'dsInstanceSuffix' : DIRECTORY_INSTANCE_SFX }
+ <call function="'ConfigureDsWithScript'">
+ { 'location' : STAF_REMOTE_HOSTNAME,
+ 'dsPort' : DIRECTORY_INSTANCE_PORT,
+ 'dsBindDN' : DIRECTORY_INSTANCE_DN,
+ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD,
+ 'dsBaseDN' : DIRECTORY_INSTANCE_SFX }
</call>
<call function="'checkRC'">
{ 'returncode' : RC ,
--
Gitblit v1.10.0