Cross Reference:
xref
: /
forgerock
/
opendj2
/
tests
/
staf-tests
/
system-tests
/
scenario
/
singleServer
/
clients
/
tasks
/
tasksPostamble.xml
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
tasksPostamble.xml revision d81978a0815d5b8a75633c35e3e1f8708d36f017
2
N/A
<?
xml
version=
"1.0"
encoding=
"UTF-8"
standalone=
"no"
?>
2
N/A
<!
DOCTYPE
stax
SYSTEM
"/
shared
/
stax.dtd
"
>
2
N/A
<!--
2
N/A
! CDDL HEADER START
2
N/A
!
2
N/A
! The contents of this file are subject to the terms of the
2
N/A
! Common Development and Distribution License, Version 1.0 only
2
N/A
! (the "License"). You may not use this file except in compliance
2
N/A
! with the License.
2
N/A
!
2
N/A
! You can obtain a copy of the license at
2
N/A
!
trunk
/
opends
/
resource
/
legal-notices
/
OpenDS.LICENSE
2
N/A
! or
https://OpenDS.dev.java.net/OpenDS.LICENSE
.
2
N/A
! See the License for the specific language governing permissions
2
N/A
! and limitations under the License.
2
N/A
!
2
N/A
! When distributing Covered Code, include this CDDL HEADER in each
2
N/A
! file and include the License file at
2
N/A
!
trunk
/
opends
/
resource
/
legal-notices
/
OpenDS.LICENSE
. If applicable,
2
N/A
! add the following below this CDDL HEADER, with the fields enclosed
2
N/A
! by brackets "[]" replaced with your own identifying information:
2
N/A
! Portions Copyright [yyyy] [name of copyright owner]
2
N/A
!
2
N/A
! CDDL HEADER END
2
N/A
!
2
N/A
! Copyright 2008 Sun Microsystems, Inc.
2
N/A
! -->
2
N/A
<
stax
>
2
N/A
2
N/A
<
defaultcall
function=
"tasksPostamble"
/>
2
N/A
2
N/A
<!-- ************************************************************ -->
2
N/A
<!-- Client postamble is automatically called by the scheduler -->
2
N/A
<!-- and must always define all the parameters below -->
2
N/A
<
function
name=
"tasksPostamble"
scope=
"local"
>
2
N/A
<
function
-
map
-
args
>
2
N/A
<
function
-
arg
-
def
name=
"client"
type=
"required"
/>
2
N/A
<
function
-
arg
-
def
name=
"instances"
type=
"required"
/>
2
N/A
<
function
-
arg
-
def
name=
"duration"
type=
"required"
/>
2
N/A
<
function
-
arg
-
def
name=
"suffix"
type=
"required"
/>
2
N/A
<
function
-
arg
-
def
name=
"outFile"
type=
"required"
/>
2
N/A
<
function
-
arg
-
def
name=
"fileFd"
type=
"required"
/>
2
N/A
</
function
-
map
-
args
>
2
N/A
2
N/A
<
sequence
>
2
N/A
<!-- =================== Comments =================== -->
2
N/A
<!-- client is run under paralleliterate tag -->
2
N/A
<!-- each variables defined are internal -->
2
N/A
<!-- client should have its own err_num variable in order -->
2
N/A
<!-- to inform scheduler if it has
pass
/
fail
status -->
2
N/A
<
script
>
2
N/A
errNum = 0
2
N/A
msg = ''
2
N/A
</
script
>
2
N/A
<!-- ================== Parser =================== -->
2
N/A
<!-- parse the client parameters : -->
2
N/A
<!-- params is [[param1,val1],[param2,val2],...] -->
2
N/A
<!-- get the ldap instance parameters -->
2
N/A
<
import
machine=
"'%s' % (
client.getHost
())"
2
N/A
file=
"'%s/%
sLib.xml
' % (
client.getPath
(),
client.getName
())"
/>
2
N/A
<
call
function=
"'%sParser' %
client.getName
()"
>
2
N/A
{
2
N/A
'client' : client,
2
N/A
'instances' : instances,
2
N/A
'duration' : duration,
2
N/A
'suffix' : suffix
2
N/A
}
2
N/A
</
call
>
2
N/A
<
if
expr=
"
msg.find
('ERROR') != -1"
>
2
N/A
<
sequence
>
2
N/A
<
message
>'%s' % msg</
message
>
2
N/A
<
call
function=
"'writeOperationResult'"
>
2
N/A
{
2
N/A
'returncode' : '1',
2
N/A
'expected' : '0',
2
N/A
'result' : msg,
2
N/A
'status' : 'ERROR',
2
N/A
'fileFd' : fileFd
2
N/A
}
2
N/A
</
call
>
2
N/A
<
script
>
2
N/A
errNum += 1
2
N/A
</
script
>
2
N/A
</
sequence
>
2
N/A
<
else
>
2
N/A
<
sequence
>
2
N/A
<
process
name=
"'%s:%s: Grep' % (
client.getHost
(),
client.getName
())"
>
2
N/A
<
location
>
client.getHost
()</
location
>
2
N/A
<
command
mode=
"'shell'"
>
2
N/A
"grep -v 'ERROR' %s" % outFile
2
N/A
</
command
>
2
N/A
<
envs
>['PATH=/bin:/
usr
/
bin
']</
envs
>
2
N/A
<
stderr
mode=
"'stdout'"
/>
2
N/A
<
stdout
/>
2
N/A
<
returnstdout
/>
2
N/A
</
process
>
2
N/A
<
script
>
2
N/A
summary = STAXResult[0][1]
2
N/A
</
script
>
2
N/A
<
call
function=
"'writeMessage'"
>
2
N/A
{'content' : 'Summary %s' % (summary),
2
N/A
'fileFd' : fileFd}
2
N/A
</
call
>
2
N/A
</
sequence
>
2
N/A
</
else
>
2
N/A
</
if
>
2
N/A
2
N/A
<
return
> errNum </
return
>
2
N/A
2
N/A
</
sequence
>
2
N/A
</
function
>
2
N/A
2
N/A
</
stax
>
2
N/A