From 3d65ad05ab117b57dd07a4995fedb0cdfd4738c9 Mon Sep 17 00:00:00 2001
From: smaguin <smaguin@localhost>
Date: Fri, 04 Apr 2008 10:04:57 +0000
Subject: [PATCH] add getFile fct

---
 opends/tests/system-tests/phases/shared/functions/stafcmd.xml |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/opends/tests/system-tests/phases/shared/functions/stafcmd.xml b/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
index f79d6e3..c79aafd 100755
--- a/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
+++ b/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
@@ -594,5 +594,53 @@
     </sequence>
   </function>
 
+  
+  
+  <function name="getFile">
+    <function-prolog>
+      This function get the contents of a file
+    </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="filename" type="required">
+        <function-arg-description>
+          The name of the file
+        </function-arg-description>
+        <function-arg-property name="type" value="filename"/>
+      </function-arg-def>
+      <function-arg-def name="type" type="optional" default="'text'">
+        <function-arg-description>
+          The type of the file
+        </function-arg-description>
+        <function-arg-property name="type" value="string"/>
+      </function-arg-def>
+      <function-arg-def name="format" type="optional" default="'native'">
+        <function-arg-description>
+          The format of the file
+        </function-arg-description>
+        <function-arg-property name="type" value="string"/>
+      </function-arg-def>
+    </function-map-args>
+    <sequence>
+      <stafcmd name="'STAF Command: Get File'">
+        <location>'%s' % location</location>
+        <service>'fs'</service>
+        <request>
+          'GET FILE %s %s FORMAT %s' % (filename,type,format)
+        </request>
+      </stafcmd>
+      <script>
+        cmdRC=RC
+        cmdResult=STAFResult
+      </script>
+      <return>[cmdRC,cmdResult]</return>
+    </sequence>
+  </function>
+  	
 
 </stax>

--
Gitblit v1.10.0