5398N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
5398N/A ! The contents of this file are subject to the terms of the 5398N/A ! Common Development and Distribution License, Version 1.0 only 5398N/A ! (the "License"). You may not use this file except in compliance 5398N/A ! You can obtain a copy of the license at 5398N/A ! See the License for the specific language governing permissions 5398N/A ! and limitations under the License. 5398N/A ! When distributing Covered Code, include this CDDL HEADER in each 5398N/A ! file and include the License file at 5398N/A ! add the following below this CDDL HEADER, with the fields enclosed 5398N/A ! by brackets "[]" replaced with your own identifying information: 5398N/A ! Portions Copyright [yyyy] [name of copyright owner] 5398N/A ! Copyright 2011 ForgeRock AS 5398N/A <!-- SDK ldapsearch Function --> 5398N/A <
function name="SDKldapSearch">
5398N/A This function performs an ldapsearch using the SDK java API
5398N/A <
function-
arg-
def name="dsInstanceHost" type="optional">
5398N/A Directory server hostname or IP address
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="hostname"/>
5398N/A <
function-
arg-
def name="dsInstancePort" type="optional">
5398N/A Directory server port number
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="Port number"/>
5398N/A <
function-
arg-
def name="dsInstanceDn" type="optional">
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="DN"/>
5398N/A <
function-
arg-
def name="dsInstancePswd" type="optional">
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A <
function-
arg-
def name="dsScope" type="optional">
5398N/A The scope of the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A <
function-
arg-
def name="dsBaseDN" type="optional">
5398N/A The baseDN for the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="dn"/>
5398N/A <
function-
arg-
def name="dsFilter" type="optional">
5398N/A The filter for the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="filter"/>
5398N/A <
function-
arg-
def name="dsAttributes" type="optional">
5398N/A Only return these attributes
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A myHost=String(dsInstanceHost)
5398N/A myPassword=String(dsInstancePswd).toCharArray()
5398N/A myFilter = '(objectClass=*)'
5398N/A factory = LDAPConnectionFactory(myHost,myPort)
5398N/A #TODO: handle search result references
5398N/A #TODO: not really a need to use writer to write to stdout
5398N/A except ErrorResultException, e:
5398N/A except ErrorResultIOException, e:
5398N/A except InterruptedException, e:
<
function name="authRate">
This function runs ldap authrate tool from OpenDJ SDK
<
function-
arg-
def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="sdkBinPath" type="optional" default="'%s' % SDK_BIN">
<
function-
arg-
description>
Pathname to installation of sdk binaries
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
<
function-
arg-
description>
Pathname to installation root
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsInstanceHost" type="optional">
<
function-
arg-
description>
Directory server hostname or IP address
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="dsInstancePort" type="optional">
<
function-
arg-
description>
Directory server port number
</
function-
arg-
description>
<
function-
arg-
property name="type" value="Port number"/>
<
function-
arg-
def name="dsInstanceDn" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="DN"/>
<
function-
arg-
def name="dsInstancePswd" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="extraParams" type="optional">
<
function-
arg-
description>
Optional extra parameters for specific test cases
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="expectedRC" type="optional" default="0">
<
function-
arg-
description>
Expected return code value. Default value is 0
Wildcard 'noCheck' to not check the RC
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="verbose" type="optional" default="True">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="knownIssue" type="optional" default="None">
<
function-
arg-
description>
Known issue. Corresponds to an issue number.
</
function-
arg-
description>
<!-- Build the Command --> dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%
s/
authrate%s' % (sdkBinPath,fileExt)
<!-- Set common ldap arguments --> <
call function="'_ldapCommonArgs'" />
STAFCmdParams=' '.join(STAFCmdParamsList)
<
call function="'runCommand'">
'arguments' : STAFCmdParams,
'expectedRC' : expectedRC,
'knownIssue' : knownIssue
for line in STAXResult[0][1].split('\n'):
<
function name="searchRate">
This function runs ldap searchrate tool from OpenDJ SDK
<
function-
arg-
def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="sdkBinPath" type="optional" default="'%s' % SDK_BIN">
<
function-
arg-
description>
Pathname to installation of sdk binaries
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
<
function-
arg-
description>
Pathname to installation root
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsInstanceHost" type="optional">
<
function-
arg-
description>
Directory server hostname or IP address
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="dsInstancePort" type="optional">
<
function-
arg-
description>
Directory server port number
</
function-
arg-
description>
<
function-
arg-
property name="type" value="Port number"/>
<
function-
arg-
def name="dsInstanceDn" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="DN"/>
<
function-
arg-
def name="dsInstancePswd" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="extraParams" type="optional">
<
function-
arg-
description>
Optional extra parameters for specific test cases
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="expectedRC" type="optional" default="0">
<
function-
arg-
description>
Expected return code value. Default value is 0
Wildcard 'noCheck' to not check the RC
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="verbose" type="optional" default="True">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="knownIssue" type="optional" default="None">
<
function-
arg-
description>
Known issue. Corresponds to an issue number.
</
function-
arg-
description>
<
function-
arg-
def name="dsBaseDN" type="optional">
<
function-
arg-
description>
The baseDN for the search operation
</
function-
arg-
description>
<
function-
arg-
property name="type" value="dn"/>
<!-- Build the Command --> dsBinPath='%s/%s' % (dsPath,fileFolder)
<!-- Set common ldap arguments --> <
call function="'_ldapCommonArgs'" />
STAFCmdParams=' '.join(STAFCmdParamsList)
<
call function="'runCommand'">
'arguments' : STAFCmdParams,
'expectedRC' : expectedRC,
'knownIssue' : knownIssue
for line in STAXResult[0][1].split('\n'):
<
function name="modRate">
This function runs ldap modrate tool from OpenDJ SDK
<
function-
arg-
def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="sdkBinPath" type="optional" default="'%s' % SDK_BIN">
<
function-
arg-
description>
Pathname to installation of sdk binaries
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)">
<
function-
arg-
description>
Pathname to installation root
</
function-
arg-
description>
<
function-
arg-
property name="type" value="filepath"/>
<
function-
arg-
def name="dsInstanceHost" type="optional">
<
function-
arg-
description>
Directory server hostname or IP address
</
function-
arg-
description>
<
function-
arg-
property name="type" value="hostname"/>
<
function-
arg-
def name="dsInstancePort" type="optional">
<
function-
arg-
description>
Directory server port number
</
function-
arg-
description>
<
function-
arg-
property name="type" value="Port number"/>
<
function-
arg-
def name="dsInstanceDn" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="DN"/>
<
function-
arg-
def name="dsInstancePswd" type="optional">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="extraParams" type="optional">
<
function-
arg-
description>
Optional extra parameters for specific test cases
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="expectedRC" type="optional" default="0">
<
function-
arg-
description>
Expected return code value. Default value is 0
Wildcard 'noCheck' to not check the RC
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="verbose" type="optional" default="True">
<
function-
arg-
description>
</
function-
arg-
description>
<
function-
arg-
property name="type" value="integer"/>
<
function-
arg-
def name="knownIssue" type="optional" default="None">
<
function-
arg-
description>
Known issue. Corresponds to an issue number.
</
function-
arg-
description>
<
function-
arg-
def name="dsBaseDN" type="optional">
<
function-
arg-
description>
The baseDN for the operation
</
function-
arg-
description>
<
function-
arg-
property name="type" value="dn"/>
<
function-
arg-
def name="attribute" type="optional">
<
function-
arg-
description>
The attribute to be modified
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<
function-
arg-
def name="formatString" type="optional">
<
function-
arg-
description>
The attribute value to be modified
</
function-
arg-
description>
<
function-
arg-
property name="type" value="string"/>
<!-- Build the Command --> dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%
s/
modrate%s' % (sdkBinPath,fileExt)
<!-- Set common ldap arguments --> <
call function="'_ldapCommonArgs'" />
STAFCmdParams=' '.join(STAFCmdParamsList)
<
call function="'runCommand'">
'arguments' : STAFCmdParams,
'expectedRC' : expectedRC,
'knownIssue' : knownIssue
for line in STAXResult[0][1].split('\n'):