From 26a43f09a64bd00265348996cac1443b36d4d645 Mon Sep 17 00:00:00 2001
From: andrug <andrug@localhost>
Date: Tue, 20 May 2008 12:00:59 +0000
Subject: [PATCH] ping staf on hosts to avoid staf exception
---
opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml | 63 +++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml b/opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
index c79aafd..4ff13d2 100755
--- a/opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
+++ b/opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
@@ -26,6 +26,69 @@
! Copyright 2008 Sun Microsystems, Inc.
! -->
<stax>
+ <function name="pingStaf" scope="local">
+ <function-prolog>
+ This function ping staf daemon on remoteHost
+ </function-prolog>
+ <function-map-args>
+ <function-arg-def name="location" type="optional"
+ default="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="targetHost" type="required">
+ <function-arg-description>
+ The name of the host to be ping
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+ <function-arg-def name="fileFd" type="required">
+ <function-arg-description>
+ file descriptor to write message in
+ </function-arg-description>
+ </function-arg-def>
+ </function-map-args>
+ <sequence>
+
+ <call function="'writeStartTagOperation'">
+ { 'tagName' : 'pingStaf',
+ 'fileFd' : fileFd }
+ </call>
+
+ <call function="'writeMessage'">
+ { 'content' : 'Ping staf on machine %s' % targetHost,
+ 'fileFd' : fileFd }
+ </call>
+ <stafcmd name="'STAF Command: Copy File'">
+ <location>'%s' % location</location>
+ <service>'ping'</service>
+ <request>'PING MACHINE %s' % targetHost </request>
+ </stafcmd>
+ <script>
+ cmdRC=RC
+ cmdResult=STAFResult
+ </script>
+ <call function="'checkRC'">
+ { 'returncode' : cmdRC,
+ 'result' : cmdResult,
+ 'fileFd' : fileFd }
+ </call>
+ <if expr="cmdRC != 0">
+ <script>errMsg = 'Can not ping staf on %s' % targetHost </script>
+ <else>
+ <script>errMsg = 'Can ping staf on %s' % targetHost </script>
+ </else>
+ </if>
+ <call function="'writeEndTagOperation'">{'fileFd' : fileFd}</call>
+ <return>
+ [ cmdRC , errMsg ]
+ </return>
+ </sequence>
+ </function>
+
+
<function name="copyFile" scope="local">
<function-prolog>
This function copies a source file to destination file to host
--
Gitblit v1.10.0