504N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2887N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
671N/A<!--
671N/A ! CDDL HEADER START
671N/A !
671N/A ! The contents of this file are subject to the terms of the
671N/A ! Common Development and Distribution License, Version 1.0 only
671N/A ! (the "License"). You may not use this file except in compliance
671N/A ! with the License.
671N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A ! or http://forgerock.org/license/CDDLv1.0.html.
671N/A ! See the License for the specific language governing permissions
671N/A ! and limitations under the License.
671N/A !
671N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
671N/A ! Portions Copyright [yyyy] [name of copyright owner]
671N/A !
671N/A ! CDDL HEADER END
671N/A !
3232N/A ! Copyright 2006-2008 Sun Microsystems, Inc.
671N/A ! -->
504N/A<stax>
504N/A
504N/A <defaultcall function="schema_setup"/>
504N/A
504N/A <function name="schema_setup">
504N/A
837N/A <sequence>
504N/A
946N/A <block name="'setup'">
3973N/A
3973N/A <try>
3973N/A <sequence>
2175N/A
3973N/A <!-- Create the topology necessary to the test group/suite -->
3973N/A <call function="'runFunction'">
3973N/A { 'functionName' : 'createTopology' ,
3973N/A 'functionMessage' : 'Create DS topology' ,
3973N/A 'functionException' : 'Server.CreateTopologyException' ,
3973N/A 'functionArguments' : { 'initialiseInstance' : True }
3973N/A }
3973N/A </call>
946N/A
3973N/A <!-- Start the OpenDS Server -->
3973N/A <call function="'runFunction'">
3973N/A { 'functionName' : 'StartDsWithScript' ,
3973N/A 'functionMessage' : 'Start the Directory Server.' ,
3973N/A 'functionException' : 'Server.StartException' ,
3973N/A 'functionArguments' : { 'location' : STAF_REMOTE_HOSTNAME }
3973N/A }
3973N/A </call>
3973N/A
3973N/A <!--- Check that DS started -->
3973N/A <call function="'runFunction'">
3973N/A { 'functionName' : 'isAlive' ,
3973N/A 'functionMessage' : 'Start the Directory Server.' ,
3973N/A 'functionException' : 'Server.StartException' ,
4153N/A 'functionArguments' : { 'noOfLoops' : 10 ,
3973N/A 'noOfMilliSeconds' : 2000 }
3973N/A }
3973N/A </call>
1372N/A
3973N/A <!-- Load the data needed by the test suite -->
3973N/A <script>
3973N/A schemastartldif='%s/schema/ldifs/schema_start.ldif' % remote.data
3973N/A </script>
3973N/A <call function="'runFunction'">
3973N/A { 'functionName' : 'addEntry' ,
3973N/A 'functionMessage' : 'Start the Directory Server.' ,
3973N/A 'functionException' : 'LDAP.AddEntryException' ,
3973N/A 'functionArguments' : { 'dsInstanceHost' : server.host ,
3973N/A 'dsInstancePort' : server.port ,
3973N/A 'dsInstanceDn' : server.dn ,
3973N/A 'dsInstancePswd' : server.password ,
3973N/A 'entryToBeAdded' : schemastartldif }
3973N/A }
3973N/A </call>
3973N/A
3973N/A </sequence>
1372N/A
3973N/A <catch exception="'STAXException.Server.CreateTopologyException'" typevar="eType" var="eInfo">
3973N/A <sequence>
3973N/A <message log="1" level="'fatal'">
3973N/A '%s: Create topology failed. eInfo(%s)' % (eType,eInfo)
3973N/A </message>
3973N/A <throw exception="'STAFException.TestSuite.SetupException'" />
3973N/A </sequence>
3973N/A </catch>
504N/A
3973N/A <catch exception="'STAXException.Server.StartException'" typevar="eType" var="eInfo">
3973N/A <sequence>
3973N/A <message log="1" level="'fatal'">
3973N/A '%s: Failed to start Directory Server. eInfo(%s)' % (eType,eInfo)
3973N/A </message>
3973N/A <throw exception="'STAFException.TestSuite.SetupException'" />
3973N/A </sequence>
3973N/A </catch>
3973N/A
3973N/A <catch exception="'STAXException.LDAP.AddEntryException'" typevar="eType" var="eInfo">
3973N/A <sequence>
3973N/A <message log="1" level="'fatal'">
3973N/A '%s: LDAPAdd failed. eInfo(%s)' % (eType,eInfo)
3973N/A </message>
3973N/A <throw exception="'STAFException.TestSuite.SetupException'" />
3973N/A </sequence>
3973N/A </catch>
3973N/A
3973N/A </try>
3973N/A
946N/A </block>
1372N/A
1372N/A </sequence>
504N/A
504N/A </function>
504N/A
504N/A</stax>