mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

mkeyes
29.03.2007 1893a75494deeb4071f2ce4b53c256acd6e62780
First commit for stress tests. The first tests concern import functionality.
34 files added
8601 ■■■■■ changed files
opends/tests/stress-tests/build.bat 52 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/config/config.py 30 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/config/replication/basic_topology.txt 25 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/shared/data/import_ldif/import_ldif_start.ldif 2797 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/shared/data/quickstart/quickstart.ldif 220 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/shared/stax.dtd 1148 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer.xml 1185 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/Linux.properties 1 ●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/SunOS-sparc.properties 1 ●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/SunOS-x86.properties 1 ●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/SunOS.properties patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/config.py.stubs 30 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/failure.html 7 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/replay.bat 11 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/replay.sh 10 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/staf-installer.properties 83 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/stress-tests.cfg 51 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/windows-x86-32.properties 2 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/windows-x86-64.properties 1 ●●●● patch | view | raw | blame | history
opends/tests/stress-tests/staf-installer/windows.properties 2 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif.xml 85 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr.xml 210 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_cleanup.xml 94 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml 214 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml 227 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml 267 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml 227 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml 191 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_setup.xml 140 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml 172 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml 266 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/runStressTests.xml 245 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/import_ldif/runTestJob.xml 524 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/testcases/quickstart/quickstart.xml 82 ●●●●● patch | view | raw | blame | history
opends/tests/stress-tests/build.bat
New file
@@ -0,0 +1,52 @@
@echo off
rem CDDL HEADER START
rem
rem The contents of this file are subject to the terms of the
rem Common Development and Distribution License, Version 1.0 only
rem (the "License").  You may not use this file except in compliance
rem with the License.
rem
rem You can obtain a copy of the license at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
rem See the License for the specific language governing permissions
rem and limitations under the License.
rem
rem When distributing Covered Code, include this CDDL HEADER in each
rem file and include the License file at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
rem add the following below this CDDL HEADER, with the fields enclosed
rem information:
rem      Portions Copyright [yyyy] [name of copyright owner]
rem
rem CDDL HEADER END
rem
rem
rem      Portions Copyright 2007 Sun Microsystems, Inc.
setlocal
rem These are the variables we need to run the functional tests
set FT_HOME=%~dP0
set ANT_HOME=%FT_HOME%\..\..\ext\ant
if "%JAVA_HOME%" == "" goto noJavaHome
goto runAnt
:noJavaHome
echo Error: JAVA_HOME environment variable is not set.
echo        Please set it to a valid Java 5 Development Kit installation.
goto end
:runAnt
rem echo a quick summary of what this script did
echo using the following variables:
echo   ANT_HOME=%ANT_HOME%
echo   JAVA_HOME=%JAVA_HOME%
if not "%*" == "" echo   your parameters=%*
echo Now running ant ...
set OPENDS_LIB=%FT_HOME%\..\..\lib
"%ANT_HOME%\bin\ant" -lib "%OPENDS_LIB%\mail.jar;%OPENDS_LIB%\activation.jar" -f staf-installer.xml %*
:end
opends/tests/stress-tests/config/config.py
New file
@@ -0,0 +1,30 @@
TEST_OS_STRING              = 'Linux'
TEST_HW_STRING              = 'i386'
TEST_JVM_STRING             = '1.6.0_01(32 bits)'
STAF_LOCAL_HOSTNAME         = 'localhost'
STAF_REMOTE_HOSTNAME        = 'localhost'
TMPDIR                      = '/path/to/opends/tests/functional-run/tmp'
PSWDFILE                    = '%s/password' % TMPDIR
OPENDSDIR                   = '/path/to/opends'
OPENDSNAME                  = 'OpenDS-0.9.0'
ZIPNAME                     = 'OpenDS-0.9.0.zip'
ZIPPATH                     = '/path/to/opends/build/package'
TESTS_ROOT                  = '%s/tests' % OPENDSDIR
TESTS_DIR                   = '%s/functional-tests' % TESTS_ROOT
TESTS_SHARED_DIR            = '%s/shared' % TESTS_DIR
TESTS_FUNCTIONS_DIR         = '%s/functions' % TESTS_SHARED_DIR
TESTS_DATA_DIR              = '%s/data' % TESTS_SHARED_DIR
TESTS_JAVA_DIR          = '%s/java' % TESTS_SHARED_DIR
DIRECTORY_INSTANCE_DN       = 'cn=myself'
DIRECTORY_INSTANCE_PSWD     = 'password'
DIRECTORY_INSTANCE_DIR      = '%s' % TMPDIR
DIRECTORY_INSTANCE_HOST     = 'localhost'
DIRECTORY_INSTANCE_PORT     = '1389'
DIRECTORY_INSTANCE_SSL_PORT = '1636'
DIRECTORY_INSTANCE_SFX      = 'dc=com'
DIRECTORY_INSTANCE_BE       = 'userRoot'
JAVA_HOME                   = '/path/to/java/6/jdk1.6.0_01/jre'
LOGS_ROOT                   = '%s' % TMPDIR
LOGS_URI                    = ''
SEND_MAIL_AFTER_TEST_RUN    = 'false'
SEND_MAIL_TO                = ''
opends/tests/stress-tests/config/replication/basic_topology.txt
New file
@@ -0,0 +1,25 @@
Hostname: localhost
Directory: /tmp/opends-synchro-tests/server1
Port: 11389
Sslport: 11636
Jmxport: 11689
RootDn: cn=directory manager
RootPwd: secret12
BaseDn: o=example
Changelogport: 11111
SynchronizedSuffix: o=example
ChangelogServer: localhost:11111
ChangelogServer: localhost:22222
Hostname: localhost
Directory: /tmp/opends-synchro-tests/server2
Port: 22389
Sslport: 22636
Jmxport: 22689
RootDn: cn=directory manager
RootPwd: secret12
BaseDn: o=example
Changelogport: 22222
SynchronizedSuffix: o=example
ChangelogServer: localhost:11111
ChangelogServer: localhost:22222
opends/tests/stress-tests/shared/data/import_ldif/import_ldif_start.ldif
New file
@@ -0,0 +1,2797 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2007 Sun Microsystems, Inc.
#
dn: o=import ldif stress test,dc=example,dc=com
o: import ldif stress test
objectclass: top
objectclass: organization
dn: ou=People,o=import ldif stress test,dc=example,dc=com
ou: People
objectclass: top
objectclass: organizationalunit
dn: ou=Groups, o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: organizationalunit
ou: Groups
dn: cn=Directory Administrators, ou=Groups, o=import ldif stress test,dc=example,dc=com
cn: Directory Administrators
objectclass: top
objectclass: groupofuniquenames
ou: Groups
uniquemember: uid=kvaughan, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=rdaugherty, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=hmiller, ou=People, o=import ldif stress test,dc=example,dc=com
dn: ou=Special Users,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: organizationalUnit
ou: Special Users
description: Special Administrative Accounts
dn: uid=scarter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Sam Carter
sn: Carter
givenname: Sam
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: scarter
mail: scarter@example.com
telephonenumber: +1 408 555 4798
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4612
userpassword: sprain
dn: uid=tmorris, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Ted Morris
sn: Morris
givenname: Ted
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: tmorris
mail: tmorris@example.com
telephonenumber: +1 408 555 9187
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 4117
userpassword: irrefutable
dn: uid=kvaughan, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Kirsten Vaughan
sn: Vaughan
givenname: Kirsten
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: kvaughan
mail: kvaughan@example.com
telephonenumber: +1 408 555 5625
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 2871
userpassword: bribery
dn: uid=abergin, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Andy Bergin
sn: Bergin
givenname: Andy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Cupertino
uid: abergin
mail: abergin@example.com
telephonenumber: +1 408 555 8585
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 3472
userpassword: inflict
dn: uid=dmiller, ou=People, o=import ldif stress test,dc=example,dc=com
cn: David Miller
sn: Miller
givenname: David
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: dmiller
mail: dmiller@example.com
telephonenumber: +1 408 555 9423
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4135
userpassword: gosling
dn: uid=gfarmer, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Gern Farmer
sn: Farmer
givenname: Gern
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: gfarmer
mail: gfarmer@example.com
telephonenumber: +1 408 555 6201
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1269
userpassword: ruling
dn: uid=kwinters, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Kelly Winters
sn: Winters
givenname: Kelly
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: kwinters
mail: kwinters@example.com
telephonenumber: +1 408 555 9069
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 4178
userpassword: forsook
dn: uid=trigden, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Torrey Rigden
sn: Rigden
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: trigden
mail: trigden@example.com
telephonenumber: +1 408 555 9280
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 3584
userpassword: sensitive
dn: uid=cschmith, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Chris Schmith
sn: Schmith
givenname: Chris
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: cschmith
mail: cschmith@example.com
telephonenumber: +1 408 555 8011
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0416
userpassword: hypotenuse
dn: uid=jwallace, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Judy Wallace
sn: Wallace
givenname: Judy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: jwallace
mail: jwallace@example.com
telephonenumber: +1 408 555 0319
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1033
userpassword: linear
dn: uid=jwalker, ou=People, o=import ldif stress test,dc=example,dc=com
cn: John Walker
sn: Walker
givenname: John
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Cupertino
uid: jwalker
mail: jwalker@example.com
telephonenumber: +1 408 555 1476
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 3915
userpassword: dogleg
dn: uid=tclow, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Torrey Clow
sn: Clow
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: tclow
mail: tclow@example.com
telephonenumber: +1 408 555 8825
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 4376
userpassword: cardreader
dn: uid=rdaugherty, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Robert Daugherty
sn: Daugherty
givenname: Robert
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: rdaugherty
mail: rdaugherty@example.com
telephonenumber: +1 408 555 1296
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 0194
userpassword: apples
dn: uid=jreuter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jayne Reuter
sn: Reuter
givenname: Jayne
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Cupertino
uid: jreuter
mail: jreuter@example.com
telephonenumber: +1 408 555 1122
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 2942
userpassword: destroy
dn: uid=tmason, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Torrey Mason
sn: Mason
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: tmason
mail: tmason@example.com
telephonenumber: +1 408 555 1596
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 1124
userpassword: squatted
dn: uid=bhall, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Benjamin Hall
sn: Hall
givenname: Benjamin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: bhall
mail: bhall@example.com
telephonenumber: +1 408 555 6067
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 2511
userpassword: oranges
dn: uid=btalbot, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Brad Talbot
sn: Talbot
givenname: Brad
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: btalbot
mail: btalbot@example.com
telephonenumber: +1 408 555 4992
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 3532
userpassword: trident
dn: uid=mward, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Marcus Ward
sn: Ward
givenname: Marcus
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: mward
mail: mward@example.com
telephonenumber: +1 408 555 5688
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 1707
userpassword: normal
dn: uid=bjablons, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barbara Jablonski
sn: Jablonski
givenname: Barbara
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: bjablons
mail: bjablons@example.com
telephonenumber: +1 408 555 8815
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0906
userpassword: strawberry
dn: uid=jmcFarla, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Judy McFarland
sn: McFarland
givenname: Judy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: jmcFarla
mail: jmcFarla@example.com
telephonenumber: +1 408 555 2567
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 2359
userpassword: walnut
dn: uid=llabonte, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Lee Labonte
sn: Labonte
givenname: Lee
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: llabonte
mail: llabonte@example.com
telephonenumber: +1 408 555 0957
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 2854
userpassword: sourdough
dn: uid=jcampaig, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jody Campaigne
sn: Campaigne
givenname: Jody
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: jcampaig
mail: jcampaig@example.com
telephonenumber: +1 408 555 1660
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4385
userpassword: grapevine
dn: uid=bhal2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barbara Hall
sn: Hall
givenname: Barbara
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: bhal2
mail: bhal2@example.com
telephonenumber: +1 408 555 4491
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 2758
userpassword: truths
dn: uid=alutz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Alexander Lutz
sn: Lutz
givenname: Alexander
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: alutz
mail: alutz@example.com
telephonenumber: +1 408 555 6505
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 1327
userpassword: northward
dn: uid=btalbo2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Bjorn Talbot
sn: Talbot
givenname: Bjorn
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: btalbo2
mail: btalbo2@example.com
telephonenumber: +1 408 555 4234
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 1205
userpassword: corduroy
dn: uid=achassin, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Ashley Chassin
sn: Chassin
givenname: Ashley
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: achassin
mail: achassin@example.com
telephonenumber: +1 408 555 9972
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 0466
userpassword: duopolist
dn: uid=hmiller, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Harry Miller
sn: Miller
givenname: Harry
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: hmiller
mail: hmiller@example.com
telephonenumber: +1 408 555 9804
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 4304
userpassword: hillock
dn: uid=jcampai2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jeffrey Campaigne
sn: Campaigne
givenname: Jeffrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: jcampai2
mail: jcampai2@example.com
telephonenumber: +1 408 555 7393
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 1377
userpassword: nominee
dn: uid=lulrich, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Lee Ulrich
sn: Ulrich
givenname: Lee
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: lulrich
mail: lulrich@example.com
telephonenumber: +1 408 555 8652
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 0985
userpassword: attribution
dn: uid=mlangdon, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Marcus Langdon
sn: Langdon
givenname: Marcus
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: mlangdon
mail: mlangdon@example.com
telephonenumber: +1 408 555 6249
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 4471
userpassword: threat
dn: uid=striplet, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Stephen Triplett
sn: Triplett
givenname: Stephen
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: striplet
mail: striplet@example.com
telephonenumber: +1 408 555 4519
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 3083
userpassword: compactify
dn: uid=gtriplet, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Gern Triplett
sn: Triplett
givenname: Gern
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: gtriplet
mail: gtriplet@example.com
telephonenumber: +1 408 555 2582
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 4023
userpassword: placeable
dn: uid=jfalena, ou=People, o=import ldif stress test,dc=example,dc=com
cn: John Falena
sn: Falena
givenname: John
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: jfalena
mail: jfalena@example.com
telephonenumber: +1 408 555 8133
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 1917
userpassword: nightly
dn: uid=speterso, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Sue Peterson
sn: Peterson
givenname: Sue
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: speterso
mail: speterso@example.com
telephonenumber: +1 408 555 3613
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 3073
userpassword: quinine
dn: uid=ejohnson, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Emanuel Johnson
sn: Johnson
givenname: Emanuel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: ejohnson
mail: ejohnson@example.com
telephonenumber: +1 408 555 3287
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 3737
userpassword: marketwise
dn: uid=prigden, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Peter Rigden
sn: Rigden
givenname: Peter
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: prigden
mail: prigden@example.com
telephonenumber: +1 408 555 5099
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1271
userpassword: epiphyseal
dn: uid=bwalker, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Brad Walker
sn: Walker
givenname: Brad
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: bwalker
mail: bwalker@example.com
telephonenumber: +1 408 555 5476
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 3529
userpassword: interruptible
dn: uid=kjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Kurt Jensen
sn: Jensen
givenname: Kurt
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: kjensen
mail: kjensen@example.com
telephonenumber: +1 408 555 6127
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 1944
userpassword: regulatory
dn: uid=mlott, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Mike Lott
sn: Lott
givenname: Mike
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: mlott
mail: mlott@example.com
telephonenumber: +1 408 555 2234
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 0498
userpassword: cognac
dn: uid=cwallace, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Cecil Wallace
sn: Wallace
givenname: Cecil
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: cwallace
mail: cwallace@example.com
telephonenumber: +1 408 555 6438
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 0349
userpassword: quintus
dn: uid=tpierce, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tobias Pierce
sn: Pierce
givenname: Tobias
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: tpierce
mail: tpierce@example.com
telephonenumber: +1 408 555 1531
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 1383
userpassword: rascal
dn: uid=rbannist, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Richard Bannister
sn: Bannister
givenname: Richard
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: rbannist
mail: rbannist@example.com
telephonenumber: +1 408 555 1833
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 0983
userpassword: demonstrate
dn: uid=bplante, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Brian Plante
sn: Plante
givenname: Brian
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: bplante
mail: bplante@example.com
telephonenumber: +1 408 555 3550
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 4654
userpassword: tangerine
dn: uid=rmills, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Randy Mills
sn: Mills
givenname: Randy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: rmills
mail: rmills@example.com
telephonenumber: +1 408 555 2072
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 3823
userpassword: condescend
dn: uid=bschneid, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Benjamin Schneider
sn: Schneider
givenname: Benjamin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: bschneid
mail: bschneid@example.com
telephonenumber: +1 408 555 1012
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 4471
userpassword: biblical
dn: uid=skellehe, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Sue Kelleher
sn: Kelleher
givenname: Sue
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: skellehe
mail: skellehe@example.com
telephonenumber: +1 408 555 3480
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 1608
userpassword: sweltering
dn: uid=brentz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Bertram Rentz
sn: Rentz
givenname: Bertram
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: brentz
mail: brentz@example.com
telephonenumber: +1 408 555 5526
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 0617
userpassword: diachronic
dn: uid=dsmith, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Daniel Smith
sn: Smith
givenname: Daniel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: dsmith
mail: dsmith@example.com
telephonenumber: +1 408 555 9519
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 0368
userpassword: quantitative
dn: uid=scarte2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Stephen Carter
sn: Carter
givenname: Stephen
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: scarte2
mail: scarte2@example.com
telephonenumber: +1 408 555 6022
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 2013
userpassword: scooter
dn: uid=dthorud, ou=People, o=import ldif stress test,dc=example,dc=com
cn: David Thorud
sn: Thorud
givenname: David
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: dthorud
mail: dthorud@example.com
telephonenumber: +1 408 555 6185
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 1128
userpassword: fulcrum
dn: uid=ekohler, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Elba Kohler
sn: Kohler
givenname: Elba
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: ekohler
mail: ekohler@example.com
telephonenumber: +1 408 555 1926
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 2721
userpassword: guildhall
dn: uid=lcampbel, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Laurel Campbell
sn: Campbell
givenname: Laurel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: lcampbel
mail: lcampbel@example.com
telephonenumber: +1 408 555 2537
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 2073
userpassword: impress
dn: uid=tlabonte, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tim Labonte
sn: Labonte
givenname: Tim
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: tlabonte
mail: tlabonte@example.com
telephonenumber: +1 408 555 0058
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 1426
userpassword: express
dn: uid=slee, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Scott Lee
sn: Lee
givenname: Scott
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: slee
mail: slee@example.com
telephonenumber: +1 408 555 2335
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 1806
userpassword: revertive
dn: uid=bfree, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Bjorn Free
sn: Free
givenname: Bjorn
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: bfree
mail: bfree@example.com
telephonenumber: +1 408 555 8588
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 3307
userpassword: etiquette
dn: uid=tschneid, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Torrey Schneider
sn: Schneider
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: tschneid
mail: tschneid@example.com
telephonenumber: +1 408 555 7086
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 2292
userpassword: chaperone
dn: uid=prose, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Paula Rose
sn: Rose
givenname: Paula
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: prose
mail: prose@example.com
telephonenumber: +1 408 555 9998
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 0542
userpassword: regatta
dn: uid=jhunter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Janet Hunter
sn: Hunter
givenname: Janet
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: jhunter
mail: jhunter@example.com
telephonenumber: +1 408 555 7665
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 4856
userpassword: nanometer
dn: uid=ashelton, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Alexander Shelton
sn: Shelton
givenname: Alexander
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: ashelton
mail: ashelton@example.com
telephonenumber: +1 408 555 1081
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 1987
userpassword: appointe
dn: uid=mmcinnis, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Marcus Mcinnis
sn: Mcinnis
givenname: Marcus
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: mmcinnis
mail: mmcinnis@example.com
telephonenumber: +1 408 555 9655
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 4818
userpassword: calcify
dn: uid=falbers, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Frank Albers
sn: Albers
givenname: Frank
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: falbers
mail: falbers@example.com
telephonenumber: +1 408 555 3094
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 1439
userpassword: degradation
dn: uid=mschneid, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Martin Schneider
sn: Schneider
givenname: Martin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: mschneid
mail: mschneid@example.com
telephonenumber: +1 408 555 5017
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 3153
userpassword: motorcycle
dn: uid=pcruse, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Patricia Cruse
sn: Cruse
givenname: Patricia
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: pcruse
mail: pcruse@example.com
telephonenumber: +1 408 555 8641
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 3967
userpassword: pauper
dn: uid=tkelly, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Timothy Kelly
sn: Kelly
givenname: Timothy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
l: Santa Clara
uid: tkelly
mail: tkelly@example.com
telephonenumber: +1 408 555 4295
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 3107
userpassword: risible
dn: uid=ahel, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Andrew Hel
sn: Hel
givenname: Andrew
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: ahel
mail: ahel@example.com
telephonenumber: +1 408 555 2666
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 0572
userpassword: sarsaparilla
dn: uid=jburrell, ou=People, o=import ldif stress test,dc=example,dc=com
cn: James Burrell
sn: Burrell
givenname: James
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: jburrell
mail: jburrell@example.com
telephonenumber: +1 408 555 0751
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 4926
userpassword: degrease
dn: uid=smason, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Sue Mason
sn: Mason
givenname: Sue
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: smason
mail: smason@example.com
telephonenumber: +1 408 555 9780
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4971
userpassword: sensible
dn: uid=ptyler, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Pete Tyler
sn: Tyler
givenname: Pete
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: ptyler
mail: ptyler@example.com
telephonenumber: +1 408 555 3335
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0327
userpassword: vinegar
dn: uid=calexand, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Chris Alexander
sn: Alexander
givenname: Chris
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Sunnyvale
uid: calexand
mail: calexand@example.com
telephonenumber: +1 408 555 9438
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 2884
userpassword: dauphin
dn: uid=jcruse, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jim Cruse
sn: Cruse
givenname: Jim
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: jcruse
mail: jcruse@example.com
telephonenumber: +1 408 555 9482
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 0083
userpassword: bridgework
dn: uid=kcarter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Karen Carter
sn: Carter
givenname: Karen
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: kcarter
mail: kcarter@example.com
telephonenumber: +1 408 555 4675
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 2320
userpassword: radiosonde
dn: uid=rfish, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Randy Fish
sn: Fish
givenname: Randy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: rfish
mail: rfish@example.com
telephonenumber: +1 408 555 9865
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 2317
userpassword: mailbox
dn: uid=phunt, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Philip Hunt
sn: Hunt
givenname: Philip
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: phunt
mail: phunt@example.com
telephonenumber: +1 408 555 1242
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 1183
userpassword: wastewater
dn: uid=rschneid, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Rachel Schneider
sn: Schneider
givenname: Rachel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: rschneid
mail: rschneid@example.com
telephonenumber: +1 408 555 9908
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 4183
userpassword: decorous
dn: uid=bjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barbara Jensen
cn: Babs Jensen
sn: Jensen
givenname: Barbara
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: bjensen
mail: bjensen@example.com
telephonenumber: +1 408 555 1862
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 0209
userpassword: hifalutin
dn: uid=jlange, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jim Lange
sn: Lange
givenname: Jim
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: jlange
mail: jlange@example.com
telephonenumber: +1 408 555 0488
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 3798
userpassword: chastity
dn: uid=rulrich, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Randy Ulrich
sn: Ulrich
givenname: Randy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: rulrich
mail: rulrich@example.com
telephonenumber: +1 408 555 5311
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 1282
userpassword: twinkle
dn: uid=rfrancis, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Richard Francis
sn: Francis
givenname: Richard
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: rfrancis
mail: rfrancis@example.com
telephonenumber: +1 408 555 8157
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 3482
userpassword: hacienda
dn: uid=mwhite, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Morgan White
sn: White
givenname: Morgan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: mwhite
mail: mwhite@example.com
telephonenumber: +1 408 555 9620
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 3088
userpassword: staple
dn: uid=gjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Gern Jensen
sn: Jensen
givenname: Gern
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: gjensen
mail: gjensen@example.com
telephonenumber: +1 408 555 3299
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4609
userpassword: primitive
dn: uid=awhite, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Alan White
sn: White
givenname: Alan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: awhite
mail: awhite@example.com
telephonenumber: +1 408 555 3232
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 0142
userpassword: placeholder
dn: uid=bmaddox, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barbara Maddox
sn: Maddox
givenname: Barbara
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: bmaddox
mail: bmaddox@example.com
telephonenumber: +1 408 555 7783
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 2207
userpassword: feedback
dn: uid=mtalbot, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Martin Talbot
sn: Talbot
givenname: Martin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: mtalbot
mail: mtalbot@example.com
telephonenumber: +1 408 555 9228
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1415
userpassword: currant
dn: uid=jbrown, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Judy Brown
sn: Brown
givenname: Judy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: jbrown
mail: jbrown@example.com
telephonenumber: +1 408 555 6885
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 4224
userpassword: militiamen
dn: uid=jjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jody Jensen
sn: Jensen
givenname: Jody
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: jjensen
mail: jjensen@example.com
telephonenumber: +1 408 555 7587
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 4882
userpassword: borderland
dn: uid=mcarter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Mike Carter
sn: Carter
givenname: Mike
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: mcarter
mail: mcarter@example.com
telephonenumber: +1 408 555 1846
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 3819
userpassword: mainland
dn: uid=dakers, ou=People, o=import ldif stress test,dc=example,dc=com
cn: David Akers
sn: Akers
givenname: David
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: dakers
mail: dakers@example.com
telephonenumber: +1 408 555 4812
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 4944
userpassword: integument
dn: uid=sfarmer, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Scott Farmer
sn: Farmer
givenname: Scott
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: sfarmer
mail: sfarmer@example.com
telephonenumber: +1 408 555 4228
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 0019
userpassword: triumphal
dn: uid=dward, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Daniel Ward
sn: Ward
givenname: Daniel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: dward
mail: dward@example.com
telephonenumber: +1 408 555 5322
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 3927
userpassword: armload
dn: uid=tward, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tobias Ward
sn: Ward
givenname: Tobias
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: tward
mail: tward@example.com
telephonenumber: +1 408 555 7202
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 2238
userpassword: cedilla
dn: uid=pshelton, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Patricia Shelton
sn: Shelton
givenname: Patricia
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Cupertino
uid: pshelton
mail: pshelton@example.com
telephonenumber: +1 408 555 6442
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 2918
userpassword: nosedive
dn: uid=jrentz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jody Rentz
sn: Rentz
givenname: Jody
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: jrentz
mail: jrentz@example.com
telephonenumber: +1 408 555 5829
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 3025
userpassword: meander
dn: uid=plorig, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Peter Lorig
sn: Lorig
givenname: Peter
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: plorig
mail: plorig@example.com
telephonenumber: +1 408 555 0624
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 1276
userpassword: calorimeter
dn: uid=ajensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Allison Jensen
sn: Jensen
givenname: Allison
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: ajensen
mail: ajensen@example.com
telephonenumber: +1 408 555 7892
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 0784
userpassword: coltsfoot
dn: uid=kschmith, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Kelly Schmith
sn: Schmith
givenname: Kelly
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: kschmith
mail: kschmith@example.com
telephonenumber: +1 408 555 9749
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 2221
userpassword: purvey
dn: uid=pworrell, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Pete Worrell
sn: Worrell
givenname: Pete
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: pworrell
mail: pworrell@example.com
telephonenumber: +1 408 555 1637
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 2449
userpassword: solicitous
dn: uid=mreuter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Matthew Reuter
sn: Reuter
givenname: Matthew
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: mreuter
mail: mreuter@example.com
telephonenumber: +1 408 555 6879
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 1356
userpassword: oblivious
dn: uid=gtyler, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Gern Tyler
sn: Tyler
givenname: Gern
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: gtyler
mail: gtyler@example.com
telephonenumber: +1 408 555 1020
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0312
userpassword: typology
dn: uid=tschmith, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tobias Schmith
sn: Schmith
givenname: Tobias
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: tschmith
mail: tschmith@example.com
telephonenumber: +1 408 555 9626
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 4607
userpassword: compost
dn: uid=bjense2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Bjorn Jensen
sn: Jensen
givenname: Bjorn
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: bjense2
mail: bjense2@example.com
telephonenumber: +1 408 555 5655
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 4294
userpassword: mortgage
dn: uid=dswain, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Dietrich Swain
sn: Swain
givenname: Dietrich
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Sunnyvale
uid: dswain
mail: dswain@example.com
telephonenumber: +1 408 555 9222
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 4396
userpassword: freedom
dn: uid=ahall, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Andy Hall
sn: Hall
givenname: Andy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: ahall
mail: ahall@example.com
telephonenumber: +1 408 555 6169
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 3050
userpassword: slater
dn: uid=jmuffly, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jeff Muffly
sn: Muffly
givenname: Jeff
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: jmuffly
mail: jmuffly@example.com
telephonenumber: +1 408 555 5287
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 0997
userpassword: dictate
dn: uid=tjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Ted Jensen
sn: Jensen
givenname: Ted
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: tjensen
mail: tjensen@example.com
telephonenumber: +1 408 555 8622
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 4717
userpassword: ecosystem
dn: uid=ahunter, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Allison Hunter
sn: Hunter
givenname: Allison
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Sunnyvale
uid: ahunter
mail: ahunter@example.com
telephonenumber: +1 408 555 7713
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1213
userpassword: egregious
dn: uid=jgoldste, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jon Goldstein
sn: Goldstein
givenname: Jon
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: jgoldste
mail: jgoldste@example.com
telephonenumber: +1 408 555 5769
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 1454
userpassword: yellow
dn: uid=aworrell, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Alan Worrell
sn: Worrell
givenname: Alan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: aworrell
mail: aworrell@example.com
telephonenumber: +1 408 555 1591
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 3966
userpassword: gargoyle
dn: uid=wlutz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Wendy Lutz
sn: Lutz
givenname: Wendy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: wlutz
mail: wlutz@example.com
telephonenumber: +1 408 555 3358
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 4912
userpassword: bassinet
dn: uid=jlutz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Janet Lutz
sn: Lutz
givenname: Janet
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: jlutz
mail: jlutz@example.com
telephonenumber: +1 408 555 4902
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 2544
userpassword: autumn
dn: uid=dlangdon, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Dan Langdon
sn: Langdon
givenname: Dan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: dlangdon
mail: dlangdon@example.com
telephonenumber: +1 408 555 7044
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 3263
userpassword: botulin
dn: uid=aknutson, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Ashley Knutson
sn: Knutson
givenname: Ashley
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: aknutson
mail: aknutson@example.com
telephonenumber: +1 408 555 2169
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 4736
userpassword: maltose
dn: uid=kmcinnis, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Kelly Mcinnis
sn: Mcinnis
givenname: Kelly
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: kmcinnis
mail: kmcinnis@example.com
telephonenumber: +1 408 555 8596
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4312
userpassword: stargaze
dn: uid=tcouzens, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Trent Couzens
sn: Couzens
givenname: Trent
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: tcouzens
mail: tcouzens@example.com
telephonenumber: +1 408 555 8401
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 3994
userpassword: tambourine
dn: uid=lstockto, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Lee Stockton
sn: Stockton
givenname: Lee
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: lstockto
mail: lstockto@example.com
telephonenumber: +1 408 555 0518
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0169
userpassword: brooklyn
dn: uid=jbourke, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jon Bourke
sn: Bourke
givenname: Jon
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Cupertino
uid: jbourke
mail: jbourke@example.com
telephonenumber: +1 408 555 8541
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0034
userpassword: brainwash
dn: uid=dlanoway, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Dan Lanoway
sn: Lanoway
givenname: Dan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: dlanoway
mail: dlanoway@example.com
telephonenumber: +1 408 555 2017
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 3540
userpassword: manhattan
dn: uid=kcope, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Karl Cope
sn: Cope
givenname: Karl
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: kcope
mail: kcope@example.com
telephonenumber: +1 408 555 2709
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 3040
userpassword: forfeiture
dn: uid=abarnes, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Anne-Louise Barnes
sn: Barnes
givenname: Anne-Louise
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: abarnes
mail: abarnes@example.com
telephonenumber: +1 408 555 9445
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 2290
userpassword: chevron
dn: uid=rjensen, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Richard Jensen
sn: Jensen
givenname: Richard
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: rjensen
mail: rjensen@example.com
telephonenumber: +1 408 555 5957
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 2631
userpassword: disciplinarian
dn: uid=phun2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Pete Hunt
sn: Hunt
givenname: Pete
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: phun2
mail: phun2@example.com
telephonenumber: +1 408 555 0342
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 0087
userpassword: absorb
dn: uid=mvaughan, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Matthew Vaughan
sn: Vaughan
givenname: Matthew
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: mvaughan
mail: mvaughan@example.com
telephonenumber: +1 408 555 4692
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4508
userpassword: submitted
dn: uid=jlut2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: James Lutz
sn: Lutz
givenname: James
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: jlut2
mail: jlut2@example.com
telephonenumber: +1 408 555 9689
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 3541
userpassword: shrank
dn: uid=mjablons, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Morgan Jablonski
sn: Jablonski
givenname: Morgan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: mjablons
mail: mjablons@example.com
telephonenumber: +1 408 555 0813
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 3160
userpassword: minimal
dn: uid=pchassin, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Peter Chassin
sn: Chassin
givenname: Peter
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: pchassin
mail: pchassin@example.com
telephonenumber: +1 408 555 2816
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 4524
userpassword: barbital
dn: uid=dcope, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Dan Cope
sn: Cope
givenname: Dan
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Sunnyvale
uid: dcope
mail: dcope@example.com
telephonenumber: +1 408 555 9813
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 1737
userpassword: snifter
dn: uid=jrent2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Judy Rentz
sn: Rentz
givenname: Judy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Santa Clara
uid: jrent2
mail: jrent2@example.com
telephonenumber: +1 408 555 2523
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 4405
userpassword: tachistoscope
dn: uid=tcruse, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tobias Cruse
sn: Cruse
givenname: Tobias
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: tcruse
mail: tcruse@example.com
telephonenumber: +1 408 555 5980
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 4191
userpassword: flinty
dn: uid=eward, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Eric Ward
sn: Ward
givenname: Eric
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: eward
mail: eward@example.com
telephonenumber: +1 408 555 2320
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 4874
userpassword: episcopal
dn: uid=ttully, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Torrey Tully
sn: Tully
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: ttully
mail: ttully@example.com
telephonenumber: +1 408 555 2274
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 3924
userpassword: schooner
dn: uid=charvey, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Cecil Harvey
sn: Harvey
givenname: Cecil
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: charvey
mail: charvey@example.com
telephonenumber: +1 408 555 1815
facsimiletelephonenumber: +1 408 555 3825
roomnumber: 4583
userpassword: journalese
dn: uid=rfisher, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Randy Fisher
sn: Fisher
givenname: Randy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: rfisher
mail: rfisher@example.com
telephonenumber: +1 408 555 1506
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 1579
userpassword: pomegranate
dn: uid=alangdon, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Andrew Langdon
sn: Langdon
givenname: Andrew
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: alangdon
mail: alangdon@example.com
telephonenumber: +1 408 555 8289
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 2254
userpassword: muzzle
dn: uid=drose, ou=People, o=import ldif stress test,dc=example,dc=com
cn: David Rose
sn: Rose
givenname: David
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: drose
mail: drose@example.com
telephonenumber: +1 408 555 3963
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4012
userpassword: gubernatorial
dn: uid=polfield, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Peter Olfield
sn: Olfield
givenname: Peter
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: polfield
mail: polfield@example.com
telephonenumber: +1 408 555 8231
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1376
userpassword: monologue
dn: uid=awalker, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Andy Walker
sn: Walker
givenname: Andy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: awalker
mail: awalker@example.com
telephonenumber: +1 408 555 9199
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 0061
userpassword: detonable
dn: uid=lrentz, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Lex Rentz
sn: Rentz
givenname: Lex
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: lrentz
mail: lrentz@example.com
telephonenumber: +1 408 555 2019
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 2203
userpassword: calcium
dn: uid=jvaughan, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jeff Vaughan
sn: Vaughan
givenname: Jeff
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: jvaughan
mail: jvaughan@example.com
telephonenumber: +1 408 555 4543
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 1734
userpassword: appoint
dn: uid=bfrancis, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barbara Francis
sn: Francis
givenname: Barbara
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: bfrancis
mail: bfrancis@example.com
telephonenumber: +1 408 555 9111
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 3743
userpassword: holystone
dn: uid=ewalker, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Eric Walker
sn: Walker
givenname: Eric
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Payroll
ou: People
l: Cupertino
uid: ewalker
mail: ewalker@example.com
telephonenumber: +1 408 555 6387
facsimiletelephonenumber: +1 408 555 8721
roomnumber: 2295
userpassword: beguile
dn: uid=tjames, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Tobias James
sn: James
givenname: Tobias
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: tjames
mail: tjames@example.com
telephonenumber: +1 408 555 2458
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 0730
userpassword: turtle
dn: uid=brigden, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Bjorn Rigden
sn: Rigden
givenname: Bjorn
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: brigden
mail: brigden@example.com
telephonenumber: +1 408 555 5263
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 1643
userpassword: purple
dn: uid=ecruse, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Eric Cruse
sn: Cruse
givenname: Eric
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: ecruse
mail: ecruse@example.com
telephonenumber: +1 408 555 0648
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 4233
userpassword: platelet
dn: uid=rjense2, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Randy Jensen
sn: Jensen
givenname: Randy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Sunnyvale
uid: rjense2
mail: rjense2@example.com
telephonenumber: +1 408 555 9045
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 1984
userpassword: transpose
dn: uid=rhunt, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Richard Hunt
sn: Hunt
givenname: Richard
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: rhunt
mail: rhunt@example.com
telephonenumber: +1 408 555 0139
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 0718
userpassword: becloud
dn: uid=bparker, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Barry Parker
sn: Parker
givenname: Barry
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Sunnyvale
uid: bparker
mail: bparker@example.com
telephonenumber: +1 408 555 4647
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 1148
userpassword: lenticular
dn: uid=ealexand, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Erin Alexander
sn: Alexander
givenname: Erin
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: ealexand
mail: ealexand@example.com
telephonenumber: +1 408 555 5563
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 2434
userpassword: galactose
dn: uid=mtyler, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Matthew Tyler
sn: Tyler
givenname: Matthew
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Cupertino
uid: mtyler
mail: mtyler@example.com
telephonenumber: +1 408 555 7907
facsimiletelephonenumber: +1 408 555 4661
roomnumber: 2701
userpassword: instantiate
dn: uid=elott, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Emanuel Lott
sn: Lott
givenname: Emanuel
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Santa Clara
uid: elott
mail: elott@example.com
telephonenumber: +1 408 555 0932
facsimiletelephonenumber: +1 408 555 9751
roomnumber: 3906
userpassword: holdout
dn: uid=cnewport, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Christoph Newport
sn: Newport
givenname: Christoph
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Sunnyvale
uid: cnewport
mail: cnewport@example.com
telephonenumber: +1 408 555 0066
facsimiletelephonenumber: +1 408 555 9332
roomnumber: 0056
userpassword: expertise
dn: uid=jvedder, ou=People, o=import ldif stress test,dc=example,dc=com
cn: Jeff Vedder
sn: Vedder
givenname: Jeff
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: jvedder
mail: jvedder@example.com
telephonenumber: +1 408 555 4668
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 3445
userpassword: befitting
dn: cn=Accounting Managers,ou=groups,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: groupOfUniqueNames
cn: Accounting Managers
ou: groups
uniquemember: uid=scarter, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=tmorris, ou=People, o=import ldif stress test,dc=example,dc=com
description: People who can manage accounting entries
dn: cn=HR Managers,ou=groups,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: groupOfUniqueNames
cn: HR Managers
ou: groups
uniquemember: uid=kvaughan, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=cschmith, ou=People, o=import ldif stress test,dc=example,dc=com
description: People who can manage HR entries
dn: cn=QA Managers,ou=groups,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: groupOfUniqueNames
cn: QA Managers
ou: groups
uniquemember: uid=abergin, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=jwalker, ou=People, o=import ldif stress test,dc=example,dc=com
description: People who can manage QA entries
dn: cn=PD Managers,ou=groups,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: groupOfUniqueNames
cn: PD Managers
ou: groups
uniquemember: uid=kwinters, ou=People, o=import ldif stress test,dc=example,dc=com
uniquemember: uid=trigden, ou=People, o=import ldif stress test,dc=example,dc=com
description: People who can manage engineer entries
dn: ou=Netscape Servers,o=import ldif stress test,dc=example,dc=com
objectclass: top
objectclass: organizationalUnit
ou: Netscape Servers
description: Standard branch for SuiteSpot Server registration
opends/tests/stress-tests/shared/data/quickstart/quickstart.ldif
New file
@@ -0,0 +1,220 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2006-2007 Sun Microsystems, Inc.
#
dn: dc=com
dc: com
objectclass: top
objectclass: domain
dn: dc=example,dc=com
dc: example
objectclass: top
objectclass: domain
dn: ou=People,dc=example,dc=com
ou: people
objectclass: top
objectclass: organizationalunit
dn: uid=tmorris, ou=People,dc=example,dc=com
cn: Ted Morris
sn: Morris
givenname: Ted
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Santa Clara
uid: tmorris
mail: tmorris@example.com
telephonenumber: +1 408 555 9187
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 4117
userpassword: irrefutable
dn: uid=kvaughan, ou=People,dc=example,dc=com
cn: Kirsten Vaughan
sn: Vaughan
givenname: Kirsten
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Sunnyvale
uid: kvaughan
mail: kvaughan@example.com
telephonenumber: +1 408 555 5625
facsimiletelephonenumber: +1 408 555 3372
roomnumber: 2871
userpassword: bribery
dn: uid=abergin, ou=People,dc=example,dc=com
cn: Andy Bergin
sn: Bergin
givenname: Andy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Cupertino
uid: abergin
mail: abergin@example.com
telephonenumber: +1 408 555 8585
facsimiletelephonenumber: +1 408 555 7472
roomnumber: 3472
userpassword: inflict
dn: uid=dmiller, ou=People,dc=example,dc=com
cn: David Miller
sn: Miller
givenname: David
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: dmiller
mail: dmiller@example.com
telephonenumber: +1 408 555 9423
facsimiletelephonenumber: +1 408 555 0111
roomnumber: 4135
userpassword: gosling
dn: uid=gfarmer, ou=People,dc=example,dc=com
cn: Gern Farmer
sn: Farmer
givenname: Gern
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Cupertino
uid: gfarmer
mail: gfarmer@example.com
telephonenumber: +1 408 555 6201
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1269
userpassword: ruling
dn: uid=kwinters, ou=People,dc=example,dc=com
cn: Kelly Winters
sn: Winters
givenname: Kelly
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: kwinters
mail: kwinters@example.com
telephonenumber: +1 408 555 9069
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 4178
userpassword: forsook
dn: uid=trigden, ou=People,dc=example,dc=com
cn: Torrey Rigden
sn: Rigden
givenname: Torrey
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Development
ou: People
l: Santa Clara
uid: trigden
mail: trigden@example.com
telephonenumber: +1 408 555 9280
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 3584
userpassword: sensitive
dn: uid=cschmith, ou=People,dc=example,dc=com
cn: Chris Schmith
sn: Schmith
givenname: Chris
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Human Resources
ou: People
l: Santa Clara
uid: cschmith
mail: cschmith@example.com
telephonenumber: +1 408 555 8011
facsimiletelephonenumber: +1 408 555 4774
roomnumber: 0416
userpassword: hypotenuse
dn: uid=jwallace, ou=People,dc=example,dc=com
cn: Judy Wallace
sn: Wallace
givenname: Judy
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Accounting
ou: People
l: Sunnyvale
uid: jwallace
mail: jwallace@example.com
telephonenumber: +1 408 555 0319
facsimiletelephonenumber: +1 408 555 8473
roomnumber: 1033
userpassword: linear
dn: uid=jwalker, ou=People,dc=example,dc=com
cn: John Walker
sn: Walker
givenname: John
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: Product Testing
ou: People
l: Cupertino
uid: jwalker
mail: jwalker@example.com
telephonenumber: +1 408 555 1476
facsimiletelephonenumber: +1 408 555 1992
roomnumber: 3915
userpassword: dogleg
opends/tests/stress-tests/shared/stax.dtd
New file
@@ -0,0 +1,1148 @@
<!--
   STAf eXecution (STAX) Document Type Definition (DTD)
   Generated Date: 20070622-12:02:15
   This DTD module is identified by the SYSTEM identifier:
     SYSTEM 'stax.dtd'
-->
<!-- Parameter entities referenced in Element declarations -->
<!ENTITY % stax-elems 'function | script | signalhandler'>
<!ENTITY % task       'call | terminate | raise |
                       block | iterate | throw |
                       break | paralleliterate | timer |
                       if | loop | import |
                       tcstatus | rethrow | parallel |
                       hold | return | job |
                       call-with-list | script | log |
                       stafcmd | nop | testcase |
                       message | process | signalhandler |
                       call-with-map | sequence | continue |
                       release | try'>
<!--================= STAX Job Definition ========================== -->
<!--
     The root element STAX contains all other elements.  It consists
     of an optional defaultcall element and any number of function,
     script, and/or signalhandler elements.
-->
<!ELEMENT stax         ((%stax-elems;)*, defaultcall?, (%stax-elems;)*)>
<!--================= The Default Call Function Element ============ -->
<!--
     The defaultcall element defines the function to call by default
     to start the job.  This can be overridden by the 'FUNCTION'
     parameter when submitting the job to be executed.
     The function attribute's value is a literal.
-->
<!ELEMENT defaultcall  (#PCDATA)>
<!ATTLIST defaultcall
          function     IDREF    #REQUIRED
>
<!--================= The Call Element ============================= -->
<!--
     Perform a function with the referenced name.
     The function attribute value is evaluated via Python.
     Arguments can be specified as data to the call element.
     Arguments are evaluated via Python.
-->
<!ELEMENT call       (#PCDATA)>
<!ATTLIST call
          function   CDATA    #REQUIRED
>
<!--================= The Terminate Element ======================== -->
<!--
     The terminate element specifies to terminate a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the terminate element is ignored.
-->
<!ELEMENT terminate  EMPTY>
<!ATTLIST terminate
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
<!--================= The Raise Element ============================ -->
<!--
     A raise signal element raises a specified signal.
     Signals can also be raised by the STAX execution engine.
     The signal attribute value is evaluated via Python.
-->
<!ELEMENT raise      EMPTY>
<!ATTLIST raise
          signal     CDATA        #REQUIRED
>
<!--================= The Block Element ============================ -->
<!--
     Defines a task block that can be held, released, or terminated.
     Used in conjunction with the hold/terminate/release elements to
     define a task block that can be held, terminated, or released.
     The name attribute value is evaluated via Python.
-->
<!ELEMENT block      (%task;)>
<!ATTLIST block
          name       CDATA    #REQUIRED
>
<!--================= The Function Element ========================= -->
<!--
     The function element defines a named task which can be called.
     The name and scope attribute values are literals.
     If desired, the function can be described using a function-prolog
     element (or the deprecated function-description element) and/or a
     function-epilog element.  Also, if desired, the function element
     can define the arguments that can be passed to the function.
-->
<!ELEMENT function    ((function-prolog | function-description)?,
                       (function-epilog)?,
                       (function-no-args | function-single-arg |
                        function-list-args | function-map-args)?,
                       (%task;))>
<!ATTLIST function
          name         ID       #REQUIRED
          requires     IDREFS   #IMPLIED
          scope        (local | global) "global"
>
<!ELEMENT function-prolog       (#PCDATA)>
<!ELEMENT function-epilog       (#PCDATA)>
<!ELEMENT function-description  (#PCDATA)>
<!ELEMENT function-no-args      EMPTY>
<!ELEMENT function-single-arg   (function-required-arg |
                                 function-optional-arg |
                                 function-arg-def)>
<!ELEMENT function-list-args    ((((function-required-arg+,
                                    function-optional-arg*) |
                                  (function-required-arg*,
                                    function-optional-arg+)),
                                 (function-other-args)?) |
                                 function-arg-def+)>
<!ELEMENT function-map-args     (((function-required-arg |
                                   function-optional-arg)+,
                                  (function-other-args+)?) |
                                  function-arg-def+)>
<!ELEMENT function-required-arg (#PCDATA)>
<!ATTLIST function-required-arg
          name         CDATA    #REQUIRED
>
<!ELEMENT function-optional-arg (#PCDATA)>
<!ATTLIST function-optional-arg
          name         CDATA    #REQUIRED
          default      CDATA    "None"
>
<!ELEMENT function-other-args   (#PCDATA)>
<!ATTLIST function-other-args
          name         CDATA    #REQUIRED
>
<!ELEMENT function-arg-def      (function-arg-description?,
                                 function-arg-private?,
                                 function-arg-property*)>
<!ATTLIST function-arg-def
          name         CDATA    #REQUIRED
          type         (required | optional | other) "required"
          default      CDATA    "None"
>
<!ELEMENT function-arg-description  (#PCDATA)>
<!ELEMENT function-arg-private   EMPTY>
<!ELEMENT function-arg-property  (function-arg-property-description?,
                                 function-arg-property-data*)>
<!ATTLIST function-arg-property
          name         CDATA    #REQUIRED
          value        CDATA    #IMPLIED
>
<!ELEMENT function-arg-property-description  (#PCDATA)>
<!ELEMENT function-arg-property-data (function-arg-property-data)*>
<!ATTLIST function-arg-property-data
          type         CDATA    #REQUIRED
          value        CDATA    #IMPLIED
>
<!--================= The Iterate Element ========================= -->
<!--
     The iterate element iterates through a list of items, performing
     its contained task while substituting each item in the list.
     The iterated tasks are performed in sequence.
-->
<!ELEMENT iterate  (%task;)>
<!-- var      is the name of the variable which will contain the
              current item in the list or tuple being iterated.
              It is a literal.
     in       is the list or tuple to be iterated.  It is evaluated
              via Python and must evaluate to be a list or tuple.
     indexvar is the name of a variable which will contain the index of
              the current item in the list or tuple being iterated.
              It is a literal.  The value for the first index is 0.
-->
<!ATTLIST iterate
          var        CDATA    #REQUIRED
          in         CDATA    #REQUIRED
          indexvar   CDATA    #IMPLIED
>
<!--================= The Throw Element ============================ -->
<!--
     The throw element specifies an exception to throw.
     The exception attribute value and any additional information
     is evaluated via Python.
-->
<!ELEMENT throw      (#PCDATA)>
<!ATTLIST throw
          exception  CDATA        #REQUIRED
>
<!--================= Break Element ================================ -->
<!--
     The break element can be used to break out of a loop or iterate
     element.
-->
<!ELEMENT break      EMPTY>
<!--================= The Parallel Iterate Element ================ -->
<!--
     The parallel iterate element iterates through a list of items,
     performing its contained task while substituting each item in
     the list.  The iterated tasks are performed in parallel.
-->
<!ELEMENT paralleliterate  (%task;)>
<!-- var      is the name of a variable which will contain the current
              item in the list or tuple being iterated.
              It is a literal.
     in       is the list or tuple to be iterated.  It is evaluated
              via Python and must evaluate to be a list or tuple.
     indexvar is the name of a variable which will contain the index of
              the current item in the list or tuple being iterated.
              It is a literal.  The value of the first index is 0.
-->
<!ATTLIST paralleliterate
          var        CDATA    #REQUIRED
          in         CDATA    #REQUIRED
          indexvar   CDATA    #IMPLIED
>
<!--================= The Timer Element ============================ -->
<!--
     The timer element runs a task for a specified duration.
     If the task is still running at the end of the specified duration,
     then the RC variable is set to 1, else if the task ended before
     the specified duration, the RC variable is set to 0, else if the
     timer could not start due to an invalid duration, the RC variable
     is set to -1.
-->
<!ELEMENT timer     (%task;)>
<!-- duration is the maximum length of time to run the task.
       Time can be expressed in milliseconds, seconds, minutes,
       hours, days, weeks, or years.  It is evaluated via Python.
         Examples:  duration='50'    (50 milliseconds)
                    duration='90s'   (90 seconds)
                    duration='5m'    ( 5 minutes)
                    duration='36h'   (36 hours)
                    duration='3d'    ( 3 days)
                    duration='1w'    ( 1 week)
                    duration='1y'    ( 1 year)
-->
<!ATTLIST timer
          duration   CDATA        #REQUIRED
>
<!--================= The Conditional Element (if-then-else) ======= -->
<!--
     Allows you to write an if or a case construct with zero or more
     elseifs and one or no else statements.
     The expr attribute value is evaluated via Python and must evaluate
     to a boolean value.
-->
<!ELEMENT if         ((%task;), elseif*, else?)>
<!ATTLIST if
          expr       CDATA   #REQUIRED
>
<!ELEMENT elseif     (%task;)>
<!ATTLIST elseif
          expr       CDATA   #REQUIRED
>
<!ELEMENT else       (%task;)>
<!--================= The Loop Element ============================= -->
<!--
     The loop element performs a task a specified number of times,
     allowing specification of an upper and lower bound with an
     increment value and where the index counter is available to
     sub-tasks.  Also, while and/or until expressions can be
     specified.
-->
<!ELEMENT loop       (%task;)>
<!-- var      is the name of a variable which will contain the loop
              index variable.  It is a literal.
     from     is the starting value of the loop index variable.
              It must evaluate to an integer value via Python.
     to       is the maximum value of the loop index variable
              It must evaluate to an integer value via Python.
     by       is the increment value for the loop index variable
              It must evaluate to an integer value via Python.
     while    is an expression that must evaluate to a boolean value
              and is performed at the top of each loop.  If it
              evaluates to false, it breaks out of the loop.
     until    is an expression that must evaluate to a boolean value
              and is performed at the bottom of each loop.  If it
              evaluates to false, it breaks out of the loop.
-->
<!ATTLIST loop
          var        CDATA    #IMPLIED
          from       CDATA    '1'
          to         CDATA    #IMPLIED
          by         CDATA    '1'
          while      CDATA    #IMPLIED
          until      CDATA    #IMPLIED
>
<!--================= The Import Element ========================== -->
<!--
     Allows importing of functions from another STAX XML job file.
-->
<!ELEMENT import        (import-include?, import-exclude?)?>
<!ATTLIST import
          machine     CDATA       #REQUIRED
          file        CDATA       #REQUIRED
          mode        CDATA         "'error'"
>
<!ELEMENT import-include          (#PCDATA)>
<!ELEMENT import-exclude          (#PCDATA)>
<!--================= The Testcase Status Element ================== -->
<!--
     Marks status result ('pass' or 'fail' or 'info') for a testcase
     and allows additional information to be specified.  The status
     result and the additional info is evaluated via Python.
-->
<!ELEMENT tcstatus   (#PCDATA)>
<!ATTLIST tcstatus
          result     CDATA  #REQUIRED
>
<!--================= The Rethrow Element ========================= -->
<!--
     The rethrow element specifies to rethrow the current exception.
-->
<!ELEMENT rethrow      EMPTY>
<!--================= The Parallel Element ========================= -->
<!--
     The parallel element performs one or more tasks in parallel.
-->
<!ELEMENT parallel   (%task;)+>
<!--================= The Hold Element ============================= -->
<!--
     The hold element specifies to hold a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the hold element is ignored.
-->
<!ELEMENT hold       EMPTY>
<!ATTLIST hold
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
<!--================= The Return Element =========================== -->
<!--
     Specifies a value to return from a function.
-->
<!ELEMENT return     (#PCDATA)>
<!--================== The STAX Job Element ===================== -->
<!--
     Specifies a STAX sub-job to be executed.  This element is equivalent
     to a STAX EXECUTE request.
     The name attribute specifies the name of the job. The job name
     defaults to the value of the function name called to start the job.
     Its name and all of its element values are evaluated via Python.
     The job element must contain a location element and either a
     file or data element.  This attribute is equivalent to the
     JOBNAME option for a STAX EXECUTE command.
     The clearlogs attribute specifies to delete the STAX Job and Job
     User logs before the job is executed to ensure that only one job's
     contents are in the log.  This attribute is equivalent to the
     CLEARLOGS option for a STAX EXECUTE command.  The default is the
     same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
     The monitor attribute specifies whether to automatically monitor the
     subjob.  Note that 'Automatically monitor recommended sub-jobs' must
     be selected in the STAX Job Monitor properties in order for it to be
     used.  The default value for the monitor attribute is 0, a false
     value.
     The logtcelapsedtime attribute specifies to log the elapsed time
     for a testcase in the summary record in the STAX Job log and on a
     LIST TESTCASES request.  This attribute is equivalent to the
     LOGTCELAPSEDTIME option for a STAX EXECUTE command.  The default is
     the same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
     The logtcnumstarts attribute specifies to log the number of starts
     for a testcase in the summary record in the STAX Job log and on a
     LIST TESTCASES request.  This attribute is equivalent to the
     LOGNUMSTARTS option for a STAX EXECUTE command.  The default is
     the same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
     The logtcstartstop attribute specifies to log start/stop records
     for testcases in the STAX Job log.  This attribute is equivalent to
     the LOGTCSTARTSTOP option for a STAX EXECUTE command.  The default
     is the same option that was specified for the parent job.  Valid
     values include 'parent', 'default', 'enabled', and 'disabled'.
     The job element must contain either a job-file or job-data element.
     The job element has the following optional elements:
       job-function, job-function-args, job-scriptfile(s), and job-script
     Each of these optional elements may specify an if attribute.
     The if attribute must evaluate via Python to a true or false value.
     If it does not evaluate to a true value, the element is ignored.
     The default value for the if attribute is 1, a true value.
     Note that in Python, true means any nonzero number or nonempty
     object; false means not true, such as a zero number, an empty
     object, or None. Comparisons and equality tests return 1 or 0
     (true or false).
-->
<!ELEMENT job        ((job-file | job-data),
                      job-function?, job-function-args?,
                      (job-scriptfile | job-scriptfiles)?,
                      job-script*, job-action?)>
<!ATTLIST job
          name              CDATA   #IMPLIED
          clearlogs         CDATA   "'parent'"
          monitor           CDATA   #IMPLIED
          logtcelapsedtime  CDATA   "'parent'"
          logtcnumstarts    CDATA   "'parent'"
          logtcstartstop    CDATA   "'parent'"
>
<!--
     The job-file element specifies the fully qualified name of a file
     containing the XML document for the STAX job to be executed.
     The job-file element is equivalent to the FILE option for a STAX
     EXECUTE command.
     The machine attribute specifies the name of the machine where the
     xml file is located.  If not specified, it defaults to Python
     variable STAXJobXMLMachine.  The machine attribute is equivalent
     to the MACHINE option for a STAX EXECUTE command.
  -->
<!ELEMENT job-file           (#PCDATA)>
<!ATTLIST job-file
          machine    CDATA   "STAXJobXMLMachine"
>
<!--
     The job-data element specifies a string containing the XML document
     for the job to be executed.  This element is equivalent to the
     DATA option for a STAX EXECUTE command.
     The eval attribute specifies whether the data is be evaluated by
     Python in the parent job.  For example, if the job-data information
     is dynamically generated and assigned to a Python variable, rather
     than just containing the literal XML information, then you would
     need to set the eval attribute to true (e.g. eval="1").
     The default for the eval attribute is false ("0").
  -->
<!ELEMENT job-data           (#PCDATA)>
<!ATTLIST job-data
          eval       CDATA   "0"
>
<!--
     The job-function element specifies the name of the function element
     to call to start the job, overriding the defaultcall element, if any,
     specified in the XML document. The <function name> must be the name
     of a function element specified in the XML document. This element is
     equivalent to the FUNCTION option for a STAX EXECUTE command.
-->
<!ELEMENT job-function       (#PCDATA)>
<!ATTLIST job-function
          if         CDATA   "1"
>
<!--
     The job-function-args element specifies arguments to pass to the
     function element called to start the job, overriding the arguments,
     if any, specified for the defaultcall element in the XML document.
     This element is equivalent to the ARGS option for a STAX EXECUTE
     command.
     The eval attribute specifies whether the data is to be evaluated
     by Python in the parent job.  The default for the eval attribute
     is false ("0").
-->
<!ELEMENT job-function-args  (#PCDATA)>
<!ATTLIST job-function-args
          if         CDATA   "1"
          eval       CDATA   "0"
>
<!--
     The job-script element specifies Python code to be executed.
     This element is equivalent to the SCRIPT option for a STAX
     EXECUTE command.  Multiple job-script elements may be specified.
     The eval attribute specifies whether the data is to be evaluated
     by Python in the parent job.  The default for the eval attribute
     is false ("0").
-->
<!ELEMENT job-script         (#PCDATA)>
<!ATTLIST job-script
          if         CDATA   "1"
          eval       CDATA   "0"
>
<!--
     The job-scriptfile element (equivalent to the job-scriptfiles
     element) specifies the fully qualified name of a file containing
     Python code to be executed, or a list of file names containing
     Python code to be executed. The value must evaluate via Python to
     a string or a list of strings. This element is equivalent to the
     SCRIPTFILE option for a STAX EXECUTE command.
     Specifying only one scriptfile could look like either:
       ['C:/stax/scriptfiles/scriptfile1.py']      or
       'C:/stax/scriptfiles/scriptfiel1.py'
     Specifying a list containing 3 scriptfiles could look like:
       ['C:/stax/scriptfiles/scriptfile1.py',
        'C:/stax/scriptfiles/scriptfile2.py',
         C:/stax/scriptfiles/scriptfile2.py' ]
     The machine attribute specifies the name of the machine where the
     SCRIPTFILE(s) are located. If not specified, it defaults to Python
     variable STAXJobScriptFileMachine.  This attribute is equivalent
     to the SCRIPTFILEMACHINE option for a STAX EXECUTE command.
-->
<!ELEMENT job-scriptfile     (#PCDATA)>
<!ATTLIST job-scriptfile
          if         CDATA   "1"
          machine    CDATA   "STAXJobScriptFileMachine"
>
<!ELEMENT job-scriptfiles    (#PCDATA)>
<!ATTLIST job-scriptfiles
          if         CDATA   "1"
          machine    CDATA   "STAXJobScriptFileMachine"
>
<!--
     The job-action element specifies a task to be executed after the
     sub-job has started. This task will be executed in parallel with
     the sub-job via a new STAX-Thread. The task will be able to use the
     STAXSubJobID variable to obtain the sub-job ID in order to interact
     with the job. If the job completes before the task completes, the
     job will remain in a non-complete state until the task completes.
     If the job cannot be started, the job-action task is not executed.
-->
<!ELEMENT job-action         (%task;)>
<!ATTLIST job-action
          if        CDATA    "1"
>
<!--================= The Call-With-List Element =================== -->
<!--
     Perform a function with the referenced name with any number of
     arguments in the form of a list.  The function attribute value
     and argument values are evaluated via Python.
-->
<!ELEMENT call-with-list      (call-list-arg*)>
<!ATTLIST call-with-list
          function   CDATA    #REQUIRED
>
<!ELEMENT call-list-arg       (#PCDATA)>
<!--================= The Script Element =========================== -->
<!--
     Specifies Python code to be executed.
-->
<!ELEMENT script     (#PCDATA)>
<!--================= The Log Element ============================== -->
<!--
     Writes a message and its log level to a STAX Job User Log file.
     The message must evaluate via Python to a string.
     The log level specified defaults to 'info'.  If specified, it
     must evaluate via Python to a string containing one of the
     following STAF Log Service Log levels:
       fatal, warning, info, trace, trace2, trace3, debug, debug2,
       debug3, start, stop, pass, fail, status, user1, user2, user3,
       user4, user5, user6, user7, user8
     The message attribute is evaluated via Python.  If it evaluates
     to true, the message text will also be sent to the STAX Job Monitor.
     The message attribute defaults to the STAXMessageLog variable whose
     value defaults to 0 (false) but can by changed within the STAX job
     to turn on messaging.
     If an if attribute is specified and it evaluates via Python to
     false, then the log element is ignored.
-->
<!ELEMENT log         (#PCDATA)>
<!ATTLIST log
          level       CDATA       "'info'"
          message     CDATA       "STAXMessageLog"
          if          CDATA       "1"
>
<!--================= The STAF Command Element ===================== -->
<!--
     Specifies a STAF command to be executed.
     Its name and all of its element values are evaluated via Python.
-->
<!ELEMENT stafcmd    (location, service, request)>
<!ATTLIST stafcmd
          name       CDATA   #IMPLIED
>
<!ELEMENT service    (#PCDATA)>
<!ELEMENT request    (#PCDATA)>
<!--================= The No Operation Element ===================== -->
<!--
     No operation action.
-->
<!ELEMENT nop        EMPTY>
<!--================= The Testcase Element ========================= -->
<!--
     Defines a testcase.  Used in conjunction with the tcstatus
     element to mark the status for a testcase.
     The name attribute value is evaluated via Python.
-->
<!ELEMENT testcase   (%task;)>
<!ATTLIST testcase
          name       CDATA    #REQUIRED
          mode       CDATA    "'default'"
>
<!--================= The Message Element ========================== -->
<!--
     Generates an event and makes the message value available to the
     STAX Job Monitor.  The message must evaluate via Python to a string.
     The log attribute is evaluated via Python to a boolean.  If it
     evaluates to true, the message text will also be logged in the STAX
     Job User log.  The log attribute defaults to the STAXLogMessage
     variable whose value defaults to 0 (false) but can by changed within
     the STAX job to turn on logging.
     The log level is ignored if the log attribute does not evaluate to
     true.  It defaults to 'info'.  If specified, it must evaluate via
     Python to a string containing one of the following STAF Log Service
     logging levels:
       fatal, warning, info, trace, trace2, trace3, debug, debug2,
       debug3, start, stop, pass, fail, status, user1, user2, user3,
       user4, user5, user6, user7, user8
     If an if attribute is specified and it evaluates via Python to
     false, the message element is ignored.
-->
<!ELEMENT message     (#PCDATA)>
<!ATTLIST message
          log         CDATA       "STAXLogMessage"
          level       CDATA       "'info'"
          if          CDATA       "1"
>
<!--================= The STAF Process Element ===================== -->
<!--
     Specifies a STAF process to be started.
     All of its non-empty element values are evaluated via Python.
-->
<!ENTITY % procgroup1 '((parms?, workdir?) | (workdir?, parms?))'>
<!ENTITY % procgroup2 '((title?, workload?) | (workload?, title?))'>
<!ENTITY % procgroup1a '((parms?, workload?) | (workload?, parms?))'>
<!ENTITY % procgroup2a '((title?, workdir?) | (workdir?, title?))'>
<!ENTITY % procgroup3 '(((vars | var | envs | env)*, useprocessvars?) |
                        (useprocessvars?, (vars | var | envs | env)*))'>
<!ENTITY % procgroup4 '(((username, password?)?, disabledauth?) |
                        ((disabledauth?, (username, password?)?)))'>
<!ENTITY % procgroup5 '((stdin?, stdout?, stderr?) |
                        (stdout?, stderr?, stdin?) |
                        (stderr?, stdin?, stdout?) |
                        (stdin?, stderr?, stdout?) |
                        (stdout?, stdin?, stderr?) |
                        (stderr?, stdout?, stdin?))'>
<!ENTITY % returnfileinfo '(returnfiles | returnfile)*'>
<!ENTITY % procgroup5a '((%returnfileinfo;, returnstdout?, returnstderr?) |
                        (returnstdout?, returnstderr?, %returnfileinfo;) |
                        (returnstderr?, %returnfileinfo;, returnstdout?) |
                        (%returnfileinfo;, returnstderr?, returnstdout?) |
                        (returnstdout?, %returnfileinfo;, returnstderr?) |
                        (returnstderr?, returnstdout?, %returnfileinfo;))'>
<!ENTITY % procgroup6 '((stopusing?, console?, focus?, statichandlename?) |
                        (stopusing?, console?, statichandlename?, focus?) |
                        (stopusing?, focus?, console?, statichandlename?) |
                        (stopusing?, focus?, statichandlename?, console?) |
                        (stopusing?, statichandlename?, console?, focus?) |
                        (stopusing?, statichandlename?, focus?, console?) |
                        (console?, focus?, stopusing?, statichandlename?) |
                        (console?, focus?, statichandlename?, stopusing?) |
                        (console?, stopusing?, focus?, statichandlename?) |
                        (console?, stopusing?, statichandlename?, focus?) |
                        (console?, statichandlename?, focus?, stopusing?) |
                        (console?, statichandlename?, stopusing?, focus?) |
                        (focus?, console?, stopusing?, statichandlename?) |
                        (focus?, console?, statichandlename?, stopusing?) |
                        (focus?, stopusing?, console?, statichandlename?) |
                        (focus?, stopusing?, statichandlename?, console?) |
                        (focus?, statichandlename?, console?, stopusing?) |
                        (focus?, statichandlename?, stopusing?, console?) |
                        (statichandlename?, stopusing?, console?, focus?) |
                        (statichandlename?, stopusing?, focus?, console?) |
                        (statichandlename?, console?, focus?, stopusing?) |
                        (statichandlename?, console?, stopusing?, focus?) |
                        (statichandlename?, focus?, console?, stopusing?) |
                        (statichandlename?, focus?, stopusing?, console?))'>
<!ELEMENT process    (location, command,
                      ((%procgroup1;, %procgroup2;) |
                       (%procgroup2;, %procgroup1;) |
                       (%procgroup1a;, %procgroup2a;) |
                       (%procgroup2a;, %procgroup1a;)),
                      %procgroup3;,
                      ((%procgroup4;, %procgroup5;, %procgroup5a;, %procgroup6;) |
                       (%procgroup4;, %procgroup6;, %procgroup5;, %procgroup5a;) |
                       (%procgroup5;, %procgroup5a;, %procgroup4;, %procgroup6;) |
                       (%procgroup5;, %procgroup5a;, %procgroup6;, %procgroup4;) |
                       (%procgroup6;, %procgroup4;, %procgroup5;, %procgroup5a;) |
                       (%procgroup6;, %procgroup5;, %procgroup5a;, %procgroup4;)),
                      other?, process-action?)>
<!ATTLIST process
          name        CDATA   #IMPLIED
>
<!--
     The process element must contain a location element and a
     command element.
-->
<!ELEMENT location            (#PCDATA)>
<!ELEMENT command             (#PCDATA)>
<!ATTLIST command
          mode        CDATA   "'default'"
          shell       CDATA   #IMPLIED
>
<!--
     The parms element specifies any parameters that you wish to
     pass to the command.
     The value is evaluated via Python to a string.
-->
<!ELEMENT parms               (#PCDATA)>
<!ATTLIST parms
          if        CDATA     "1"
>
<!--
     The workload element specifies the name of the workload for
     which this process is a member.  This may be useful in
     conjunction with other process elements.
     The value is evaluated via Python to a string.
-->
<!ELEMENT workload            (#PCDATA)>
<!ATTLIST workload
          if        CDATA     "1"
>
<!--
     The title element specifies the program title of the process.
     Unless overridden by the process, the title will be the text
     that is displayed on the title bar of the application.
     The value is evaluated via Python to a string.
-->
<!ELEMENT title               (#PCDATA)>
<!ATTLIST title
          if        CDATA     "1"
>
<!--
     The workdir element specifies the directory from which the
     command should be executed.  If you do not specify this
     element, the command will be started from whatever directory
     STAFProc is currently in.
     The value is evaluated via Python to a string.
-->
<!ELEMENT workdir             (#PCDATA)>
<!ATTLIST workdir
          if        CDATA     "1"
>
<!--
     The vars (and var) elements specify STAF variables that go into the
     process specific STAF variable pool.
     The value must evaluate via Python to a string or a list of
     strings. Multiple vars elements may be specified for a process.
     The format for each variable is:
       'varname=value'
     So, a list containing 3 variables could look like:
       ['var1=value1', 'var2=value2', 'var3=value3']
     Specifying only one variable could look like either:
       ['var1=value1']      or
       'var1=value1'
-->
<!ELEMENT vars                (#PCDATA)>
<!ATTLIST vars
          if        CDATA     "1"
>
<!ELEMENT var                 (#PCDATA)>
<!ATTLIST var
          if        CDATA     "1"
>
<!--
     The envs (and env) elements specify environment variables that will
     be set for the process.  Environment variables may be mixed case,
     however most programs assume environment variable names will
     be uppercase, so, in most cases, ensure that your environment
     variable names are uppercase.
     The value must evaluate via Python to a string or a list of
     strings. Multiple envs elements may be specified for a process.
     The format for each variable is:
       'varname=value'
     So, a list containing 3 variables could look like:
       ['ENV_VAR_1=value1', 'ENV_VAR_2=value2', 'ENV_VAR_3=value3']
     Specifying only one variable could look like either:
       ['ENV_VAR_1=value1']      or
       'ENV_VAR_1=value1'
-->
<!ELEMENT envs                (#PCDATA)>
<!ATTLIST envs
          if        CDATA     "1"
>
<!ELEMENT env                 (#PCDATA)>
<!ATTLIST env
          if        CDATA     "1"
>
<!--
     The useprocessvars element specifies that STAF variable
     references should try to be resolved from the STAF variable
     pool associated with the process being started first.
     If the STAF variable is not found in this pool, the STAF
     global variable pool should then be searched.
-->
<!ELEMENT useprocessvars      EMPTY>
<!ATTLIST useprocessvars
          if        CDATA     "1"
>
<!--
     The stopusing element allows you to specify the method by
     which this process will be STOPed, if not overridden on the
     STOP command.
     The value is evaluated via Python to a string.
-->
<!ELEMENT stopusing           (#PCDATA)>
<!ATTLIST stopusing
          if        CDATA     "1"
>
<!--
     The console element allows you to specify if the process should
     get a new console window or share the STAFProc console.
     use    Must evaluate via Python to a string containing either:
            - 'new' specifies that the process should get a new console
              window.  This option only has effect on Windows systems.
              This is the default for Windows systems.
            - 'same' specifies that the process should share the
              STAFProc console.  This option only has effect on Windows
              systems.  This is the default for Unix systems.
-->
<!ELEMENT console             EMPTY>
<!ATTLIST console
          if        CDATA     "1"
          use       CDATA     #REQUIRED
>
<!--
     The focus element allows you to specify the focus that is to be
     given to any new windows opened when starting a process on a Windows
     system.  The window(s) it effects depends on whether you are using
     the 'default' or the 'shell' command mode:
       - Default command mode (no SHELL option):  The focus specified is
         given to any new windows opened by the command specified.
       - Shell command mode:  The focus specified is given only to the
         new shell command window opened, not to any windows opened by
         the specified command.
     The focus element only has effect on Windows systems and requires
     STAF V3.1.4 or later on the machine where the process is run.
     mode   Must evaluate via Python to a string containing one of the
            following values:
            - 'background' specifies to display a window in the background
              (e.g. not give it focus) in its most recent size and position.
              This is the default.
            - 'foreground' specifies to display a window in the foreground
              (e.g. give it focus) in its most recent size and position.
            - 'minimized' specifies to display a window as minimized.
-->
<!ELEMENT focus               EMPTY>
<!ATTLIST focus
          if        CDATA     "1"
          mode      CDATA     #REQUIRED
>
<!--
     The username element specifies the username under which
     the process should be started.
     The value is evaluated via Python to a string.
-->
<!ELEMENT username            (#PCDATA)>
<!ATTLIST username
          if        CDATA     "1"
>
<!--
     The password element specifies the password with which to
     authenticate the user specified with the username element.
     The value is evaluated via Python to a string.
-->
<!ELEMENT password            (#PCDATA)>
<!ATTLIST password
          if        CDATA     "1"
>
<!-- The disabledauth element specifies the action to take if a
     username/password is specified but authentication has been disabled.
     action  Must evaluate via Python to a string containing either:
             - 'error' specifies that an error should be returned.
             - 'ignore'  specifies that any username/password specified
               is ignored if authentication is desabled.
             This action overrides any default specified in the STAF
             configuration file.
-->
<!ELEMENT disabledauth        EMPTY>
<!ATTLIST disabledauth
          if        CDATA     "1"
          action    CDATA     #REQUIRED
>
<!--
     Specifies that a static handle should be created for this process.
     The value is evaluated via Python to a string.  It will be the
     registered name of the static handle.  Using this option will also
     cause the environment variable STAF_STATIC_HANDLE to be set
     appropriately for the process.
-->
<!ELEMENT statichandlename    (#PCDATA)>
<!ATTLIST statichandlename
          if        CDATA     "1"
>
<!--
     The stdin element specifies the name of the file from which
     standard input will be read.  The value is evaluated via
     Python to a string.
-->
<!ELEMENT stdin               (#PCDATA)>
<!ATTLIST stdin
          if        CDATA     "1"
>
<!--
     The stdout element specifies the name of the file to which
     standard output will be redirected.
     The mode and filename are evaluated via Python to a string.
-->
<!ELEMENT stdout              (#PCDATA)>
<!--  mode  specifies what to do if the file already exists.
            The value must evaluate via Python to one of the
            following:
            'replace' - specifies that the file will be replaced.
            'append'  - specifies that the process' standard
                        output will be appended to the file.
-->
<!ATTLIST stdout
          if        CDATA     "1"
          mode      CDATA     "'replace'"
>
<!--
     The stderr element specifies the file to which standard error will
     be redirected. The mode and filename are evaluated via Python to a
     string.
-->
<!ELEMENT stderr              (#PCDATA)>
<!-- mode   specifies what to do if the file already exists or to
            redirect standard error to the same file as standard output.
            The value must evaluate via Python to one of the following:
            'replace' - specifies that the file will be replaced.
            'append'  - specifies that the process's standard error will
                        be appended to the file.
            'stdout'  - specifies to redirect standard error to the
                        same file to which standard output is redirected.
                        If a file name is specified, it is ignored.
-->
<!ATTLIST stderr
          if        CDATA     "1"
          mode      CDATA     "'replace'"
>
<!--
     The returnstdout element specifies to return in STAXResult
     the contents of the file where standard output was redirected
     when the process completes.
-->
<!ELEMENT returnstdout        EMPTY>
<!ATTLIST returnstdout
          if        CDATA     "1"
>
<!--
     The returnstderr element specifies to return in STAXResult
     the contents of the file where standard error was redirected
     when the process completes.
-->
<!ELEMENT returnstderr        EMPTY>
<!ATTLIST returnstderr
          if        CDATA     "1"
>
<!--
     The returnfiles (and returnfile) elements specify that the
     contents of the specified file(s) should be returned in
     STAXResult when the process completes.  The value must evaluate
     via Python to a string or a list of strings.  Multiple returnfile(s)
     elements may be specified for a process.
-->
<!ELEMENT returnfiles         (#PCDATA)>
<!ATTLIST returnfiles
          if        CDATA     "1"
>
<!ELEMENT returnfile          (#PCDATA)>
<!ATTLIST returnfile
          if        CDATA     "1"
>
<!--
     The process-action element specifies a task to be executed
     when a process has started.
-->
<!ELEMENT process-action      (%task;)>
<!ATTLIST process-action
          if        CDATA     "1"
>
<!--
     The other element specifies any other STAF parameters that
     may arise in the future.  It is used to pass additional data
     to the STAF PROCESS START request.
     The value is evaluated via Python to a string.
-->
<!ELEMENT other               (#PCDATA)>
<!ATTLIST other
          if        CDATA     "1"
>
<!--================= The Signal Handler Element =================== -->
<!--
     The signalhandler element defines how to handle a specified signal.
     The signal attribute value is evaluated via Python.
-->
<!ELEMENT signalhandler (%task;)>
<!ATTLIST signalhandler
          signal     CDATA        #REQUIRED
>
<!--================= The Call-With-Map Element ==================== -->
<!--
     Perform a function with the referenced name with any number of
     arguments in the form of a map of named arguments.  The function
     and name attribute values as well as the argument value are
     evaluated via Python.
-->
<!ELEMENT call-with-map       (call-map-arg*)>
<!ATTLIST call-with-map
          function   CDATA    #REQUIRED
>
<!ELEMENT call-map-arg        (#PCDATA)>
<!ATTLIST call-map-arg
          name       CDATA    #REQUIRED
>
<!--================= The Sequence Element ========================= -->
<!--
     The sequence element performs one or more tasks in sequence.
-->
<!ELEMENT sequence   (%task;)+>
<!--================= Continue Element ============================= -->
<!--
     The continue element can be used to continue to the top of a loop
     or iterate element.
-->
<!ELEMENT continue   EMPTY>
<!--================= The Release Element ========================== -->
<!--
     The release element specifies to release a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the release element is ignored.
-->
<!ELEMENT release    EMPTY>
<!ATTLIST release
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
<!--=============== The Try / Catch / Finally Elements ============= -->
<!--
     The try element allows you to perform a task and to catch
     exceptions that are thrown.  Also, if a finally element is
     specified, then the finally task is executed, no matter whether
     the try task completes normally or abruptly, and no matter whether
     a catch element is first given control.
-->
<!ELEMENT try        ((%task;), ((catch+) | ((catch*), finally)))>
<!--
     The catch element performs a task when the specified exception is
     caught.  The var attribute specifies the name of the variable to
     receive the data specified within the throw element.  The typevar
     attribute specifies the name of the variable to receive the type
     of the exception.
-->
<!ELEMENT catch      (%task;)>
<!ATTLIST catch
          exception  CDATA        #REQUIRED
          var        CDATA        #IMPLIED
          typevar    CDATA        #IMPLIED
>
<!ELEMENT finally    (%task;)>
opends/tests/stress-tests/staf-installer.xml
New file
@@ -0,0 +1,1185 @@
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<project name="opends-staf-installer" basedir="." default="usage">
  <description>
    Installer ant file for the staf platform
    This allows tests that need a running instance of staf to easily
    get one and hides all the complexity under the hood
  </description>
  <dirname file="${basedir}/.." property="project.home"/>
  <!-- installer wide settings - top -->
    <property file="${project.home}/PRODUCT"/>
    <property name="product.name"
              value="${SHORT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}" />
    <!-- load user properties first if they have been set -->
    <property file="user.properties"/>
    <!-- this is the file where the default values are defined                -->
    <property file="staf-installer/staf-installer.properties"                  />
    <!-- Define the os name in case we're on windows
         why do this ?
         the jvm returns different strings for os.name on different flavors
         of windows ('Windows 2000', 'Windows 2003', 'Windows XP', ...)
    -->
    <condition property="os.myname" value="windows" else="${os.name}">
      <os family="windows"/>
    </condition>
    <!-- Check if the current platform is supported                           -->
    <condition property="platform.supported">
      <available file="staf-installer/${os.myname}.properties"/>
    </condition>
    <!-- Load architecture specific properties
        loading this one first allows to override common properties with platform
        specific properties
    -->
    <property file="staf-installer/${os.myname}-${os.arch}-${sun.arch.data.model}.properties" />
    <property file="staf-installer/${os.myname}-${os.arch}.properties"         />
    <!-- Load properties common to the OS regardless of architecture          -->
    <property file="staf-installer/${os.myname}.properties"                    />
    <!-- Daily build properties -->
    <tstamp>
      <format property="todays.date" pattern="yyyyMMdd"/>
    </tstamp>
    <tstamp>
      <format property="yesterdays.date" pattern="yyyyMMdd" offset="-24" unit="hour"/>
    </tstamp>
    <condition property="daily.date" value="${todays.date}" else="${yesterdays.date}">
      <http url="${daily.build.url}/${todays.date}${daily.build.time}/${SHORT_NAME}/build/package/${product.name}.zip"/>
    </condition>
    <property name="daily.package.dir"
              value="${staf.home}/daily-builds/${daily.date}"/>
    <property name="daily.package"
              value="${daily.package.dir}/${product.name}.zip"/>
    <property name="daily.package.url"
              value="${daily.build.url}/${daily.date}${daily.build.time}/${SHORT_NAME}/build/package/${product.name}.zip"/>
  <!-- installer wide settings - bottom  -->
<!-- Usage section - top     -->
  <!-- Default target => how to use this file -->
  <target name="usage"
          description="Gives a message that helps using this file">
    <echo>Installer usage:
 main targets=
   usage      : print this message
   status     : report if the staf is installed and running
   bootstrap  : install and start the framework
   run-tests  : run the stress tests (requires staf installed and started)
   run-daily  : run the stress tests on today's build
   wipeout    : stop and uninstall the framework
 gui tools:
   gui        : start the STAX gui
   jvm-log    : start the STAF jvm log viewer
 subtargets=
   download   : download the archives necessary to install the staf
   install    : install the staf
   start      : start the staf unless it is already running
   stop       : stop the staf if it is already running
   uninstall  : uninstall the staf if it is installed</echo>
  </target>
<!-- Usage section - bottom  -->
<!-- Downloader section - top    -->
  <target name="download-do-prepare-check-proxy" unless="proxy.disabled">
    <echo>Checking for proxy [${proxy.host}:${proxy.port}] as user [${proxy.user}].</echo>
    <echo>Note: If these values do not match your environment, </echo>
    <echo>      please use the 'configure' target</echo>
    <condition property="proxy.enabled">
      <and>
        <not>
          <http url="${bits.download.url}"/>
        </not>
        <isreachable host="${proxy.host}" timeout="5"/>
      </and>
    </condition>
  </target>
  <target name="download-do-prepare-set-proxy" if="proxy.enabled" >
    <echo>Proxy detected. Configuring.</echo>
    <setproxy
      proxyhost="${proxy.host}"
      proxyport="${proxy.port}"
      proxyuser="${proxy.user}"
      proxypassword="${proxy.pass}"/>
  </target>
  <target
    name="download-do-prepare"
    depends="download-do-prepare-check-proxy,download-do-prepare-set-proxy">
    <mkdir dir="${bits.download.dir}" />
  </target>
  <target name="download-do-failed" unless="bits.all.downloaded" >
    <echo>Couldn't get the bits, sorry.</echo>
  </target>
  <target name="download-do-succeeded" if="bits.all.downloaded" >
    <echo>Successfully downloaded all the archives needed for installation.</echo>
  </target>
  <target name="download-do-get-staf"  unless="bits.staf.downloaded.before">
    <get src="${bits.download.url}/${bits.staf.archive}"
         dest="${bits.download.dir}/${bits.staf.archive}" />
    <property name="bits.staf.downloaded" value="true"/>
  </target>
  <target name="download-do-get-services"  unless="bits.services.downloaded.before">
    <get src="${bits.download.url}/${bits.email.archive}"
         dest="${bits.download.dir}/${bits.email.archive}" />
    <get src="${bits.download.url}/${bits.event.archive}"
         dest="${bits.download.dir}/${bits.event.archive}" />
    <get src="${bits.download.url}/${bits.eventmanager.archive}"
         dest="${bits.download.dir}/${bits.eventmanager.archive}" />
    <get src="${bits.download.url}/${bits.stax.archive}"
         dest="${bits.download.dir}/${bits.stax.archive}" />
    <property name="bits.services.downloaded" value="true" />
  </target>
  <target name="download-do"
          if="platform.supported"
          depends="status-do,download-do-prepare,download-do-get-staf,download-do-get-services">
    <condition property="bits.all.downloaded" >
      <and>
        <or>
          <isset property="bits.staf.downloaded"/>
          <isset property="bits.staf.downloaded.before" />
        </or>
        <or>
          <isset property="bits.services.downloaded"/>
          <isset property="bits.services.downloaded.before" />
        </or>
      </and>
    </condition>
    <antcall target="download-do-succeeded" />
    <antcall target="download-do-failed"    />
  </target>
  <target name="download-dont" unless="platform.supported">
    <echo>${os.myname}-${os.arch} is not a supported platform</echo>
  </target>
  <target name="download"
          depends="status-do,download-do,download-dont"
          description="Download the bits necessary to install staf"/>
  <target name="download-daily" depends="status-do,download-do-prepare" unless="daily.package.downloaded">
    <mkdir dir="${daily.package.dir}"/>
    <get src="${daily.package.url}"
         dest="${daily.package}"/>
  </target>
  <target name="remove-bits">
    <delete dir="${bits.download.dir}"/>
  </target>
  <target name="re-download" depends="remove-bits,download"/>
<!-- Downloader section - bottom -->
<!-- Installation section - top    -->
  <target name="install-config" if="staf.install.successful">
    <copy file="${staf.config.stubs}" tofile="${staf.config}">
      <filterchain>
        <expandproperties/>
      </filterchain>
    </copy>
  </target>
  <target name="install-services" if="staf.install.successful">
    <unzip
        src="${bits.download.dir}/${bits.email.archive}"
        dest="${staf.install.dir}/services"/>
    <unzip
        src="${bits.download.dir}/${bits.event.archive}"
        dest="${staf.install.dir}/services"/>
    <unzip
        src="${bits.download.dir}/${bits.eventmanager.archive}"
        dest="${staf.install.dir}/services"/>
    <unzip
        src="${bits.download.dir}/${bits.stax.archive}"
        dest="${staf.install.dir}/services"/>
  </target>
  <target name="install-staf-jar"
          description="deploy the staf bits"
          if="staf.archive.is.jar">
    <echo message="Installing staf, please wait, it'll take some time..."    />
    <java jar="${bits.download.dir}/${bits.staf.archive}" fork="true">
      <arg value="-silent" />
      <arg line="-W license.selection=&quot;Accept&quot;" />
      <arg line="-W stafinstalldirectory.defaultInstallLocation=&quot;${staf.install.dir}&quot;"/>
    </java>
    <condition property="staf.install.successful">
      <available file="${staf.install.dir}/bin/STAF.cfg"/>
    </condition>
  </target>
  <target name="install-staf-tar" if="staf.archive.is.tar">
    <delete dir="${bits.download.dir}/staf"/>
    <gunzip
      src="${bits.download.dir}/${bits.staf.archive}"
      dest="${bits.download.dir}"/>
    <untar dest="${bits.download.dir}">
      <fileset dir="${bits.download.dir}">
        <include name="*.tar"/>
      </fileset>
    </untar>
    <chmod file="${bits.download.dir}/staf/STAFInst" perm="755"/>
    <exec executable="${bits.download.dir}/staf/STAFInst">
      <arg value="-source"/>
      <arg value="${bits.download.dir}/staf"/>
      <arg value="-target"/>
      <arg value="${staf.install.dir}"/>
      <arg value="-acceptlicense"/>
    </exec>
    <condition property="staf.install.successful">
      <available file="${staf.install.dir}/bin/STAF.cfg"/>
    </condition>
  </target>
  <target name="install-staf"
          depends="install-staf-jar,install-staf-tar">
    <fail unless="staf.install.successful" />
  </target>
  <target name="install-prepare" >
    <mkdir dir="${staf.install.dir}"/>
    <mkdir dir="${staf.install.dir}/services"/>
    <mkdir dir="${staf.config.dir}"/>
  </target>
  <target name="install"
          description="Perform framework installation"
          depends="status-do,install-prepare,install-staf,install-services,install-config"
          if="bits.all.downloaded"/>
<!-- Installation section - bottom -->
<!-- Gui section - top    -->
  <target name="gui"
          depends="status-do"
          description="brings up the stax gui" >
    <condition property="gui.spawn" value="false" else="true">
      <isset property="DEBUG"/>
    </condition>
    <exec
      dir="${staf.install.dir}"
      executable="${java.home}/bin/java"
      spawn="${gui.spawn}">
      <env key="${path.var}" path="${java.home}${file.separator}bin${path.separator}${staf.install.dir}${file.separator}bin${path.separator}${path.current}"/>
      <env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
      <arg value="-classpath"/>
      <arg value="${staf.install.dir}/services/stax/STAXMon.jar${path.separator}${staf.lib.dir}/JSTAF.jar"/>
      <arg value="com.ibm.staf.service.stax.STAXMonitor"/>
    </exec>
  </target>
<!-- Gui section - bottom -->
<!-- Jvmlog section - top    -->
  <target name="jvm-log"
          depends="status-do"
          description="brings up the jvmlog gui" >
    <exec
      dir="${staf.install.dir}"
      executable="${java.home}/bin/java"
      spawn="true">
      <env key="${path.var}" path="${java.home}${file.separator}bin${path.separator}${staf.install.dir}${file.separator}bin${path.separator}${path.current}"/>
      <env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
      <arg value="-classpath"/>
      <arg value="${staf.lib.dir}${path.separator}${staf.lib.dir}/JSTAF.jar"/>
      <arg value="com.ibm.staf.STAFJVMLogViewer"/>
    </exec>
  </target>
<!-- Jvmlog section - bottom -->
<!-- Configure section - top    -->
  <target name="configure">
    <echo>I. STAF configuration</echo>
    <input
      message="I [1/1] STAF port"
      defaultvalue="${staf.port}"
      addproperty="staf.port.input"
    />
    <input
      message="I [2/2] Host name"
      defaultvalue="${host.name}"
      addproperty="host.name.input"
    />
    <echo>II. HTTP proxy (to download the framework and/or daily builds)</echo>
    <input
      message="II [1/4] Proxy host"
      defaultvalue="${proxy.host}"
      addproperty="proxy.host.input"
    />
    <input
      message="II [2/4] Proxy port"
      defaultvalue="${proxy.port}"
      addproperty="proxy.port.input"
    />
    <input
      message="II [3/4] Proxy user"
      defaultvalue="${proxy.user}"
      addproperty="proxy.user.input"
    />
    <input
      message="II [4/4] Proxy password"
      defaultvalue="${proxy.pass}"
      addproperty="proxy.pass.input"
    />
    <echo>III. OpenDS configuration</echo>
    <input
      message="III [1/5] OpenDS ldap port"
      defaultvalue="${opends.port.ldap}"
      addproperty="opends.port.ldap.input"
    />
    <input
      message="III [2/5] OpenDS secure ldap port"
      defaultvalue="${opends.port.ldaps}"
      addproperty="opends.port.ldaps.input"
    />
    <input
      message="III [3/5] OpenDS jmx port"
      defaultvalue="${opends.port.jmx}"
      addproperty="opends.port.jmx.input"
    />
    <input
      message="III [4/5] OpenDS admin DN (also called root DN)"
      defaultvalue="${opends.admin.dn}"
      addproperty="opends.admin.dn.input"
    />
    <input
      message="III [5/5] OpenDS admin password"
      defaultvalue="${opends.admin.pwd}"
      addproperty="opends.admin.pwd.input"
    />
    <echo>IV. Email configuration</echo>
    <input
      message="IV [1/7] Send report email?"
      defaultvalue="${email.enabled}"
      validargs="y,n"
      addproperty="email.enabled.input"
    />
    <input
      message="IV [2/7] Email will appear to be from"
      defaultvalue="${email.from}"
      addproperty="email.from.input"
    />
    <input
      message="IV [3/7] Send email to"
      defaultvalue="${email.to}"
      addproperty="email.to.input"
    />
    <input
      message="IV [4/7] SMTP server host"
      defaultvalue="${email.server.host}"
      addproperty="email.server.host.input"
    />
    <input
      message="IV [5/7] SMTP server port"
      defaultvalue="${email.server.port}"
      addproperty="email.server.port.input"
    />
    <input
      message="IV [6/7] SMTP server user"
      defaultvalue="${email.server.user}"
      addproperty="email.server.user.input"
    />
    <input
      message="IV [7/7] SMTP server password"
      defaultvalue="${email.server.pwd}"
      addproperty="email.server.pwd.input"
    />
    <echo>Saving ...</echo>
    <echo
      file="user.properties">staf.port=${staf.port.input}
host.name=${host.name.input}
proxy.host=${proxy.host.input}
proxy.port=${proxy.port.input}
proxy.user=${proxy.user.input}
proxy.pass=${proxy.pass.input}
opends.port.ldap=${opends.port.ldap.input}
opends.port.ldaps=${opends.port.ldaps.input}
opends.port.jmx=${opends.port.jmx.input}
opends.admin.dn=${opends.admin.dn.input}
opends.admin.pwd=${opends.admin.pwd.input}
email.enabled=${email.enabled.input}
email.from=${email.from.input}
email.to=${email.to.input}
email.server.host=${email.server.host.input}
email.server.port=${email.server.port.input}
email.server.user=${email.server.user.input}
email.server.pwd=${email.server.pwd.input}
</echo>
  </target>
  <target name="unconfigure">
    <delete file="user.properties"/>
  </target>
<!-- Configure section - bottom -->
<!-- Run tests section - top    -->
  <target name="run-tests-build-pkg"
    if="product.package.build"
    depends="run-tests-get-pkg">
    <ant dir="${project.home}"
      antfile="${project.home}/build.xml"
      target="package"/>
  </target>
  <target name="run-tests-get-pkg">
    <condition property="product.package.dir"
               value="${daily.package.dir}"
               else="${project.home}/build/package">
       <isset property="tests.run.daily"/>
     </condition>
     <property name="product.package"
               value="${product.package.dir}/${product.name}.zip"/>
     <condition property="product.package.build">
       <and>
         <not>
           <isset property="tests.run.daily"/>
         </not>
         <not>
           <available file="${product.package}"/>
         </not>
       </and>
     </condition>
  </target>
  <target name="run-tests-check" depends="run-tests-build-pkg">
    <condition property="opends.port.ldap.taken">
      <socket port="${opends.port.ldap}" server="${host.name}"/>
    </condition>
    <condition property="opends.port.ldaps.taken">
      <socket port="${opends.port.ldaps}" server="${host.name}"/>
    </condition>
    <condition property="opends.port.jmx.taken">
      <socket port="${opends.port.jmx}" server="${host.name}"/>
    </condition>
    <condition property="product.package.available">
      <available file="${product.package}"/>
    </condition>
    <condition property="run-tests.proceed">
      <and>
        <not>
          <or>
            <isset property="opends.port.ldap.taken"/>
            <isset property="opends.port.ldaps.taken"/>
            <isset property="opends.port.jmx.taken"/>
          </or>
        </not>
        <isset property="staf.running"/>
        <isset property="product.package.available"/>
      </and>
    </condition>
  </target>
  <target name="run-tests-prepare"
          depends="status-do,run-tests-build-pkg"
          if="run-tests.proceed">
    <!-- python config - top -->
      <!-- 1. get a timestamp for step 3 -->
      <tstamp>
        <format property="tests.run.time" pattern="yyyy.MM.dd-HH.mm.ss"/>
      </tstamp>
      <!-- clean up some -->
      <delete dir="${staf.logs.dir}"/>
      <delete dir="${staf.tmp.dir}"/>
      <!-- make all the necessary directories for this test run -->
      <mkdir dir="${staf.tmp.dir}"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}/config"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}/report"/>
      <!-- these will serve for after-the-fact archiving the logs -->
      <mkdir dir="${tests.run.dir}/${tests.run.time}/staf-logs"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}/server-logs"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}/coverage"/>
      <!-- 3. perform the config back up if necessary -->
      <copy file="${tests.config}"
            tofile="${tests.config.backup}"
            overwrite="false"/>
      <!-- 4. generate the timestamped config file that will be used for this run -->
      <copy file="${tests.config.stubs}"
            tofile="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}">
        <filterchain>
          <expandproperties/>
        </filterchain>
      </copy>
      <!-- 5. this is a windows-specific measure to replace the windows file
              separator by a forward slash. Staf otherwise fails to find the
              files.
       -->
      <replace file="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}" token="\" value="/"/>
      <!-- 6. copy the generated config in place of the previous one -->
      <copy file="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}"
            tofile="${tests.config}"
            overwrite="true"/>
    <!-- python config - bottom -->
  </target>
  <target name="run-tests-cant-ldap" if="opends.port.ldap.taken">
    <echo>Port [${opends.port.ldap}] already used</echo>
  </target>
  <target name="run-tests-cant-ldaps" if="opends.port.ldaps.taken">
    <echo>Port [${opends.port.ldaps}] already used</echo>
  </target>
  <target name="run-tests-cant-jmx" if="opends.port.jmx.taken">
    <echo>Port [${opends.port.jmx}] already used</echo>
  </target>
  <target name="run-tests-cant-staf" unless="staf.running">
    <echo>Staf is NOT running. Use the start target and try again</echo>
  </target>
  <target name="run-tests-cant-package" unless="product.package.available">
    <echo>the package [${product.package}] is not available</echo>
  </target>
  <target name="run-tests-cant"
          depends="run-tests-cant-ldap,run-tests-cant-ldaps,run-tests-cant-jmx,run-tests-cant-staf,run-tests-cant-package"
          unless="run-tests.proceed">
    <echo>Could not run the tests for the afore mentioned reasons</echo>
    <fail message="Could not run the stress tests"/>
  </target>
  <target name="run-tests"
    depends="status-do,run-tests-check,run-tests-cant,run-tests-prepare,run-my-tests-default-plan"
    if="run-tests.proceed">
    <property name="tests.request" value="EXECUTE FILE ${tests.xml} JOBNAME OpenDS_stress_Tests SCRIPTFILE ${tests.config} SCRIPTFILE ${tests.python} WAIT CLEARLOGS"/>
    <condition property="tests.replay.script" value="replay.bat" else="replay.sh">
      <os family="windows"/>
    </condition>
    <echo>Generating replay script to allow you to re-execute the tests in the same conditions</echo>
    <copy file="${staf.installer.dir}${file.separator}${tests.replay.script}"
          tofile="${tests.run.dir}${file.separator}${tests.run.time}${file.separator}${tests.replay.script}">
      <filterchain>
        <expandproperties/>
      </filterchain>
    </copy>
    <echo>While the tests are running you may tail the job logs at</echo>
    <echo>${staf.home}/logs/MACHINE/</echo>
    <echo>Running tests. This will take more than a while.</echo>
    <property name="CLASSPATH" value="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
    <exec
      dir="${staf.bin.dir}"
      executable="${staf.executable}"
      >
      <arg line="LOCAL STAX ${tests.request}"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="LD_LIBRARY_PATH" value="${staf.lib.dir}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
    </exec>
    <!-- restore the original config file to avoid it to be mistakenly commited
         with the generated values    -->
    <delete file="${tests.config}"/>
    <move file="${tests.config.backup}"
          tofile="${tests.config}"/>
    <echo file="${tests.run.dir}/last.run">${tests.run.time}</echo>
    <echo>Saving server logs</echo>
    <copy todir="${tests.run.dir}/${tests.run.time}/server-logs">
      <fileset dir="${staf.tmp.dir}/${product.name}/logs"/>
    </copy>
    <echo>Saving Staf/Stax logs</echo>
    <copy todir="${tests.run.dir}/${tests.run.time}/staf-logs">
      <fileset dir="${staf.home}/logs"/>
    </copy>
    <!--<delete dir="${staf.home}/logs" />-->
    <echo>Saving report</echo>
    <copy todir="${tests.run.dir}/${tests.run.time}/report">
      <fileset dir="${staf.tmp.dir}">
        <include name="r*"/>
      </fileset>
    </copy>
    <echo>You may access the tests report at</echo>
    <echo>${tests.run.dir}/${tests.run.time}/report/my-report.html</echo>
    <antcall target="send-mail"/>
  </target>
  <target name="run-my-tests-get-contrib-check">
    <available file="ant-contrib.zip" property="ant-contrib.downloaded" />
  </target>
  <target name="run-my-tests-get-contrib" depends="run-my-tests-get-contrib-check,download-do-prepare-check-proxy,download-do-prepare-set-proxy" unless="ant-contrib.downloaded">
    <get src="http://easynews.dl.sourceforge.net/sourceforge/ant-contrib/ant-contrib-1.0b3-bin.zip" dest="ant-contrib.zip"/>
  </target>
  <target name="run-my-tests-expand-check">
    <available file="ant-contrib" property="ant-contrib.expanded" />
  </target>
  <target name="run-my-tests-expand" depends="run-my-tests-get-contrib,run-my-tests-expand-check" unless="ant-contrib.expanded">
    <unzip src="ant-contrib.zip" dest="." />
  </target>
  <target name="run-my-tests-define" depends="run-my-tests-expand">
    <taskdef resource="net/sf/antcontrib/antlib.xml">
      <classpath>
        <fileset dir="ant-contrib">
          <include name="**/*.jar"/>
        </fileset>
      </classpath>
    </taskdef>
  </target>
  <target name="run-my-tests" depends="run-my-tests-define">
    <condition property="already.customized" value="true" else="false">
      <available file="${test.plan.custom}" />
    </condition>
    <if>
      <equals arg1="${already.customized}" arg2="true" />
      <then>
        <input message="A previously customized test plan was detected. Do you want to change the list of suites to run?" validargs="y,n" defaultvalue="n" addproperty="prompt.do" />
      </then>
      <else>
        <echo>No previous customized test plan found.</echo>
        <property name="prompt.do" value="y" />
      </else>
    </if>
    <if>
      <equals arg1="${prompt.do}" arg2="y" />
      <then>
        <delete file="${test.plan.custom}" />
        <foreach list="${test.plan.list}" param="test" target="run-my-tests-prompt"/>
      </then>
    </if>
    <echo>You may now run those tests simply by calling 'build run-tests'</echo>
    <!-- <antcall target="run-tests" /> -->
  </target>
  <target name="run-my-tests-prompt">
    <input message="Do you want to execute ${test}?" validargs="y,n" defaultvalue="y" addproperty="answer"/>
    <if>
      <equals arg1="${answer}" arg2="y" />
      <then>
        <echo file="${test.plan.custom}" append="true">${test}
</echo>
      </then>
    </if>
  </target>
  <target name="run-my-tests-default-plan" depends="run-my-tests-define" unless="custom-suites.on">
    <delete file="${test.plan.default}"/>
    <foreach list="${test.plan.list}" param="test" target="run-my-tests-default-plan-add"/>
  </target>
  <target name="run-my-tests-default-plan-add">
    <echo file="${test.plan.default}" append="true">${test}
</echo>
  </target>
  <target name="send-mail-prepare">
    <condition property="test.successful">
      <available file="${staf.tmp.dir}/my-report.html"/>
    </condition>
    <condition property="email.send">
      <equals arg1="${email.enabled}" arg2="y"
              casesensitive="false" trim="true"/>
    </condition>
  </target>
  <target name="send-mail-get-percentage" depends="send-mail-prepare" if="test.successful">
    <echo>test report found.Proceeding...</echo>
    <delete file="${staf.tmp.dir}/percentage.properties"/>
    <copy file="${staf.tmp.dir}/my-report.html" tofile="${staf.tmp.dir}/percentage.properties">
      <filterchain>
        <linecontains>
         <contains value='font size="+2'/>
        </linecontains>
        <tokenfilter>
          <replaceregex pattern=".*font size=.+2..(\d+)%./font.*" replace="test.percentage=\1"/>
        </tokenfilter>
      </filterchain>
    </copy>
    <property file="${staf.tmp.dir}/percentage.properties"/>
    <echo>Test Success Rate: ${test.percentage}%</echo>
  </target>
  <target name="send-mail" if="email.send" depends="send-mail-get-percentage">
    <condition property="email.send.noauth">
      <or>
        <not>
          <isset property="email.server.user"/>
        </not>
        <not>
          <length string="${email.server.user}" when="greater"
                  trim="true" length="0"/>
        </not>
      </or>
    </condition>
    <condition property="email.file"
               value="${staf.tmp.dir}/my-report.html"
               else="staf-installer/failure.html">
      <available file="${staf.tmp.dir}/my-report.html"/>
    </condition>
    <condition property="email.subject"
               value="FT - Run - ${daily.date} - ${os.name} - ${os.arch} - ${test.percentage}%"
               else="FT - Failed -${daily.date} - ${os.name} - ${os.arch}">
      <available file="${staf.tmp.dir}/my-report.html"/>
    </condition>
    <antcall target="send-mail-noauth"/>
    <antcall target="send-mail-withauth"/>
  </target>
  <target name="send-mail-noauth" if="email.send.noauth">
    <mail from="${email.from}"
          tolist="${email.to}"
          subject="${email.subject}"
          mailhost="${email.server.host}"
          mailport="${email.server.port}"
          messagefile="${email.file}"
          messagemimetype="text/html" />
  </target>
  <target name="send-mail-withauth" unless="email.send.noauth">
    <mail from="${email.from}"
          tolist="${email.to}"
          subject="${email.subject}"
          mailhost="${email.server.host}"
          mailport="${email.server.port}"
          user="${email.server.user}"
          password="${email.server.pwd}"
          messagefile="${email.file}"
          messagemimetype="text/html" />
  </target>
  <target name="daily">
    <property name="tests.run.daily" value="true"/>
  </target>
  <target name="run-daily" depends="status-do,daily,download-daily,coverage-instrument,run-tests"/>
  <target name="coverage-init">
    <path id="emma.lib">
      <pathelement location="${project.home}/ext/emma/lib/emma.jar"     />
      <pathelement location="${project.home}/ext/emma/lib/emma_ant.jar" />
    </path>
    <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
  </target>
  <target name="coverage-on" depends="coverage-init">
    <property name="coverage.on" value="true"/>
  </target>
  <target name="coverage-instrument" depends="status-do,run-tests-get-pkg" if="coverage.on">
    <delete dir="${staf.tmp.dir}/coverage-instr" />
    <mkdir dir="${staf.tmp.dir}/coverage-instr" />
    <!-- unzip the original package in a temporary location to make the
         changes necessary so that the coverage tool is called
     -->
    <unzip src="${product.package}"
           dest="${staf.tmp.dir}/coverage-instr"/>
    <!-- Add emma in the package along with the other librairies
         this has the advantage of being automatically picked up by the scripts
    -->
    <copy file="${project.home}/ext/emma/lib/emma.jar"
          tofile="${staf.tmp.dir}/coverage-instr/${product.name}/lib/emma.jar"/>
    <!-- move the original product package to make room for the coverage
         enabled package
     -->
    <move file="${product.package}" tofile="${product.package}.nocov"/>
    <!-- intrument the OpenDS java archive to gather coverage -->
    <java classpath="${staf.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}lib${file.separator}emma.jar"
          classname="emma" fork="true">
      <jvmarg value="-Demma.metadata.out.file=${staf.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}coverage.em" />
      <arg value="instr" />
      <arg value="-m" />
      <arg value="overwrite" />
      <arg value="-cp" />
      <arg value="${staf.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}lib${file.separator}OpenDS.jar" />
    </java>
    <echo>Writing properties file</echo>
    <echo file="${staf.tmp.dir}/coverage-instr/${product.name}/classes/emma.properties">coverage.out.file=${staf.tmp.dir}/emma.coverage</echo>
    <!-- Repackage the product with coverage enabled scripts -->
    <zip basedir="${staf.tmp.dir}/coverage-instr" destfile="${product.package}">
      <zipfileset dir="${staf.tmp.dir}/coverage-instr"
                  includes="${product.name}/setup,${product.name}/uninstall,${product.name}/upgrade,${product.name}/bin/*,${product.name}/lib/*.sh"
           filemode="755" dirmode="755" />
    </zip>
    <!-- <delete dir="${staf.tmp.dir}/coverage-instr"/> -->
  </target>
  <target name="coverage-report" if="coverage.on">
    <delete dir="${staf.tmp.dir}/coverage/all" />
    <mkdir dir="${staf.tmp.dir}/coverage/all" />
    <emma enabled="${coverage.on}" >
      <report >
        <infileset dir="${staf.tmp.dir}" includes="**/*.em,**/*.ec" />
        <sourcepath>
          <dirset dir="${project.home}" >
            <include name="src" />
          </dirset>
        </sourcepath>
        <html outfile="${staf.tmp.dir}/coverage/all/index.html"
              columns="name, method, line"
              sort="+line, +name"
              metrics="line:80"
        />
      </report>
    </emma>
  </target>
  <target name="restore-pkg" if="coverage.on">
    <delete file="${product.package}"/>
    <move file="${product.package}.nocov" tofile="${product.package}"/>
  </target>
  <target name="daily-coverage" depends="coverage-on,run-daily,restore-pkg,coverage-report"/>
  <target name="testwithcoverage" depends="coverage-on,coverage-instrument,run-tests,restore-pkg,coverage-report"/>
<!-- Run tests section - bottom -->
<!-- Uninstallation section - top    -->
  <target name="uninstall-do-jar"
          description="Uninstall the staf"
          if="staf.install.is.jar">
    <echo message="Uninstalling staf, please wait..."                        />
    <java jar="${staf.install.dir}/_uninst/uninstall.jar" fork="true">
      <arg value="-silent" />
    </java>
    <sleep seconds="5" />
    <delete dir="${staf.install.dir}" />
  </target>
  <target name="uninstall-do-tar"
          description="Uninstall the staf"
          unless="staf.install.is.jar">
    <echo message="Uninstalling staf, please wait..."                        />
    <exec executable="${staf.install.dir}/STAFUninst"/>
    <sleep seconds="5" />
    <delete dir="${staf.install.dir}" />
  </target>
  <target name="uninstall-do" if="staf.installed">
    <condition property="staf.install.is.jar">
      <available file="${staf.install.dir}/_uninst/uninstall.jar"/>
    </condition>
    <antcall target="uninstall-do-jar"/>
    <antcall target="uninstall-do-tar"/>
  </target>
  <target name="uninstall-dont-not-installed" unless="staf.installed">
    <echo>Staf is not installed.</echo>
  </target>
  <target name="uninstall-dont-running" if="staf.running">
    <echo>Staf is running. Stop staf before uninstalling.</echo>
    <echo>Use either the 'stop' or the 'wipeout' target.</echo>
  </target>
  <target
    name="uninstall-dont"
    depends="uninstall-dont-running,uninstall-dont-not-installed" />
  <target name="uninstall" depends="status-do,uninstall-do,uninstall-dont">
  </target>
<!-- Uninstallation section - bottom -->
<!-- Start section - top       -->
  <target name="start-do"
          description="start the staf"
          if="staf.installed"
          unless="staf.running" >
    <echo message="Starting staf daemon ... on ${os.myname}" />
    <condition property="staf.spawn">
      <not>
        <isset property="staf.spawn"/>
      </not>
    </condition>
    <echo message="Starting STAF..."/>
    <exec
      dir="${staf.bin.dir}"
      executable="${staf.daemon}"
      spawn="${staf.spawn}">
     <arg value="${staf.config}"/>
     <env key="${path.var}" path="${java.home}${file.separator}bin${path.separator}${staf.install.dir}${file.separator}bin${path.separator}${path.current}"/>
     <env key="LD_LIBRARY_PATH" path="${staf.install.dir}/lib"/>
     <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
     <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
     <env key="STAFCODEPAGE" value="LATIN_1"/>
     <env key="STAF_INSTANCE_NAME" value="STAF"/>
   </exec>
   <echo message="Waiting for service to become available..."/>
    <waitfor>
      <socket server="${host.name}" port="${staf.port}"/>
    </waitfor>
    <echo message="STAF is now ready to serve requests"/>
   </target>
  <target name="start-dont" if="staf.running">
    <echo>Staf is already running.</echo>
  </target>
  <target name="start" depends="status-do">
    <antcall target="start-do"/>
    <antcall target="start-dont"/>
  </target>
  <target name="start-nodetach">
    <property name="staf.spawn" value="false"/>
    <antcall target="start"/>
  </target>
<!-- Start section - bottom    -->
<!-- Stop section - top     -->
  <target name="stop-do" if="staf.running">
    <echo>Stopping staf...</echo>
    <exec
      executable="${staf.executable}"
      >
      <env key="${path.var}" path="${java.home}${file.separator}bin${path.separator}${staf.install.dir}${file.separator}bin${path.separator}${path.current}"/>
      <env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
      <arg line="local shutdown shutdown"/>
    </exec>
    <echo message="Waiting for service to shutdown gracefully..."/>
    <waitfor>
      <not>
        <socket server="${host.name}" port="${staf.port}"/>
      </not>
    </waitfor>
    <echo message="STAF stopped"/>
  </target>
  <target name="stop-dont" unless="staf.running">
    <echo>Staf is not running.</echo>
  </target>
  <target name="stop" depends="status-do">
    <antcall target="stop-do"/>
    <antcall target="stop-dont"/>
  </target>
<!-- Stop section - bottom  -->
<!-- Status section - top    -->
  <!-- Bits status section - top -->
    <target name="status-archive-downloaded?" if="bits.all.downloaded.before">
      <echo>Staf bits are ready to be installed. Use 'install' target.</echo>
    </target>
    <target name="status-archive-not-downloaded?" unless="bits.all.downloaded.before">
      <echo>No staf bits found. Use the get-bits or bootstrap target.</echo>
    </target>
  <!-- Bits status section - bottom -->
  <!-- Installation status section - top -->
    <target name="status-staf-installed?" if="staf.installed">
      <echo>Found staf installed in [${staf.install.dir}]</echo>
      <antcall target="status-staf-running?"       />
      <antcall target="status-staf-not-running?"   />
    </target>
    <target name="status-staf-not-installed?" unless="staf.installed">
      <echo>Could not find staf installation.</echo>
      <echo>Checking if the bits here and ready for installation...</echo>
      <antcall target="status-archive-downloaded?" />
      <antcall target="status-archive-not-downloaded?" />
    </target>
  <!-- Installation status section - bottom -->
  <!-- Running status section - top -->
    <target name="status-staf-running?" if="staf.running">
      <echo>staf is listening on port [${staf.port.default}]</echo>
      <echo>You're all set to run the stress tests.</echo>
    </target>
    <target name="status-staf-not-running?" unless="staf.running">
      <echo>staf is NOT running. Use the 'start' target.</echo>
    </target>
  <!-- Running status section - bottom -->
  <!-- Get status section - top -->
    <target name="status-do" unless="status-do.already.run" >
      <!-- check if the various archives needed have already been downloaded -->
      <condition property="bits.staf.downloaded.before">
        <available file="${bits.download.dir}/${bits.staf.archive}"/>
      </condition>
      <condition property="bits.services.downloaded.before" >
        <available file="${bits.download.dir}/${bits.stax.archive}" />
      </condition>
      <condition property="bits.all.downloaded.before">
        <and>
          <isset property="bits.staf.downloaded.before"/>
          <isset property="bits.services.downloaded.before"/>
        </and>
      </condition>
      <available file="${daily.package}" property="daily.package.downloaded"/>
      <available file="testcases/run-custom-suites.dat" property="custom-suites.on" />
      <available file="${staf.install.dir}"
                type="dir"
                property="staf.installed" />
      <condition property="staf.lib.dir"
        value="${staf.install.dir}${file.separator}bin"
        else="${staf.install.dir}${file.separator}lib">
        <os family="windows"/>
      </condition>
      <condition property="staf.running">
        <socket port="${staf.port}" server="${host.name}"/>
      </condition>
      <condition property="staf.archive.is.jar">
        <contains string="${bits.staf.archive}" substring=".jar"/>
      </condition>
      <condition property="staf.archive.is.tar">
        <not>
          <contains string="${bits.staf.archive}" substring=".jar"/>
        </not>
      </condition>
      <condition property="binary.extension" value=".exe" else="">
          <os family="windows"/>
      </condition>
      <condition property="script.extension" value=".bat" else="">
          <os family="windows"/>
      </condition>
      <condition property="path.var" value="Path" else="PATH">
        <os family="windows"/>
      </condition>
      <macrodef name="propertycopy">
        <attribute name="name"/>
        <attribute name="from"/>
        <sequential>
          <property name="@{name}" value="${@{from}}"/>
        </sequential>
      </macrodef>
      <property environment="e"/>
      <propertycopy name="path.current" from="e.${path.var}"/>
      <property name="staf.executable"
                value="${staf.bin.dir}${file.separator}STAF${binary.extension}"/>
      <property name="staf.daemon"
                value="${staf.bin.dir}${file.separator}STAFProc${binary.extension}"/>
      <property name="status-do.already.run" value="true"/>
    </target>
  <!-- Get status section - bottom -->
  <!-- Status cli section - top -->
    <target name="status" depends="status-do">
      <condition property="is.platform.supported" value="yes" else="no" >
        <isset property="platform.supported"/>
      </condition>
      <echo>Operating System Family  - ${os.myname}</echo>
      <echo>Operating System Name    - ${os.name}</echo>
      <echo>Operating System Version - ${os.version}</echo>
      <echo>Machine Architecture     - ${os.arch}</echo>
      <echo>Platform Supported       - ${is.platform.supported}</echo>
      <echo>Java Home                - ${java.home}</echo>
      <echo>Java Version             - ${java.version}</echo>
      <!--
      <echo>PATH                     - ${path.current}</echo>
      <echo>CLASSPATH                - ${e.CLASSPATH}</echo>
      -->
      <antcall target="status-staf-installed?"     />
      <antcall target="status-staf-not-installed?" />
    </target>
  <!-- Status cli section - bottom -->
<!-- Status section - bottom -->
<!-- Macros section - top -->
  <target name="bootstrap">
    <antcall target="download"  />
    <antcall target="install"   />
    <antcall target="start"     />
  </target>
  <target name="wipeout">
    <antcall target="stop"/>
    <echo>Allow a minute for STAF to bring all the JVMs down</echo>
    <sleep seconds="60"/>
    <antcall target="uninstall"/>
  </target>
  <target name="restart">
    <antcall target="stop"  inheritAll="false" />
    <sleep seconds="10"                        />
    <antcall target="start" inheritAll="false" />
  </target>
<!--  Macros section - bottom -->
  <target name="javadoc" depends="status-do" if="staf.installed">
    <delete dir="${staf.home}/doc"/>
    <mkdir dir="${staf.home}/doc"/>
    <java jar="${staf.install.dir}/services/stax/STAXDoc.jar" fork="true">
      <arg value="-d"/>
      <arg value="${staf.home}/doc"/>
      <!--<arg value="testcases"/>
      <arg value="testcases/aci"/>
      <arg value="testcases/backends"/>
      <arg value="testcases/core"/>
      <arg value="testcases/schema"/>
      <arg value="testcases/security"/>
      <arg value="testcases/security/account_activation"/>
      <arg value="testcases/security/auth_pwd_syntax"/>
      <arg value="testcases/security/bind_no_pwd"/>
      <arg value="testcases/security/jks"/>
      <arg value="testcases/security/pkcs12"/>
      <arg value="testcases/security/pwd_policy"/>
      <arg value="testcases/security/pwd_policy_root"/>
      <arg value="testcases/security/pwd_storage"/>
      <arg value="testcases/security/pwd_validator"/>
      <arg value="testcases/security/sasl"/>
      <arg value="testcases/security/startTLS"/>-->
      <arg value="shared/functions"/>
      <arg value="testcases/sample" />
    </java>
  </target>
  <target name="properties">
    <echoproperties/>
  </target>
  <target name="get-dtd" depends="status-do">
    <property name="stax.dtd" value="${staf.home}/stax.dtd"/>
    <exec
      dir="${staf.bin.dir}"
      executable="${staf.executable}"
      output="${stax.dtd}"
      >
      <arg line="LOCAL STAX get dtd"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="LD_LIBRARY_PATH" value="${staf.lib.dir}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
    </exec>
    <replace file="${stax.dtd}">
      <replacetoken>Response
--------
</replacetoken>
      <replacevalue></replacevalue>
    </replace>
  </target>
  <target name="generate-report">
    <delete file="${staf.tmp.dir}/my-report.html"/>
    <xslt processor="trax"
          in="${staf.tmp.dir}/tests-log.xml"
          out="${staf.tmp.dir}/my-report.html"
          style="shared/xsl/my-report.xsl">
    </xslt>
  </target>
  <target name="opends">
    <ant dir="../.." target="package" inheritAll="false" />
  </target>
</project>
opends/tests/stress-tests/staf-installer/Linux.properties
New file
@@ -0,0 +1 @@
bits.staf.archive=STAF323-setup-linux.jar
opends/tests/stress-tests/staf-installer/SunOS-sparc.properties
New file
@@ -0,0 +1 @@
bits.staf.archive=STAF322-setup-solaris-sparc.jar
opends/tests/stress-tests/staf-installer/SunOS-x86.properties
New file
@@ -0,0 +1 @@
bits.staf.archive=STAF323-setup-solaris-x86.jar
opends/tests/stress-tests/staf-installer/SunOS.properties
opends/tests/stress-tests/staf-installer/config.py.stubs
New file
@@ -0,0 +1,30 @@
TEST_OS_STRING              = '${os.name}'
TEST_HW_STRING              = '${os.arch}'
TEST_JVM_STRING             = '${java.version}(${sun.arch.data.model} bits)'
STAF_LOCAL_HOSTNAME         = 'localhost'
STAF_REMOTE_HOSTNAME        = 'localhost'
TMPDIR                      = '${staf.tmp.dir}'
PSWDFILE                    = '%s/password' % TMPDIR
OPENDSDIR                   = '${project.home}'
OPENDSNAME                  = '${product.name}'
ZIPNAME                     = '${product.name}.zip'
ZIPPATH                     = '${product.package.dir}'
TESTS_ROOT                  = '%s/tests' % OPENDSDIR
TESTS_DIR                   = '%s/stress-tests' % TESTS_ROOT
TESTS_SHARED_DIR            = '%s/shared' % TESTS_DIR
TESTS_FUNCTIONS_DIR         = '%s/shared/functions' % TESTS_ROOT
TESTS_DATA_DIR              = '%s/data' % TESTS_SHARED_DIR
TESTS_JAVA_DIR          = '%s/java' % TESTS_SHARED_DIR
DIRECTORY_INSTANCE_DN       = '${opends.admin.dn}'
DIRECTORY_INSTANCE_PSWD     = '${opends.admin.pwd}'
DIRECTORY_INSTANCE_DIR      = '%s' % TMPDIR
DIRECTORY_INSTANCE_HOST     = 'localhost'
DIRECTORY_INSTANCE_PORT     = '${opends.port.ldap}'
DIRECTORY_INSTANCE_SSL_PORT = '${opends.port.ldaps}'
DIRECTORY_INSTANCE_SFX      = 'dc=com'
DIRECTORY_INSTANCE_BE       = 'userRoot'
JAVA_HOME                   = '${java.home}'
LOGS_ROOT                   = '%s' % TMPDIR
LOGS_URI                    = ''
SEND_MAIL_AFTER_TEST_RUN    = '${staf.email.send}'
SEND_MAIL_TO                = '${staf.email.to}'
opends/tests/stress-tests/staf-installer/failure.html
New file
@@ -0,0 +1,7 @@
<html>
  <body>
    <center>
      <img src="http://pangea.stanford.edu/courses/GES41L/motivation/failure.gif">
    </center>
  </body>
</html>
opends/tests/stress-tests/staf-installer/replay.bat
New file
@@ -0,0 +1,11 @@
@echo off
echo Backing configuration up
move "${tests.config}" "${tests.config.backup}"
echo Loading configuration as of ${tests.run.time}
copy "${tests.run.dir}${file.separator}${tests.run.time}${file.separator}config${file.separator}${tests.config.file}" "${tests.config}"
echo Starting test run
"${staf.install.dir}${file.separator}bin${file.separator}STAF.exe" local STAX "${tests.request}"
echo Removing configuration of ${tests.run.time}
del /f "${tests.config}"
echo Restoring original configuration
move "${tests.config.backup}" "${tests.config}"
opends/tests/stress-tests/staf-installer/replay.sh
New file
@@ -0,0 +1,10 @@
echo "Backing configuration up"
me "${tests.config}" "${tests.config.backup}"
echo "Loading configuration as of ${tests.run.time}"
cp "${tests.run.dir}${file.separator}${tests.run.time}${file.separator}config${file.separator}${tests.config.file}" "${tests.config}"
echo "Starting test run"
"${staf.install.dir}${file.separator}bin${file.separator}STAF" local STAX "${tests.request}"
echo "Removing configuration of ${tests.run.time}"
rm -f "${tests.config}"
echo "Restoring original configuration"
mv "${tests.config.backup}" "${tests.config}"
opends/tests/stress-tests/staf-installer/staf-installer.properties
New file
@@ -0,0 +1,83 @@
# Global section - top
host.name=localhost
# Global section - bottom
# Staf section - top
staf.home=${project.home}${file.separator}tests${file.separator}stress-run
staf.installer.dir=${basedir}${file.separator}staf-installer
staf.install.dir=${staf.home}${file.separator}staf
staf.bin.dir=${staf.install.dir}${file.separator}bin
staf.config.dir=${staf.home}${file.separator}config
staf.config.file=stress-tests.cfg
staf.config=${staf.config.dir}${file.separator}${staf.config.file}
staf.config.stubs=${staf.installer.dir}${file.separator}${staf.config.file}
staf.tmp.dir=${staf.home}${file.separator}tmp
staf.logs.dir=${staf.home}${file.separator}logs
#
staf.email.send=false
staf.email.to=
daily.build.time=213000
daily.build.url=http://builds.opends.org/daily-builds/
## TCP port on which to configure staf to listen
## leave as is unless this port is already in use on your test machine
staf.port.default=6500
staf.port=${staf.port.default}
# Staf section - bottom
#opends section - top
opends.port.ldap=1389
opends.port.ldaps=1636
opends.port.jmx=1689
opends.admin.dn=cn=myself
opends.admin.pwd=password
# opends section - bottom
# email section - top
email.enabled=n
email.to=${user.name}@${host.name}
email.from=${user.name}@${host.name}
email.server.host=${host.name}
email.server.port=25
email.server.user=
email.server.pwd=
# email section - bottom
# Downloader section - top
## where to download the staf bits before install
bits.download.dir=${staf.home}${file.separator}staf-bits
bits.download.url=http://superb-east.dl.sourceforge.net/sourceforge/staf
bits.email.archive=EmailV320.zip
bits.event.archive=EventV310.zip
bits.eventmanager.archive=EventManagerV322.zip
bits.stax.archive=STAXV321.zip
# Downloader section - bottom
# Proxy section - top
## set to match your own proxy if any
proxy.host=webcache.central.sun.com
proxy.port=8080
proxy.user=
proxy.pass=
# Proxy section - bottom
# Tests section - top
tests.dir=${basedir}
tests.run.dir=${staf.home}${file.separator}run
tests.config.dir=${tests.dir}${file.separator}config
tests.config.file=config.py
tests.config.stubs=${staf.installer.dir}${file.separator}${tests.config.file}.stubs
tests.config=${tests.config.dir}${file.separator}${tests.config.file}
tests.config.backup=${tests.config}.orig
tests.python=${tests.dir}${file.separator}..${file.separator}shared${file.separator}python${file.separator}security.py
tests.xml=${tests.dir}${file.separator}testcases${file.separator}runTestJob.xml
# Tests section - bottom
# test plan customization - top  <property name="test.plan.file" value="${basedir}/testcases/run-custom-suites.dat" />
test.plan.list=main_import_ldif
test.plan.dir=testcases
test.plan.custom=${test.plan.dir}/run-custom-suites.dat
test.plan.default=${test.plan.dir}/run-default-suites.dat
# test plan customization - bottom
opends/tests/stress-tests/staf-installer/stress-tests.cfg
New file
@@ -0,0 +1,51 @@
# Turn on tracing of internal errors and deprecated options
trace enable tracepoints "error deprecated"
# Enable TCP/IP connections
interface tcp library STAFTCP option port=${staf.port}
# Set default local trust
trust machine local://local level 5
trust level 5 machine tcp://localhost
# this is required for the Zip Service to be able to expand archives
trust level 5 user anonymous
# Default Service Loader Service
serviceloader library STAFDSLS
# LOG SERVICE CONFIGURATION
SERVICE Log LIBRARY STAFLog \
  PARMS "Directory {STAF/Config/STAFRoot}/../logs"
# ZIP SERVICE CONFIGURATION
SERVICE Zip LIBRARY STAFZip
# EVENT SERVICE CONFIGURATION
#  PARMS "MAXATTEMPTS 5 ACKNOWLEDGETIMEOUT 30000" \
#  OPTION JVMName=EventJVM \
#  OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
SERVICE Event LIBRARY JSTAF \
  EXECUTE {STAF/Config/STAFRoot}/services/event/STAFEvent.jar
# EVENTMANAGER SERVICE CONFIGURATION
#  OPTION JVMName=EventManagerJVM \
#  OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
#  PARMS "EVENTSERVICENAME=Event" \
SERVICE EventManager LIBRARY JSTAF \
  EXECUTE {STAF/Config/STAFRoot}/services/eventmanager/STAFEventManager.jar
# STAX SERVICE CONFIGURATION
#  OPTION JVMName=StaxJVM \
#  OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension} \
#  OPTION J2=-Xmx384m
SERVICE Stax LIBRARY JSTAF \
  EXECUTE {STAF/Config/STAFRoot}/services/stax/STAX.jar
#EMAIL SERVICE CONFIGURATION
#  OPTION JVMName=EmailJVM \
#  OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
SERVICE Email LIBRARY JSTAF \
  EXECUTE {STAF/Config/STAFRoot}/services/email/STAFEmail.jar
SET MAXQUEUESIZE 10000
opends/tests/stress-tests/staf-installer/windows-x86-32.properties
New file
@@ -0,0 +1,2 @@
bits.staf.archive=STAF323-setup-win32.jar
opends/tests/stress-tests/staf-installer/windows-x86-64.properties
New file
@@ -0,0 +1 @@
staf.archive.name=STAF323-setup-win64.jar
opends/tests/stress-tests/staf-installer/windows.properties
New file
@@ -0,0 +1,2 @@
bits.staf.archive=STAF323-setup-win32.jar
opends/tests/stress-tests/testcases/import_ldif/import_ldif.xml
New file
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_import_ldif"/>
  <function name="main_import_ldif">
    <sequence>
      <block name="'import-ldif'">
        <sequence>
          <script>
            CurrentTestPath['group']='import-ldif'
            bin_attr_filename='import_entries_100k_bin_attr.ldif'
          </script>
          <call function="'testGroup_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_bin_attr.xml' % (TESTS_DIR)"/>
          <call function="'bin_attr'" />
          <!-- Uncomment when Issue 2323 is fixed.
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_large_import_buffer.xml' % (TESTS_DIR)"/>
          <call function="'large_import_buffer'" />
          -->
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_many_thrds.xml' % (TESTS_DIR)"/>
          <call function="'many_thrds'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_low_index_entry_limit.xml' % (TESTS_DIR)"/>
          <call function="'low_index_entry_limit'" />
          <!-- Uncomment when Issues 2258 and 2262 are fixed.
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_out-of-box.xml' % (TESTS_DIR)"/>
          <call function="'out-of-box'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_many_indexes.xml' % (TESTS_DIR)"/>
          <call function="'many_indexes'" />
          -->
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_tasks_bin_attr.xml' % (TESTS_DIR)"/>
          <call function="'tasks_bin_attr'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml' % (TESTS_DIR)"/>
          <call function="'tasks_bin_attr_with_load'" />
          <call function="'testGroup_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_bin_attr.xml
New file
@@ -0,0 +1,210 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="bin_attr"/>
  <function name="bin_attr">
    <sequence>
      <block name="'bin-attr'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='bin_attr'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Binary Attribute: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <script>
                    import os.path
                    curr_filename=logsRemoteDataDir + r"/../../" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
                      'Import Ldif: Binary Attribute: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
                </message>
                <if expr="curr_file_exists=='0'">
                  <sequence>
                    <message>
                    'Import Ldif Tasks: Binary Attribute: Preamble - Make an make-ldif template file'
                    </message>
                    <call function="'MakeAMakeLdifTemplate'">
                    { 'numEntries'         : numberOfEntries ,
                      'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                      'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                    </call>
                    <message>
                      'Import Ldif Tasks: Binary Attribute: Preamble - Make the ldif file'
                    </message>
                    <call function="'MakeLdif'">
                    { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                      'ldifFile'       : curr_filename  }
                    </call>
                  </sequence>
                </if>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Binary Attribute: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : curr_filename ,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'Processed 100002 entries' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Binary Attribute: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 5 ,
                    'noOfMilliSeconds' : 5000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Binary Attribute: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_cleanup.xml
New file
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="import_ldif_cleanup"/>
  <function name="import_ldif_cleanup">
    <sequence>
      <block name="'cleanup'">
        <sequence>
          <block name="'Block DS Process Stop'">
          <!--- Stop DS -->
        <sequence>
              <message>
                 'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
              </message>
              <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
        </sequence>
          <!--- End Block DS Process Stop -->
          </block>
      <block name="'Block Remove DS Topology'">
      <!-- Remove  the topology created for the test suite -->
      <sequence>
              <message>
                 'Remove DS topology created for the Test Suite'
              </message>
        <call function="'removeTopology'"/>
        <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
      </sequence>
      <!-- End Block Remove DS Topology-->
      </block>
        </sequence>
      </block>
     </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_large_import_buffer.xml
New file
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="large_import_buffer"/>
  <function name="large_import_buffer">
    <sequence>
      <block name="'large-import-buffer'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='large_import_buffer'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Large Import Buffer: Preamble - Change import buffer size'
                </message>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'set-backend-prop' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--set "backend-import-buffer-size:5 gb" --set backend-import-pass-size:10000 --set backend-import-queue-size:1000' ,
                    'expectedRC'           : 0 }
                  </call>
                <message>
                 'Import Ldif: Large Import Buffer: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <message>
                   'Import Ldif: Large Import Buffer: Preamble - Make an make-ldif template file'
                </message>
                <script>
                    numberOfEntries='100000'
                </script>
                <call function="'MakeAMakeLdifTemplate'">
                  { 'numEntries'         : numberOfEntries ,
                    'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                    'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                </call>
                <message>
                   'Import Ldif: Large Import Buffer: Preamble - Make the ldif file'
                </message>
                <call function="'MakeLdif'">
                  { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                    'ldifFile'       : '%s/quickstart/import_Entries.ldif' % (logsRemoteDataDir)  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Large Import Buffer: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : '%s/quickstart/import_Entries.ldif' % logsRemoteDataDir,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'Processed 100002 entries' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Large Import Buffer: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 5 ,
                    'noOfMilliSeconds' : 5000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Large Import Buffer: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_low_index_entry_limit.xml
New file
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="low_index_entry_limit"/>
  <function name="low_index_entry_limit">
    <sequence>
      <block name="'low-index-entry-limit'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='low_index_entry_limit'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Low Index Entry Limit: Preamble - Change import thread count'
                </message>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'set-backend-prop' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--set index-entry-limit:4' ,
                    'expectedRC'           : 0 }
                  </call>
                <message>
                 'Import Ldif: Low Index Entry Limit: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <script>
                    import os.path
                    curr_filename=logsRemoteDataDir + r"/../../" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
                      'Import Ldif Tasks: Low Index Entry Limit: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
                </message>
                <if expr="curr_file_exists=='0'">
                  <sequence>
                    <message>
                    'Import Ldif Tasks: Low Index Entry Limit: Preamble - Make an make-ldif template file'
                    </message>
                    <call function="'MakeAMakeLdifTemplate'">
                    { 'numEntries'         : numberOfEntries ,
                      'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                      'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                    </call>
                    <message>
                      'Import Ldif Tasks: Low Index Entry Limit: Preamble - Make the ldif file'
                    </message>
                    <call function="'MakeLdif'">
                    { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                      'ldifFile'       : curr_filename  }
                    </call>
                  </sequence>
                </if>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Low Index Entry Limit: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : curr_filename ,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'Processed 100002 entries' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Low Index Entry Limit: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 12 ,
                    'noOfMilliSeconds' : 300000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Low Index Entry Limit: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_many_indexes.xml
New file
@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="many_indexes"/>
  <function name="many_indexes">
    <sequence>
      <block name="'many-indexes'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='many-indexes'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Indexes: Preamble - Create many indexes'
                </message>
                <script>
                  indexes_five = ['cn', 'givenName', 'sn', 'uid']
                </script>
                <iterate var="currIndex" in="indexes_five" indexvar="index">
                  <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'set-je-index-prop' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name %s --set index-type:approximate --set index-type:equality --set index-type:ordering --set index-type:presence --set index-type:substring ' % currIndex ,
                    'expectedRC'           : 0 }
                  </call>
                </iterate>
                <script>
                  indexes_three = ['aci', 'mail', 'member', 'objectclass', 'telephonenumber', 'uniquemember']
                </script>
                <iterate var="currIndex" in="indexes_three" indexvar="index">
                  <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'set-je-index-prop' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name %s --set index-type:equality --set index-type:presence --set index-type:substring ' % currIndex ,
                    'expectedRC'           : 0 }
                  </call>
                </iterate>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'create-je-index' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name description --set index-type:approximate --set index-type:equality --set index-type:presence --set index-type:substring ' ,
                    'expectedRC'           : 0 }
                </call>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'create-je-index' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--index-name employeeNumber --set index-type:approximate --set index-type:equality --set index-type:ordering --set index-type:presence --set index-type:substring ' ,
                    'expectedRC'           : 0 }
                </call>
                <message>
                 'Import Ldif: Many Indexes: Preamble - List indexes'
                </message>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'list-je-indexes' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'expectedRC'           : 0 }
                </call>
                <message>
                 'Import Ldif: Many Indexes: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <message>
                   'Import Ldif: Many Indexes: Preamble - Make an make-ldif template file'
                </message>
                <script>
                    numberOfEntries='160'
                </script>
                <call function="'MakeAMakeLdifTemplate'">
                  { 'numEntries'         : numberOfEntries ,
                    'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) }
                </call>
                <message>
                   'Import Ldif: Many Indexes: Preamble - Make the ldif file'
                </message>
                <call function="'MakeLdif'">
                  { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                    'ldifFile'       : '%s/quickstart/import_Entries.ldif' % (logsRemoteDataDir)  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Many Indexes: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : '%s/quickstart/import_Entries.ldif' % logsRemoteDataDir,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'skipped 0, rejected 0' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Indexes: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 5 ,
                    'noOfMilliSeconds' : 2000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Indexes: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.100,ou=People,dc=com' ,
                                       'uid=user.159,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_many_thrds.xml
New file
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="many_thrds"/>
  <function name="many_thrds">
    <sequence>
      <block name="'many-thrds'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='many_thrds'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Threads: Preamble - Change import thread count'
                </message>
                <call function="'dsconfig'">
                  { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
                    'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
                    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
                    'subcommand'           : 'set-backend-prop' ,
                    'objectType'           : 'backend-name' ,
                    'objectName'           : 'userRoot',
                    'optionsString'        : '--set import-thread-count:2048' ,
                    'expectedRC'           : 0 }
                  </call>
                <message>
                 'Import Ldif: Many Threads: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <script>
                    import os.path
                    curr_filename=logsRemoteDataDir + r"/../../" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
                      'Import Ldif Tasks: Many Threads: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
                </message>
                <if expr="curr_file_exists=='0'">
                  <sequence>
                    <message>
                    'Import Ldif Tasks: Many Threads: Preamble - Make an make-ldif template file'
                    </message>
                    <call function="'MakeAMakeLdifTemplate'">
                    { 'numEntries'         : numberOfEntries ,
                      'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                      'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                    </call>
                    <message>
                      'Import Ldif Tasks: Many Threads: Preamble - Make the ldif file'
                    </message>
                    <call function="'MakeLdif'">
                    { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                      'ldifFile'       : curr_filename  }
                    </call>
                  </sequence>
                </if>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Many Threads: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : curr_filename ,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'Processed 100002 entries' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Threads: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 12 ,
                    'noOfMilliSeconds' : 300000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Many Threads: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_out-of-box.xml
New file
@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="out-of-box"/>
  <function name="out-of-box">
    <sequence>
      <block name="'out-of-box'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='out-of-box'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Out-Of-Box: Preamble - Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StopDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME,
                  'dsHost'    : DIRECTORY_INSTANCE_HOST,
                  'dsPort'    : DIRECTORY_INSTANCE_PORT,
                  'dsBindDN'  : DIRECTORY_INSTANCE_DN,
                  'dsBindPwd' : DIRECTORY_INSTANCE_PSWD }
                </call>
                <message>
                   'Import Ldif: Out-Of-Box: Preamble - Make an make-ldif template file'
                </message>
                <script>
                    numberOfEntries='15000000'
                </script>
                <call function="'MakeAMakeLdifTemplate'">
                  { 'numEntries'         : numberOfEntries ,
                    'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) }
                </call>
                <message>
                   'Import Ldif: Out-Of-Box: Preamble - Make the ldif file'
                </message>
                <call function="'MakeLdif'">
                  { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                    'ldifFile'       : '%s/quickstart/import_Entries.ldif' % (logsRemoteDataDir)  }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif: Out-Of-Box: Import large ldif file'
                </message>
                <call function="'ImportLdifWithScript'">
                { 'location'    : STAF_REMOTE_HOSTNAME ,
                  'dsLdifFile'  : '%s/quickstart/import_Entries.ldif' % logsRemoteDataDir,
                  'dsBackEnd'   : 'userRoot'}
                </call>
                <script>
                 returnString = STAXResult[0][1]
                </script>
                <call function="'checktestString'">
                    { 'returnString'       : returnString ,
                      'expectedString'     : 'skipped 0, rejected 0' }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Start Directory After Import')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Out-Of-Box: Start DS running on port %s' % (DIRECTORY_INSTANCE_PORT)
                </message>
                <call function="'StartDsWithScript'">
                { 'location'  : STAF_REMOTE_HOSTNAME }
                </call>
                <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
                </call>
                <!--- Check that DS started -->
                <call function="'isAlive'">
                  { 'noOfLoops'        : 120 ,
                    'noOfMilliSeconds' : 600000 }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif: Out-Of-Box: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.100000,ou=People,dc=com' ,
                                       'uid=user.1000000,ou=People,dc=com' ,
                                       'uid=user.14000000,ou=People,dc=com' ,
                                       'uid=user.14999999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_setup.xml
New file
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="import_ldif_setup"/>
  <function name="import_ldif_setup">
    <function-map-args>
      <function-arg-def name="startDS" type="optional" default="True">
        <function-arg-description>
          Optional start the Directory Server
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>
    <function-arg-def name="loadBackend" type="optional" default="False">
      <function-arg-description>
      Specifies whether the backend should be loaded with some data.
    </function-arg-description>
    <function-arg-property name="type" value="boolean"/>
    </function-arg-def>
  </function-map-args>
    <sequence>
      <block name="'setup'">
        <sequence>
      <block name="'Block Create DS Topology'">
      <!-- Create the topology necessary to the test group/suite -->
        <sequence>
              <message>
                 'Create DS topology as described in config.py'
              </message>
        <call function="'createTopology'">
          { 'initialiseInstance' : False }
        </call>
        <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block Create DS Topology -->
          </block>
          <if expr="loadBackend == True">
      <block name="'Block DS Load Data'">
      <!-- Load the data needed by the test suite -->
        <sequence>
              <message>
                'Import Ldif: Small Initial Import'
              </message>
              <call function="'importLdif'">
                { 'ldifFile'    : '%s/import_ldif/import_ldif_start.ldif' % logsRemoteDataDir }
              </call>
              <call function="'checkRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult }
              </call>
            </sequence>
          <!--- End Block DS Load Data -->
      </block>
      </if>
      <if expr="startDS == True">
      <block name="'Block DS Process Active'">
          <!--- Start DS -->
        <sequence>
              <message>
                 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
              </message>
              <!--- Start DS -->
              <call function="'StartDsWithScript'">
               { 'location'  : STAF_REMOTE_HOSTNAME }
              </call>
              <call function="'checkRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult }
              </call>
              <!--- Check that DS started -->
              <call function="'isAlive'">
                { 'noOfLoops'        : 5 ,
                  'noOfMilliSeconds' : 2000 }
              </call>
            </sequence>
          <!--- End Block DS Process Active -->
          </block>
      </if>
        </sequence>
      </block>
     </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr.xml
New file
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="tasks_bin_attr"/>
  <function name="tasks_bin_attr">
    <sequence>
      <block name="'tasks-bin-attr'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='tasks_bin_attr'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <script>
                    import os.path
                    curr_filename=logsRemoteDataDir + r"/../../" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
                      'Import Ldif Tasks: Binary Attribute: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
                </message>
                <if expr="curr_file_exists=='0'">
                  <sequence>
                    <message>
                    'Import Ldif Tasks: Binary Attribute: Preamble - Make an make-ldif template file'
                    </message>
                    <call function="'MakeAMakeLdifTemplate'">
                    { 'numEntries'         : numberOfEntries ,
                      'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                      'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                    </call>
                    <message>
                      'Import Ldif Tasks: Binary Attribute: Preamble - Make the ldif file'
                    </message>
                    <call function="'MakeLdif'">
                    { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                      'ldifFile'       : curr_filename  }
                    </call>
                  </sequence>
                </if>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif Tasks: Binary Attribute: Import large ldif file'
                </message>
                <call function="'importLdifTask'">
                { 'dsInstanceHost'              : DIRECTORY_INSTANCE_HOST,
                  'dsInstancePort'              : DIRECTORY_INSTANCE_PORT,
                  'dsInstanceDn'                : DIRECTORY_INSTANCE_DN,
                  'dsInstancePswd'              : DIRECTORY_INSTANCE_PSWD,
                  'taskID'                      : STAXCurrentTestcase,
                  'ldifFile'                    : curr_filename ,
                  'numLdapCheckTries'           : 1000,
                  'sleepBetweenLdapCheckTries'  : 300000
                }
              </call>
              <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult
                }
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif Tasks: Binary Attribute: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/import_ldif_tasks_bin_attr_with_load.xml
New file
@@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="tasks_bin_attr_with_load"/>
  <function name="tasks_bin_attr_with_load">
    <sequence>
      <block name="'tasks-bin-attr-with-load'">
        <sequence>
          <script>
            if not CurrentTestPath.has_key('group'):
              CurrentTestPath['group']='tasks_bin_attr_with_load'
            CurrentTestPath['suite']=STAXCurrentBlock
          </script>
          <call function="'testSuite_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_setup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_setup'" />
          <testcase name="getTestCaseName('Preamble - import 100 entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                   'Import Ldif Tasks: Binary Attribute With Load: Preamble - Make an make-ldif template file'
                </message>
                <script>
                    numberOfEntries='100'
                </script>
                <call function="'MakeAMakeLdifTemplate'">
                  { 'numEntries'         : numberOfEntries ,
                    'templateFile'       : '%s/quickstart/import_100Entries.template' % (logsRemoteDataDir) }
                </call>
                <message>
                   'Import Ldif Tasks: Binary Attribute With Load: Preamble - Make the ldif file'
                </message>
                <call function="'MakeLdif'">
                  { 'templateFile'   : '%s/quickstart/import_100Entries.template' % (logsRemoteDataDir)  ,
                    'ldifFile'       : '%s/quickstart/import_100Entries.ldif' % (logsRemoteDataDir)  }
                </call>
                <message>
                   'Import Ldif Tasks: Binary Attribute With Load: Import large ldif file'
                </message>
                <call function="'importLdifTask'">
                { 'dsInstanceHost'              : DIRECTORY_INSTANCE_HOST,
                  'dsInstancePort'              : DIRECTORY_INSTANCE_PORT,
                  'dsInstanceDn'                : DIRECTORY_INSTANCE_DN,
                  'dsInstancePswd'              : DIRECTORY_INSTANCE_PSWD,
                  'taskID'                      : STAXCurrentTestcase,
                  'ldifFile'                    : '%s/quickstart/import_100Entries.ldif' % logsRemoteDataDir
                }
                </call>
                <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult
                }
                </call>
               <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          <testcase name="getTestCaseName('Preamble - prepare many entries for import')">
             <sequence>
               <call function="'testCase_Preamble'"/>
               <script>
                    import os.path
                    curr_filename=logsRemoteDataDir + r"/../../" + bin_attr_filename
                    curr_file_exists='0'
                    if os.path.exists(curr_filename):
                      curr_file_exists='1'
                    numberOfEntries='100000'
                </script>
                <message>
                      'Import Ldif Tasks: Binary Attribute: Looking for file, %s. File exists? (0=false, 1=true) %s' % (curr_filename, curr_file_exists)
                </message>
                <if expr="curr_file_exists=='0'">
                  <sequence>
                    <message>
                    'Import Ldif Tasks: Binary Attribute: Preamble - Make an make-ldif template file'
                    </message>
                    <call function="'MakeAMakeLdifTemplate'">
                    { 'numEntries'         : numberOfEntries ,
                      'templateFile'       : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir) ,
                      'extraLine'          : 'jpegPhoto;binary:: &lt;random:base64:38000&gt;'}
                    </call>
                    <message>
                      'Import Ldif Tasks: Binary Attribute: Preamble - Make the ldif file'
                    </message>
                    <call function="'MakeLdif'">
                    { 'templateFile'   : '%s/quickstart/import_Entries.template' % (logsRemoteDataDir)  ,
                      'ldifFile'       : curr_filename  }
                    </call>
                  </sequence>
                </if>
                <call function="'testCase_Postamble'"/>
              </sequence>
            </testcase>
            <script>
              clientList = ['dummyClient1', 'dummyClient2', 'dummyClient3', 'dummyClient4',
                            'dummyClient5', 'dummyClient6', 'dummyClient7', 'dummyClient8',
                            'dummyClient9', 'dummyClient10', 'dummyClient11', 'dummyClient12',
                            'dummyClient13', 'dummyClient14', 'dummyClient15', 'dummyClient16']
            </script>
            <testcase name="getTestCaseName('Import Large Ldif File')">
              <parallel>
                <sequence>
                  <call function="'testCase_Preamble'"/>
                  <message>
                   'Import Ldif Tasks: Binary Attribute With Load: Import Large Ldif File - Sleep 2 s to ensure modify load starts'
                  </message>
                  <call function="'Sleep'">
                  { 'sleepForMilliSeconds' : 2000 }
                  </call>
                  <message>
                   'Import Ldif Tasks: Binary Attribute With Load: Import Large Ldif File - Add import task'
                  </message>
                  <call function="'importLdifTask'">
                  { 'dsInstanceHost'              : DIRECTORY_INSTANCE_HOST,
                    'dsInstancePort'              : DIRECTORY_INSTANCE_PORT,
                    'dsInstanceDn'                : DIRECTORY_INSTANCE_DN,
                    'dsInstancePswd'              : DIRECTORY_INSTANCE_PSWD,
                    'taskID'                      : STAXCurrentTestcase,
                    'ldifFile'                    : curr_filename ,
                    'numLdapCheckTries'           : 1000,
                    'sleepBetweenLdapCheckTries'  : 300000
                  }
                  </call>
                  <call function="'checktestRC'">
                  { 'returncode' : RC ,
                    'result'     : STAXResult
                  }
                  </call>
                  <iterate var="mlClient" in="clientList" indexvar="index">
                    <terminate block="'main.import-ldif.tasks-bin-attr-with-load.ModifyLoad_%s' % mlClient"/>
                  </iterate>
                  <call function="'testCase_Postamble'"/>
                </sequence>
                <paralleliterate var="client" in="clientList">
                  <sequence>
                    <block name="'ModifyLoad_%s' % client">
                      <loop>
                        <sequence>
                          <call function="'loadOfModifies'">
                          { 'dsInstanceHost'         : DIRECTORY_INSTANCE_HOST ,
                            'dsInstancePort'         : DIRECTORY_INSTANCE_PORT ,
                            'dsInstanceDn'           : DIRECTORY_INSTANCE_DN ,
                            'dsInstancePswd'         : DIRECTORY_INSTANCE_PSWD ,
                            'partialDNToModify'      : 'ou=People,dc=com' ,
                            'attributeName'          : 'description' ,
                            'newAttributeValue'      : 'Modify load forever' ,
                            'changetype'             : 'replace',
                            'numEntries'             : '100' ,
                            'clientID'               : client }
                          </call>
                          <if expr="STAXCode == 32" >
                            <break/>
                          </if>
                        </sequence>
                      </loop>
                    </block>
                  </sequence>
                </paralleliterate>
              </parallel>
            </testcase>
          <testcase name="getTestCaseName('Search For Imported Entries')">
              <sequence>
                <call function="'testCase_Preamble'"/>
                <message>
                 'Import Ldif Tasks: Binary Attribute With Load: Search for certain entries that were imported'
                </message>
                <call function="'checkImport'">
                { 'expectedEntries' : ['uid=user.1,ou=People,dc=com' ,
                                       'uid=user.10000,ou=People,dc=com' ,
                                       'uid=user.20000,ou=People,dc=com' ,
                                       'uid=user.30000,ou=People,dc=com' ,
                                       'uid=user.40000,ou=People,dc=com' ,
                                       'uid=user.50000,ou=People,dc=com' ,
                                       'uid=user.60000,ou=People,dc=com' ,
                                       'uid=user.70000,ou=People,dc=com' ,
                                       'uid=user.80000,ou=People,dc=com' ,
                                       'uid=user.90000,ou=People,dc=com' ,
                                       'uid=user.99999,ou=People,dc=com'] ,
                  'startDS'         : 'no'
                }
                </call>
                <call function="'testCase_Postamble'"/>
              </sequence>
          </testcase>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/import_ldif/import_ldif_cleanup.xml' % (TESTS_DIR)"/>
          <call function="'import_ldif_cleanup'" />
          <call function="'testSuite_Postamble'"/>
        </sequence>
      </block>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/runStressTests.xml
New file
@@ -0,0 +1,245 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main" />
  <function name="main">
    <sequence>
      <!--- Load the environment for the test suite execution -->
      <import machine="STAF_LOCAL_HOSTNAME"
              file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
      <call function="'loadEnvironment'" />
      <!-- The Functional Tests -->
      <import machine="STAF_LOCAL_HOSTNAME"
              file="'%s/testcases/import_ldif/import_ldif.xml' % TESTS_DIR" />
      <script>
        # this function return a well-formatted testcase name
        def getTestCaseName(name):
          return '%s: %s: %s' % (CurrentTestPath['group'],CurrentTestPath['suite'],name)
        # this functions adds a known issue to a testcase's known issues list
        issuesList=[]
        def knownIssue(issue):
          issuesList.append(issue)
        class functionToRun:
          def __init__(self, name):
            self.name = name
          def getName(self):
            return self.name
        testlog=open('%s/tests-log.xml' % TMPDIR,'w')
        testlog.write('&lt;qa&gt;\n')
        testlog.write('  &lt;functional-tests&gt;\n')
        testlog.write('    &lt;results&gt;\n')
        testlog.close()
        suitesFileName='%s/testcases/run-custom-suites.dat' % TESTS_DIR
        if not os.path.exists(suitesFileName):
          suitesFileName='%s/testcases/run-default-suites.dat' % TESTS_DIR
        f = open(suitesFileName, 'r')
        functionsToRun = []
        for line in f.readlines():
          functionsToRun.append(functionToRun(line.rstrip()))
        f.close()
      </script>
      <iterate var="function" in="functionsToRun">
        <sequence>
          <message>'calling function [%s]' % function.getName()</message>
          <call function="function.getName()" />
        </sequence>
      </iterate>
      <!-- in this section we'll compute the coverage for all the tests
           if coverage is turned on
           so far I could only get through this on either machines with a lot
           of memory or small sets of tests
      -->
      <if expr="os.path.exists('%s/lib/emma.jar' % dsPath)">
        <sequence>
          <script>
            coverageFiles=''
            for group in os.listdir('%s/coverage/' % TMPDIR):
              coverageFiles+='%s/coverage/%s/coverage.ec' % (TMPDIR,group)
          </script>
          <call function="'runCommand'">
              { 'name'      : 'Generate global coverage xml report',
                'command'   : 'java',
                'arguments' : ' -Xms64M -Xmx1024M -cp %s/lib/emma.jar emma report -r xml,html -in %s/coverage.em,%s -Dreport.xml.out.file=%s/coverage/coverage.xml -Dreport.html.out.file=%s/coverage/coverage.html -sp %s/../../../src' % (dsPath,dsPath,coverageFiles,TMPDIR,TMPDIR,TMPDIR),
                'path'      : TMPDIR
              }
          </call>
          <script>
            from java.io import FileInputStream
            from javax.xml.transform.stream import StreamSource
            from javax.xml.transform.stream import StreamResult
            from javax.xml.parsers import DocumentBuilderFactory
            from org.w3c.dom import *
            factory = DocumentBuilderFactory.newInstance()
            builder = factory.newDocumentBuilder()
            input = FileInputStream("%s/coverage/coverage.xml" % TMPDIR)
            document = builder.parse(input)
            dom = document.getDocumentElement()
            coverageNodes = dom.getElementsByTagName("all").item(0).getChildNodes()
            for coverageNodeIndex in range(coverageNodes.getLength()):
              thisNode = coverageNodes.item(coverageNodeIndex)
              if thisNode.getNodeName() == 'coverage':
                thisNodeAttributes = thisNode.getAttributes()
                if thisNodeAttributes.getNamedItem("type").getNodeValue() == 'block, %':
                  rawCoverage = thisNodeAttributes.getNamedItem("value").getNodeValue()
                  coverage = rawCoverage.split('%')[0]
            testlog=open('%s/tests-log.xml' % TMPDIR,'a')
            testlog.seek(0,2)
            testlog.write("      &lt;all&gt;\n")
            testlog.write("        &lt;coverage&gt;\n")
            testlog.write("          %s\n" % coverage)
            testlog.write("        &lt;/coverage&gt;\n")
            testlog.write("      &lt;/all&gt;\n")
            testlog.close()
          </script>
        </sequence>
        <else>
          <script>
            testlog=open('%s/tests-log.xml' % TMPDIR,'a')
            testlog.seek(0,2)
            testlog.write("      &lt;all&gt;\n")
            testlog.write("        &lt;coverage&gt;\n")
            testlog.write("          N/A\n")
            testlog.write("        &lt;/coverage&gt;\n")
            testlog.write("      &lt;/all&gt;\n")
            testlog.close()
          </script>
        </else>
      </if>
      <!-- here goes the section where we get the product's info -->
      <call function="'GetVar'">
        { 'location'  : STAF_REMOTE_HOSTNAME,
          'type'      : 'shared',
          'variable'  : 'Job%s_ServerInfo' % STAXJobID
        }
      </call>
      <if expr="RC != 0">
        <script>
          STAFResult='{}'
        </script>
      </if>
      <!-- Build the Servers Information Dictionary -->
      <script>
        ServersInfoDict=eval(STAFResult)
        ServerVersion='unknown'
        ServerBuildId='unknown'
        ServerJavaVersion='unknown'
        ServerJavaVendor='unknown'
        ServerJVMVersion='unknown'
        ServerJVMVendor='unknown'
        ServerSystemOS='unknown'
        ServerSystemName='unknown'
        ServerSvnRevision='unknown'
        if ServersInfoDict.has_key('%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)):
          ServerInfoDict=ServersInfoDict['%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)]
          ServerInfoKey='server version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='server buildid'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerBuildId=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='java version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJavaVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='java vendor'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJavaVendor=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='jvm version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJVMVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='jvm vendor'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJVMVendor=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='system os'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSystemOS=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='system name'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSystemName=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='svn revision'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSvnRevision=ServerInfoDict[ServerInfoKey]
        else:
          ServerInfoDict='No key found (%s/%s)' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
        testlog=open('%s/tests-log.xml' % TMPDIR,'a')
        testlog.seek(0,2)
        testlog.write('    &lt;/results&gt;\n')
        testlog.write('    &lt;identification&gt;\n')
        testlog.write('      &lt;version&gt;\n')
        testlog.write('        %s\n' % ServerVersion)
        testlog.write('      &lt;/version&gt;\n')
        testlog.write('      &lt;buildid&gt;\n')
        testlog.write('        %s\n' % ServerBuildId)
        testlog.write('      &lt;/buildid&gt;\n')
        testlog.write('      &lt;revision&gt;\n')
        testlog.write('        %s\n' % ServerSvnRevision)
        testlog.write('      &lt;/revision&gt;\n')
        testlog.write('      &lt;platform&gt;\n')
        testlog.write('        %s\n' % ServerSystemOS)
        testlog.write('      &lt;/platform&gt;\n')
        testlog.write('      &lt;jvm-version&gt;\n')
        testlog.write('        %s\n' % ServerJVMVersion)
        testlog.write('      &lt;/jvm-version&gt;\n')
        testlog.write('      &lt;jvm-vendor&gt;\n')
        testlog.write('        %s\n' % ServerJVMVendor)
        testlog.write('      &lt;/jvm-vendor&gt;\n')
        testlog.write('    &lt;/identification&gt;\n')
        testlog.write('  &lt;/functional-tests&gt;\n')
        testlog.write('&lt;/qa&gt;\n')
        testlog.close()
      </script>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/import_ldif/runTestJob.xml
New file
@@ -0,0 +1,524 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="start_job"/>
  <function name="start_job">
    <function-single-arg>
      <function-optional-arg name="config" default="''"/>
    </function-single-arg>
    <sequence>
      <script>
        STAXLogMessage = 1
      </script>
      <script>
        if config:
          import os, sys
          myconfigpath,myconfigfile=os.path.split(config)
          sys.path.append("%s" % myconfigpath )
          from config import *
        else:
          myconfigpath='%s/config' % TESTS_DIR
          myconfigfile='config.py'
      </script>
      <job name="'Job: %s %s' % (STAF_REMOTE_HOSTNAME,TEST_OS_STRING) " monitor="1" clearlogs="'Enabled'" logtcstartstop="'Enabled'">
        <job-file>'%s/testcases/runStressTests.xml' % TESTS_DIR</job-file>
        <job-scriptfiles machine="STAF_LOCAL_HOSTNAME">['%s/%s' % (myconfigpath,myconfigfile) ]</job-scriptfiles>
        <job-action>
          <log>'Started sub-job %s on %s' % (STAXSubJobID,STAF_REMOTE_HOSTNAME)</log>
        </job-action>
      </job>
      <if expr="RC == 0">
        <message>
          'Sub-job %s completed. Result: %s' % (STAXSubJobID, STAXResult)
        </message>
        <else>
          <sequence>
            <message log="1" level="'Error'">'Sub-job %s could not be started. RC: %s Result: %s' % (STAXSubJobID,RC,STAFResult)</message>
            <return>1</return>
          </sequence>
        </else>
      </if>
      <!--- Import required shared xml libraries -->
      <import machine="STAF_LOCAL_HOSTNAME"
              file="'%s/stafcmd.xml' % TESTS_FUNCTIONS_DIR" />
      <!--
        dirty workaround because utils.xml now depends on environment.xml
        to avoid loading environment.xml I'll just set the required vars here
        allegedly ugly
        -=arnaud=-
      -->
      <script>
        NO_CHECK = 'noCheck'
      </script>
      <import machine="STAF_LOCAL_HOSTNAME"
        file="'%s/utils.xml' % (TESTS_FUNCTIONS_DIR)" />
      <!-- Get Directory Server Variables -->
      <call function="'GetVar'">
        { 'location'  : STAF_REMOTE_HOSTNAME,
          'type'      : 'shared',
          'variable'  : 'Job%s_ServerInfo' % STAXSubJobID
        }
      </call>
      <if expr="RC != 0">
        <script>
          STAFResult='{}'
        </script>
      </if>
      <!-- Build the Servers Information Dictionary -->
      <script>
        ServersInfoDict=eval(STAFResult)
        ServerVersion='unknown'
        ServerBuildId='unknown'
        ServerJavaVersion='unknown'
        ServerJavaVendor='unknown'
        ServerJVMVersion='unknown'
        ServerJVMVendor='unknown'
        ServerSystemOS='unknown'
        ServerSystemName='unknown'
        ServerSvnRevision='unknown'
        if ServersInfoDict.has_key('%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)):
          ServerInfoDict=ServersInfoDict['%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)]
          ServerInfoKey='server version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='server buildid'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerBuildId=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='java version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJavaVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='java vendor'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJavaVendor=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='jvm version'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJVMVersion=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='jvm vendor'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerJVMVendor=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='system os'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSystemOS=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='system name'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSystemName=ServerInfoDict[ServerInfoKey]
          ServerInfoKey='svn revision'
          if ServerInfoDict.has_key(ServerInfoKey):
            ServerSvnRevision=ServerInfoDict[ServerInfoKey]
        else:
          ServerInfoDict='No key found (%s/%s)' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
      </script>
      <message>'Server= %s' % ServerInfoDict </message>
      <stafcmd name="'STAF Command: Log Query All'">
        <location>'%s' % STAF_LOCAL_HOSTNAME </location>
        <service>'log'</service>
        <request>
          'QUERY ALL MACHINE %s LOGNAME STAX_Job_%s' % (STAXServiceMachine,STAXSubJobID)
        </request>
      </stafcmd>
      <if expr="RC == 0">
        <sequence>
          <script>
            resultQuery= STAFResult
          </script>
          <message>
            'Log Query on STAX_Job_%s Completed. RC=%s' % (STAXSubJobID,RC)
          </message>
        </sequence>
        <else>
          <sequence>
            <message log="1" level="'Error'">
              'Unable to perform log query on STAX_Job_%s. RC: %s Result: %s' % (STAXSubJobID,RC,STAFResult)
            </message>
            <return>1</return>
          </sequence>
        </else>
      </if>
      <!-- Get logsDir Variable -->
      <call function="'GetVar'">
        { 'location'  : STAF_REMOTE_HOSTNAME,
          'type'      : 'shared',
          'variable'  : 'Job%s_LogsDir' % STAXSubJobID
        }
      </call>
      <if expr="RC == 0">
        <script>
          logsDir=STAFResult
        </script>
      <else>
        <sequence>
          <message>
            'Unable to retrieve LogsDir variable, RC=%s,Result=%s.' % (RC,STAFResult)
          </message>
          <script>
            logsDir='%s' % TMPDIR
          </script>
        </sequence>
      </else>
      </if>
      <script>
        logsReportDir='%s/reports' % logsDir
      </script>
      <call function="'createFolder'">
        { 'location'   : STAF_LOCAL_HOSTNAME,
          'foldername' : logsReportDir }
      </call>
      <!-- Write Text File for results -->
      <script>
          textfile= '%s/results.txt' % logsReportDir
          txtfh=open(textfile,'w')
      </script>
      <iterate var="line" in="resultQuery">
        <script>
          txtfh.write('%s\n' % line)
        </script>
      </iterate>
      <script>
        txtfh.close()
      </script>
      <message>
        'TEXT Report Written to %s.' % textfile
      </message>
      <!-- Write XML File for results -->
      <script>
        import re
        xmlfile= '%s/results.xml' % logsReportDir
        xmlfh=open(xmlfile,'w')
        errorfile= '%s/results.errors' % logsReportDir
        errorfh=open(errorfile,'w')
      </script>
      <!-- Build the test case dictionary object -->
      <script>
        testDict={}
        testCaseList=[]
      </script>
      <iterate var="element" in="resultQuery">
        <script>
          level=element['level']
          message=element['message']
          timestamp=element['timestamp']
          startValueDict={}
          stopValueDict={}
          statusValueDict={}
          if level == 'Start':
            tcpattern=re.compile("(Testcase): (.*)")
            tcmatch = tcpattern.search(message)
            if tcmatch:
              tctype=tcmatch.group(1)
              tcname=tcmatch.group(2)
              if testDict.has_key(tcname):
                for key in testDict[tcname].keys():
                  value=testDict[tcname][key]
                  startValueDict[key]=value
              startValueDict['start']=timestamp
              testDict[tcname]=startValueDict
              testCaseList.append(tcname)
            else:
              errorfh.write('Warning: No match Start element %s.\n' % element)
          elif level == 'Stop':
            tcpattern=re.compile("(Testcase): (.*), ElapsedTime: (.*)")
            tcmatch = tcpattern.search(message)
            if tcmatch:
              tctype=tcmatch.group(1)
              tcname=tcmatch.group(2)
              tctime=tcmatch.group(3)
              if testDict.has_key(tcname):
                for key in testDict[tcname].keys():
                  value=testDict[tcname][key]
                  stopValueDict[key]=value
              stopValueDict['stop']=timestamp
              stopValueDict['duration']=tctime
              testDict[tcname]=stopValueDict
            else:
              errorfh.write('Warning: No match Stop element %s.\n' % element)
          elif level == 'Status':
            tcpattern=re.compile("(Testcase): (.*), Pass: (.*), Fail: (.*), ElapsedTime: (.*), NumStarts: (.*)")
            tcmatch = tcpattern.search(message)
            if tcmatch:
              tctype=tcmatch.group(1)
              tcname=tcmatch.group(2)
              tcpass=tcmatch.group(3)
              tcfail=tcmatch.group(4)
              tctime=tcmatch.group(5)
              tcnums=tcmatch.group(6)
              if testDict.has_key(tcname):
                for key in testDict[tcname].keys():
                  value=testDict[tcname][key]
                  statusValueDict[key]=value
              statusValueDict['pass']=tcpass
              statusValueDict['fail']=tcfail
              testDict[tcname]=statusValueDict
            else:
              errorfh.write('Warning: No match Status element %s.\n' % element)
          elif level == 'Info':
            errorfh.write('Warning: Info element %s.\n' % element)
          else:
            errorfh.write('Error: Unknown element %s.\n' % element)
        </script>
      </iterate>
      <!-- XML Report Pre -->
      <script>
        xmlfh.write('&lt;qa&gt;\n')
        xmlfh.write('  &lt;functional-tests&gt;\n')
        xmlfh.write('    &lt;identification&gt;\n')
        xmlfh.write('      &lt;version&gt;\n')
        xmlfh.write('        %s\n' % ServerVersion)
        xmlfh.write('      &lt;/version&gt;\n')
        xmlfh.write('      &lt;buildid&gt;\n')
        xmlfh.write('        %s\n' % ServerBuildId)
        xmlfh.write('      &lt;/buildid&gt;\n')
        xmlfh.write('      &lt;revision&gt;\n')
        xmlfh.write('        %s\n' % ServerSvnRevision)
        xmlfh.write('      &lt;/revision&gt;\n')
        xmlfh.write('      &lt;platform&gt;\n')
        xmlfh.write('        %s\n' % ServerSystemOS)
        xmlfh.write('      &lt;/platform&gt;\n')
        xmlfh.write('      &lt;jvm-version&gt;\n')
        xmlfh.write('        %s\n' % ServerJVMVersion)
        xmlfh.write('      &lt;/jvm-version&gt;\n')
        xmlfh.write('      &lt;jvm-vendor&gt;\n')
        xmlfh.write('        %s\n' % ServerJVMVendor)
        xmlfh.write('      &lt;/jvm-vendor&gt;\n')
        xmlfh.write('    &lt;/identification&gt;\n')
        xmlfh.write('    &lt;results&gt;\n')
      </script>
      <!-- XML Report Results -->
      <script>
        for tcname in testCaseList:
          if testDict.has_key(tcname):
            tcnamesplit=tcname.split(":")
            if tcnamesplit[0]:
              testgroup=tcnamesplit[0]
              if tcnamesplit[1]:
                testsuite=tcnamesplit[1]
              else:
                testsuite=testgroup
            else:
              testgroup=tcname
              testsuite=tcname
            if testDict[tcname].has_key('pass'):
              tcpass=testDict[tcname]['pass']
            else:
              tcpass='0'
            if testDict[tcname].has_key('fail'):
              tcfail=testDict[tcname]['fail']
            else:
              tcfail='0'
            if testDict[tcname].has_key('start'):
              tcstart=testDict[tcname]['start']
            else:
              tcstart='unknown'
            if testDict[tcname].has_key('stop'):
              tcstop=testDict[tcname]['stop']
            else:
              tcstop='unknown'
            if testDict[tcname].has_key('duration'):
              tcduration=testDict[tcname]['duration']
            else:
              duration='unknown'
          else:
            errorfh.write('No key for testcase %s.\n' % tcname)
          if int(tcfail) == 0 and int(tcpass) > 0:
            tcresult='pass'
          elif int(tcfail) == 0 and int(tcpass) == 0:
            tcresult='unknown'
          else:
            tcresult='fail'
          xmlfh.write('      &lt;testgroup name="%s"&gt;\n' % testgroup)
          xmlfh.write('        &lt;testsuite name="%s"&gt;\n' % testsuite)
          xmlfh.write('          &lt;testcase name="%s" result="%s" start="%s" stop="%s" duration="%s"/&gt;\n' % (tcname,tcresult,tcstart,tcstop,tcduration))
          xmlfh.write('        &lt;/testsuite&gt;\n')
          xmlfh.write('      &lt;/testgroup&gt;\n')
      </script>
      <!-- XML Report Post -->
      <script>
        xmlfh.write('    &lt;/results&gt;\n')
        xmlfh.write('  &lt;/functional-tests&gt;\n')
        xmlfh.write('&lt;/qa&gt;\n')
      </script>
      <script>
        xmlfh.close()
        errorfh.close()
      </script>
      <message>
        'XML Report Written to %s.' % xmlfile
      </message>
      <!-- Transform Report XML into HTML -->
      <script>
        xslfile= '%s/xsl/gen-alltests-report.xsl' % TESTS_SHARED_DIR
        htmlfile= '%s/results.html' % logsReportDir
      </script>
      <message>
        'Writing HTML (with stylesheet %s) Report to %s.' % (xslfile,htmlfile)
      </message>
      <script>
        _message=''
        try:
          from java.io import FileInputStream
          from java.io import FileOutputStream
          from java.io import ByteArrayOutputStream
          from javax.xml.transform import TransformerFactory
          from javax.xml.transform.stream import StreamSource
          from javax.xml.transform.stream import StreamResult
          xslSource = StreamSource(FileInputStream("%s" % xslfile))
          xslTemplate = TransformerFactory.newInstance().newTemplates(xslSource)
          transformer = xslTemplate.newTransformer()
          source = StreamSource(FileInputStream("%s" % xmlfile))
          result = StreamResult(FileOutputStream("%s" % htmlfile))
          # the original report
          transformer.transform(source, result)
          #the new report transformation
          TransformerFactory.newInstance().newTemplates(StreamSource(FileInputStream("%s/xsl/my-report.xsl" % TESTS_SHARED_DIR))).newTransformer().transform(StreamSource(FileInputStream("%s/tests-log.xml" % TMPDIR)), StreamResult(FileOutputStream("%s/my-report.html" % TMPDIR)))
          _message='Generated drill-down HTML report'
        except:
          _message='Could not generate drill-down HTML report'
      </script>
      <message>_message</message>
      <if expr="SEND_MAIL_AFTER_TEST_RUN == 'TRUE'">
        <sequence>
          <message>
            'Sending Email Test Report to %s.' % SEND_MAIL_TO
          </message>
          <script>
            MailToList= SEND_MAIL_TO.split(",")
            MailSubject= 'OpenDS Test Report for %s' % STAF_REMOTE_HOSTNAME
            MailSendTo= ' '
          </script>
          <iterate var="Recipient" in="MailToList">
            <script>
             MailSendTo='to %s %s' % (Recipient,MailSendTo)
            </script>
          </iterate>
          <stafcmd name="'STAF Command: Send test report %s' % MailSendTo">
            <location>'%s' % STAF_LOCAL_HOSTNAME </location>
            <service>'email'</service>
            <request>
              'send %s contenttype "text/html" file %s subject "%s" noheader' % (MailSendTo,htmlfile,MailSubject)
            </request>
          </stafcmd>
          <if expr="RC != 0">
            <message log="1" level="'Error'">
              'Send test report failed. RC: %s STAFResult: %s' % (RC,STAFResult)
            </message>
            <else>
              <message>
                'Send test report successful. RC: %s' % (RC)
              </message>
            </else>
          </if>
        </sequence>
      </if>
    </sequence>
  </function>
</stax>
opends/tests/stress-tests/testcases/quickstart/quickstart.xml
New file
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, include this CDDL HEADER in each
 ! file and include the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_quickstart"/>
  <function name="main_quickstart">
    <block name="'quickstart'">
      <sequence>
        <!--- Start DS -->
        <call function="'StartDsWithScript'">
         { 'location'  : STAF_REMOTE_HOSTNAME }
        </call>
        <call function="'checkRC'">
           { 'returncode' : RC ,
             'result'     : STAXResult }
        </call>
        <!--- Check that DS started -->
        <call function="'isAlive'">
          { 'noOfLoops'        : 5 ,
            'noOfMilliSeconds' : 2000 }
        </call>
        <message>
           'Quickstart: Adding quickstart entries'
        </message>
        <call function="'addEntry'">
          { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
            'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
            'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
            'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
            'entryToBeAdded'   : '%s/quickstart/quickstart.ldif' % logsRemoteDataDir
          }
        </call>
        <call function="'checkRC'">
            { 'returncode' : RC ,
              'result'     : STAXResult }
        </call>
        <!--- Stop DS -->
        <call function="'StopDsWithScript'">
          { 'location'  : STAF_REMOTE_HOSTNAME,
            'dsHost'    : DIRECTORY_INSTANCE_HOST,
            'dsPort'    : DIRECTORY_INSTANCE_PORT,
            'dsBindDN'  : DIRECTORY_INSTANCE_DN,
            'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
          }
        </call>
        <call function="'checkRC'">
          { 'returncode' : RC ,
            'result'     : STAXResult
          }
        </call>
      </sequence>
    </block>
  </function>
</stax>