From f9de0f451ec2232bdd19ad10780b3e09b3d6ddee Mon Sep 17 00:00:00 2001
From: andrug <andrug@localhost>
Date: Tue, 18 Mar 2008 18:43:24 +0000
Subject: [PATCH] detail pre/post conf example in sample2 scenario
---
opends/tests/system-tests/scenario/sample2/pre_configuration.xml | 32 ++++++++++++++-
opends/tests/system-tests/scenario/sample2/post_configuration.xml | 33 ++++++++++++++--
opends/tests/system-tests/phases/log/log.xml | 50 ++++++++++++++++++++++++
3 files changed, 107 insertions(+), 8 deletions(-)
diff --git a/opends/tests/system-tests/phases/log/log.xml b/opends/tests/system-tests/phases/log/log.xml
index ce324a7..963a236 100755
--- a/opends/tests/system-tests/phases/log/log.xml
+++ b/opends/tests/system-tests/phases/log/log.xml
@@ -487,7 +487,55 @@
</if>
</sequence>
</function>
-
+
+
+ <!-- ************************************************************ -->
+ <function name="writeStartTagInstance" scope="local">
+ <function-prolog>
+ ''
+ </function-prolog>
+ <function-map-args>
+ <function-arg-def name="instance" type="required">
+ </function-arg-def>
+ <function-arg-def name="fileFd" type="required">
+ <function-arg-description>
+ file descriptor
+ </function-arg-description>
+ </function-arg-def>
+ </function-map-args>
+ <sequence>
+ <if expr="fileFd != NO_FILE">
+ <script>
+ str = '\n<instance name=\"%s\"' % instance.getName()
+ str = '%s host=\"%s\"' % (str, instance.getHost())
+ str = '%s port=\"%s\"' % (str, instance.getLDAPPort())
+ str = '%s product=\"%s\">\n' % (str, instance.getProduct())
+ fileFd.write(str)
+ </script>
+ </if>
+ </sequence>
+ </function>
+
+ <function name="writeEndTagInstance" scope="local">
+ <function-prolog>
+ ''
+ </function-prolog>
+ <function-map-args>
+ <function-arg-def name="fileFd" type="required">
+ <function-arg-description>
+ file descriptor
+ </function-arg-description>
+ </function-arg-def>
+ </function-map-args>
+ <sequence>
+ <if expr="fileFd != NO_FILE">
+ <script>
+ fileFd.write('</instance>\n\n')
+ </script>
+ </if>
+ </sequence>
+ </function>
+
<!-- ************************************************************ -->
<function name="writeStartTagOperation" scope="local">
diff --git a/opends/tests/system-tests/scenario/sample2/post_configuration.xml b/opends/tests/system-tests/scenario/sample2/post_configuration.xml
index 23093de..5ca2cf8 100644
--- a/opends/tests/system-tests/scenario/sample2/post_configuration.xml
+++ b/opends/tests/system-tests/scenario/sample2/post_configuration.xml
@@ -44,25 +44,50 @@
</function-map-args>
<sequence>
- <!-- == Call preambule == -->
+ <!-- ================= Call preambule ======================== -->
<call function="'phasePreamble'">
- { 'phaseName' : 'postconfiguration' ,
+ { 'phaseName' : 'postconfiguration',
'fileFd' : LOG_MAIN_FD }
</call>
+ <!-- ================= Display instance names ================ -->
+ <iterate in="instances" var="instance">
+ <sequence>
+ <!-- == Write tag for xml report -->
+ <call function="'writeStartTagInstance'">
+ {
+ 'instance' : instance,
+ 'fileFd' : LOG_MAIN_FD
+ }
+ </call>
+
+ <call function="'writeMessage'">
+ {
+ 'fileFd' : LOG_MAIN_FD,
+ 'content' : 'my instance is : %s' % instance.getName()
+ }
+ </call>
+
+ <!-- == Write tag for xml report -->
+ <call function="'writeEndTagInstance'">
+ { 'fileFd' : LOG_MAIN_FD }
+ </call>
+
+ </sequence>
+ </iterate>
- <!-- == Call postphase == -->
+
+ <!-- ================= Call postambule ======================= -->
<call function="'phasePostamble'">
{
'phaseName' : 'postconfiguration',
'fileFd' : LOG_MAIN_FD
}
</call>
-
</sequence>
</function>
diff --git a/opends/tests/system-tests/scenario/sample2/pre_configuration.xml b/opends/tests/system-tests/scenario/sample2/pre_configuration.xml
index e81b8ab..90db05b 100644
--- a/opends/tests/system-tests/scenario/sample2/pre_configuration.xml
+++ b/opends/tests/system-tests/scenario/sample2/pre_configuration.xml
@@ -44,18 +44,44 @@
</function-map-args>
<sequence>
- <!-- == Call preambule == -->
+ <!-- ================= Call preambule ======================== -->
<call function="'phasePreamble'">
- { 'phaseName' : 'preconfiguration' ,
+ { 'phaseName' : 'preconfiguration',
'fileFd' : LOG_MAIN_FD }
</call>
+ <!-- ================= Display instance names ================ -->
+ <iterate in="instances" var="instance">
+ <sequence>
+ <!-- == Write tag for xml report -->
+ <call function="'writeStartTagInstance'">
+ {
+ 'instance' : instance,
+ 'fileFd' : LOG_MAIN_FD
+ }
+ </call>
+
+ <call function="'writeMessage'">
+ {
+ 'fileFd' : LOG_MAIN_FD,
+ 'content' : 'my instance is : %s' % instance.getName()
+ }
+ </call>
+
+ <!-- == Write tag for xml report -->
+ <call function="'writeEndTagInstance'">
+ { 'fileFd' : LOG_MAIN_FD }
+ </call>
+
+ </sequence>
+ </iterate>
- <!-- == Call postphase == -->
+
+ <!-- ================= Call postambule ======================= -->
<call function="'phasePostamble'">
{
'phaseName' : 'preconfiguration',
--
Gitblit v1.10.0