dsml_setup.xml revision 3680e9009b5c40289ccd748712823730eb0740aa
2cacab200fb387e290386593d9b2fca2e7beef33csovant<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! CDDL HEADER START
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! The contents of this file are subject to the terms of the
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! Common Development and Distribution License, Version 1.0 only
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! (the "License"). You may not use this file except in compliance
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! with the License.
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! You can obtain a copy of the license at
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! See the License for the specific language governing permissions
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! and limitations under the License.
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! When distributing Covered Code, include this CDDL HEADER in each
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! file and include the License file at
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! add the following below this CDDL HEADER, with the fields enclosed
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! by brackets "[]" replaced with your own identifying information:
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! Portions Copyright [yyyy] [name of copyright owner]
04545c19d1a0771e637bb903fa83321b4a9ca15dcsovant ! CDDL HEADER END
2cacab200fb387e290386593d9b2fca2e7beef33csovant ! Portions Copyright 2008-2009 Sun Microsystems, Inc.
2cacab200fb387e290386593d9b2fca2e7beef33csovant <!--- Test Case information
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant #@TestMarker setup
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant #@TestName setup: prepare DSML directory server
f5aaa49dba43db0e99f06476534a8749820515dbcsovant #@TestIssue none
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant #@TestPurpose Prepare the directory server necessary to the
f5aaa49dba43db0e99f06476534a8749820515dbcsovant test suite.
04545c19d1a0771e637bb903fa83321b4a9ca15dcsovant #@TestPreamble none
f5aaa49dba43db0e99f06476534a8749820515dbcsovant #@TestStep prepare dsml directory server instance
f5aaa49dba43db0e99f06476534a8749820515dbcsovant #@TestPostamble none
04545c19d1a0771e637bb903fa83321b4a9ca15dcsovant #@TestResult Success if returns 0.
2cacab200fb387e290386593d9b2fca2e7beef33csovant <testcase name="getTestCaseName('prepare DSML STAF service')">
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'location' : STAXServiceMachine,
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift 'location' : STAXServiceMachine,
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'zipfile' : '%s/%s' % (ZIPPATH, ZIPNAME),
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'location' : STAXServiceMachine,
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'srcfile' : '%s/dsml/%s/lib/OpenDS.jar' % (TMPDIR,OPENDSNAME),
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'destfile' : '%s/dsml/STAF-INF/jars/OpenDS.jar' % TMPDIR,
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift 'remotehost' : STAXServiceMachine
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant 'location' : STAXServiceMachine,
4307522debc92aa718245251f11a2ecff81c0e75csovant 'zipfile' : DSML_WARPATH,
2cacab200fb387e290386593d9b2fca2e7beef33csovant 'location' : STAXServiceMachine,
f5aaa49dba43db0e99f06476534a8749820515dbcsovant 'remotehost' : STAXServiceMachine
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant if is_windows_platform(STAXServiceMachine):
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant separator=';'
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant separator=':'
2cacab200fb387e290386593d9b2fca2e7beef33csovant opendsjar='%s/dsml/STAF-INF/jars/OpenDS.jar' % TMPDIR
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift 'location' : STAXServiceMachine,
f5aaa49dba43db0e99f06476534a8749820515dbcsovant 'type' : 'system',
3c437100238466d9ec716e5491bebfc4c94b13b8csovant cp=STAFResult
2cc2b01027ecfde3503e44c85855bc91805dcc0fugaston 'location' : STAXServiceMachine,
'prepare instance DS as described in config.py '
#@TestStep Create Directory server as defined in config.py.
'Create DS as described in config.py '
#@TestStep Import Directory server as defined in config.py.
'dc=example,dc=com' : ('oasis.ldif', 'oasis_BE', 160),
'o=IMC, c=US' : ('search.ldif', 'example_BE', 1084),
dsmlBaseDNs.get(baseDN)[1],\
DIRECTORY_INSTANCE_DIR, OPENDSNAME, dsmlBaseDNs.get(baseDN)[1],\
'Create database backend %s.' % dsmlBaseDNs.get(baseDN)[1]
options.append('--set base-dn:"%s"' % baseDN)
options.append('--set enabled:true')
options.append('--set writability-mode:enabled')
options.append('-t local-db')
'taskID' : 'import_%s' % dsmlBaseDNs.get(baseDN)[1],
'backEnd' : '%s' % dsmlBaseDNs.get(baseDN)[1]
nbEntriesExpected = dsmlBaseDNs.get(baseDN)[2]
#@TestStep Create webcontainer as described in config.py.
'setup: create webcontainer as described in config.py'
#@TestStep Deploy web application as described in config.py.
'setup: deploy DSML gateway webapp as described in config.py'
#@TestStep start webcontainer as described in config.py.
'setup: start webcontainer as described in config.py'
#@TestPurpose Set the gateway web.xml param pointing to DS
#@TestSteps extract web.xml out of DSML war file locally
#@TestSteps overwrite the destination DSML gateway web.xml
myTmpDir='%s/%s' % (local.temp, STAF_REMOTE_HOSTNAME)
{ 'name' : 'Extract DSML gateway web.xml',
portRegEx = re.compile('389')
hostRegEx = re.compile('localhost')
c0=webXmlInput.read()
c1=portRegEx.sub(DIRECTORY_INSTANCE_PORT, c0)
content=hostRegEx.sub(DIRECTORY_INSTANCE_HOST, c1)
webXmlOutput.write(content)
'Update DSML gateway web.xml file on host %s' % STAF_REMOTE_HOSTNAME