4865N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4865N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
4865N/A<!--
4865N/A ! CDDL HEADER START
4865N/A !
4865N/A ! The contents of this file are subject to the terms of the
4865N/A ! Common Development and Distribution License, Version 1.0 only
4865N/A ! (the "License"). You may not use this file except in compliance
4865N/A ! with the License.
4865N/A !
4865N/A ! You can obtain a copy of the license at
4865N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
4865N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
4865N/A ! See the License for the specific language governing permissions
4865N/A ! and limitations under the License.
4865N/A !
4865N/A ! When distributing Covered Code, include this CDDL HEADER in each
4865N/A ! file and include the License file at
4865N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
4865N/A ! add the following below this CDDL HEADER, with the fields enclosed
4865N/A ! by brackets "[]" replaced with your own identifying information:
4865N/A ! Portions Copyright [yyyy] [name of copyright owner]
4865N/A !
4865N/A ! CDDL HEADER END
4865N/A !
4865N/A ! Copyright 2009 Sun Microsystems, Inc.
4865N/A ! -->
4865N/A<stax>
4865N/A
4865N/A <defaultcall function="fractional-replication_cleanup"/>
4865N/A
4865N/A <function name="fractional-replication_cleanup">
4865N/A <function-map-args>
4865N/A <function-arg-def name="suiteSuffix"
4865N/A type="optional"
4865N/A default="None">
4865N/A <function-arg-description>
4865N/A Test suite suffix used to copy the server logs back to the controller.
4865N/A </function-arg-description>
4865N/A <function-arg-property name="type" value="string"/>
4865N/A </function-arg-def>
4865N/A </function-map-args>
4865N/A <sequence>
4865N/A
4865N/A <block name="'fractional-replication-cleanup'">
4865N/A
5834N/A <testcase name="getTestCaseName('Fractional Repl Cleanup')">
4865N/A
5834N/A <try>
5834N/A
5834N/A <sequence>
5834N/A <call function="'testCase_Preamble'"/>
4865N/A
5834N/A <!-- Stop the servers in the topology -->
5834N/A <call function="'stopServers'">
5834N/A [_splitServerList]
5834N/A </call>
5834N/A
5834N/A <!-- Copy the server logs to the controller machine -->
5834N/A <if expr="suiteSuffix != None">
5834N/A <paralleliterate var="server" in="_splitServerList" indexvar="i">
5834N/A <sequence>
5834N/A <script>
5834N/A suffix = suiteSuffix + '_%s' % (i + 1)
5834N/A serverHost = server.getHostname()
5834N/A serverName = '%s:%s' % (serverHost, server.getPort())
5834N/A serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
5834N/A </script>
5834N/A
5834N/A <message>
5834N/A 'Copy %s/logs/errors from %s to %s/errors_%s on %s' % \
5834N/A (serverPath, serverName, logs.sut, suffix, STAXServiceMachine)
5834N/A </message>
5834N/A <call function="'copyFile'">
5834N/A {
5834N/A 'location' : serverHost,
5834N/A 'srcfile' : '%s/logs/errors' % serverPath,
5834N/A 'destfile' : '%s/errors_%s' % (logs.sut, suffix),
5834N/A 'remotehost' : STAXServiceMachine
5834N/A }
5834N/A </call>
5834N/A <message>
5834N/A 'Copy %s/logs/access from %s to %s/access_%s on %s' % \
5834N/A (serverPath, serverName,logs.sut, suffix, STAXServiceMachine)
5834N/A </message>
5834N/A <call function="'copyFile'">
5834N/A {
5834N/A 'location' : serverHost,
5834N/A 'srcfile' : '%s/logs/access' % serverPath,
5834N/A 'destfile' : '%s/access_%s' % (logs.sut, suffix),
5834N/A 'remotehost' : STAXServiceMachine
5834N/A }
5834N/A </call>
5834N/A <message>
5834N/A 'Copy %s/logs/fractional-replication from %s to %s/fractional-replication_%s on %s' % \
5834N/A (serverPath, serverName, logs.sut, suffix, STAXServiceMachine)
5834N/A </message>
5834N/A <call function="'copyFile'">
5834N/A {
5834N/A 'location' : serverHost,
5834N/A 'srcfile' : '%s/logs/fractional-replication' % serverPath,
5834N/A 'destfile' : '%s/fractional-replication_%s' % (logs.sut, suffix),
5834N/A 'remotehost' : STAXServiceMachine
5834N/A }
5834N/A </call>
5834N/A </sequence>
5834N/A </paralleliterate>
5834N/A </if>
5834N/A
5834N/A <!-- Remove the topology created for the test suite -->
5834N/A <message>
5834N/A 'Remove DS topology created for the Synchronization Basic Test Suite'
5834N/A </message>
5834N/A
5834N/A <call function="'removeTopology'">
5834N/A { 'multipleInstanceTopology' : True }
5834N/A </call>
5834N/A
5834N/A <call function="'checkRC'">
5834N/A { 'returncode' : RC ,
5834N/A 'result' : STAXResult }
5834N/A </call>
5834N/A
5834N/A <tcstatus result="'pass'"></tcstatus>
5834N/A
5834N/A </sequence>
5834N/A
5834N/A <catch exception="'STAXException'" typevar="eType" var="eInfo">
5834N/A <sequence>
5834N/A <message log="1" level="'fatal'">
5834N/A '%s: Failed to cleanup. eInfo(%s)' % (eType,eInfo)
5834N/A </message>
5834N/A <throw exception="'STAFException.TestSuite.CleanupException'" />
4865N/A </sequence>
5834N/A </catch>
5834N/A <finally>
5834N/A <!-- Test Case postamble -->
5834N/A <call function="'testCase_Postamble'"/>
5834N/A </finally>
5834N/A
5834N/A </try>
4865N/A
5834N/A </testcase>
4865N/A
4865N/A </block>
4865N/A
4865N/A </sequence>
4865N/A
4865N/A </function>
4865N/A
4865N/A</stax>