<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/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
!
! Copyright 2007-2010 Sun Microsystems, Inc.
! Portions Copyright 2012-2013 ForgeRock AS.
! -->
<stax>
<function name="addEntry">
<function-prolog>
This function adds an entry to the Directory Server from an ldif file
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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>
<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>
<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>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="entryToBeAdded" type="required">
<function-arg-description>
Entry to be added to Directory Server in ldif format
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<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>
<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>
<function-arg-def name="verbose" type="optional" default="True">
<function-arg-description>
Display (or not) output.
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
STAFCmdParamsList.append('-a')
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'" />
<script>
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if entryToBeAdded:
STAFCmdParamsList.append('-f "%s"' % entryToBeAdded)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<call function="'runCommand'">
{ 'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : mylocation,
'name' : 'Add Entry From LDIF',
'expectedRC' : expectedRC,
'knownIssue' : knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- ldapmodify Function With Script-->
<function name="ldapModifyWithScript">
<function-prolog>
This function performs an ldapmodify using the script
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="hostname"/>
</function-arg-def>
<function-arg-def name="dsAdd" type="optional">
<function-arg-description>
Add the entries
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsAssertionFilter" type="optional">
<function-arg-description>
Use the LDAP assertion control with the provided filter
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<function-arg-def name="dsContinueOnError" type="optional">
<function-arg-description>
Continue processing even if there are errors
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsReportAuthzID" type="optional">
<function-arg-description>
Use the authorization identity control
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsFilename" type="optional">
<function-arg-description>
Specifies the LDIF file containing the changes to apply
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsHelp" type="optional">
<function-arg-description>
Display this usage information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsEncoding" type="optional">
<function-arg-description>
Use the specified character set for command-line input
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBindPasswordFile" type="optional">
<function-arg-description>
Bind password file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsControl" type="optional">
<function-arg-description>
Use a request control with the provided information
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePath" type="optional">
<function-arg-description>
Certificate keystore path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePasswordFile" type="optional">
<function-arg-description>
Certificate keystore PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePassword" type="optional">
<function-arg-description>
Certificate keystore PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsDryRun" type="optional">
<function-arg-description>
Show what would be done but do not perform any operation
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsSaslOption" type="optional">
<function-arg-description>
SASL bind options
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePath" type="optional">
<function-arg-description>
Certificate trust store path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePassword" type="optional">
<function-arg-description>
Certificate trust store PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePasswordFile" type="optional">
<function-arg-description>
Certificate trust store PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsUseStartTLS" type="optional">
<function-arg-description>
Use StartTLS to secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSASLExternal" type="optional">
<function-arg-description>
Use the SASL EXTERNAL authentication mechanism
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSSL" type="optional">
<function-arg-description>
Use SSL for secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsTrustAll" type="optional">
<function-arg-description>
Trust all server SSL certificates
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsVersion" type="optional">
<function-arg-description>
Display Directory Server version information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsCertNickname" type="optional">
<function-arg-description>
Nickname of certificate for SSL client authentication
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsProxyAs" type="optional">
<function-arg-description>
Use the proxied authorization control with the given authorization ID
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsPreReadAttributes" type="optional">
<function-arg-description>
Use the LDAP ReadEntry pre-read control
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsPostReadAttributes" type="optional">
<function-arg-description>
Use the LDAP ReadEntry post-read control
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsLdapVersion" type="optional">
<function-arg-description>
LDAP protocol version number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsVerbose" type="optional">
<function-arg-description>
Use verbose mode
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
if dsAdd:
STAFCmdParamsList.append('-a')
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w %s' % dsInstancePswd)
if dsAssertionFilter:
STAFCmdParamsList.append('--assertionFilter "%s"' % dsAssertionFilter)
if dsContinueOnError:
STAFCmdParamsList.append('-c')
if dsReportAuthzID:
STAFCmdParamsList.append('-E')
if dsFilename:
STAFCmdParamsList.append('-f %s' % dsFilename)
if dsHelp:
STAFCmdParamsList.append('-H')
if dsEncoding:
STAFCmdParamsList.append('-i %s' % dsEncoding)
if dsBindPasswordFile:
STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
if dsControl:
STAFCmdParamsList.append('-J %s' % dsControl)
if dsKeyStorePath:
STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
if dsCertNickname:
STAFCmdParamsList.append('-N %s' % dsCertNickname)
if dsDryRun:
STAFCmdParamsList.append('-n')
if dsSaslOption:
STAFCmdParamsList.append('-o %s' % dsSaslOption)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsTrustStorePath:
STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
if dsUseStartTLS:
STAFCmdParamsList.append('-q')
if dsUseSASLExternal:
STAFCmdParamsList.append('-r')
if dsTrustStorePassword:
STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
if dsTrustStorePasswordFile:
STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
if dsKeyStorePasswordFile:
STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
if dsVersion:
STAFCmdParamsList.append('--version')
if dsVerbose:
STAFCmdParamsList.append('-v')
if dsLdapVersion:
STAFCmdParamsList.append('-V %s' % dsLdapVersion)
if dsKeyStorePassword:
STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
if dsTrustAll:
STAFCmdParamsList.append('-X')
if dsProxyAs:
STAFCmdParamsList.append('-Y "%s"' % dsProxyAs)
if dsUseSSL:
STAFCmdParamsList.append('-Z')
if dsPreReadAttributes:
for attribute in dsPreReadAttributes:
STAFCmdParamsList.append('--preReadAttributes %s' % attribute)
if dsPostReadAttributes:
for attribute in dsPostReadAttributes:
STAFCmdParamsList.append('--postReadAttributes %s' % attribute)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'name' : 'LDAP Modify Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="modifyEntry">
<function-prolog>
This function modifies an entry in the Directory Server
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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>
<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>
<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>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="entryToBeModified" type="required">
<function-arg-description>
Entry to be modified in the Directory Server in ldif format
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<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>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if entryToBeModified:
STAFCmdParamsList.append('-f "%s"' % entryToBeModified)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'location' : location,
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'name' : 'Modify Entry from ldif file',
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- ldapsearch Function With Script-->
<function name="ldapSearchWithScript">
<function-prolog>
This function performs an ldapsearch using the script
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="hostname"/>
</function-arg-def>
<function-arg-def name="dsDereferencePolicy" type="optional">
<function-arg-description>
Specifies dereference alias policy
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTypesOnly" type="optional">
<function-arg-description>
Specifies to only include attribute type names
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsAssertionFilter" type="optional">
<function-arg-description>
Use the LDAP assertion control with the provided filter
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<function-arg-def name="dsContinueOnError" type="optional">
<function-arg-description>
Continue processing even if there are errors
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsPersistentSearch" type="optional">
<function-arg-description>
Use the persistent search control
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsCountEntries" type="optional">
<function-arg-description>
Count the number of entries returned by the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsReportAuthzID" type="optional">
<function-arg-description>
Use the authorization identity control
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsFilename" type="optional">
<function-arg-description>
File containing a list of search filter strings
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsHelp" type="optional">
<function-arg-description>
Display this usage information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsEncoding" type="optional">
<function-arg-description>
Use the specified character set for command-line input
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBindPasswordFile" type="optional">
<function-arg-description>
Bind password file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsControl" type="optional">
<function-arg-description>
Use a request control with the provided information
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePath" type="optional">
<function-arg-description>
Certificate keystore path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePasswordFile" type="optional">
<function-arg-description>
Certificate keystore PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePassword" type="optional">
<function-arg-description>
Certificate keystore PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTimeLimit" type="optional">
<function-arg-description>
Maximum length of time in seconds to allow for the search
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsMatchedValuesFilter" type="optional">
<function-arg-description>
Use the LDAP matched values control with the provided filter
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<function-arg-def name="dsDryRun" type="optional">
<function-arg-description>
Show what would be done but do not perform any operation
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsSaslOption" type="optional">
<function-arg-description>
SASL bind options
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePath" type="optional">
<function-arg-description>
Certificate trust store path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePassword" type="optional">
<function-arg-description>
Certificate trust store PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePasswordFile" type="optional">
<function-arg-description>
Certificate trust store PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsUseStartTLS" type="optional">
<function-arg-description>
Use StartTLS to secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSASLExternal" type="optional">
<function-arg-description>
Use the SASL EXTERNAL authentication mechanism
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSSL" type="optional">
<function-arg-description>
Use SSL for secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsTrustAll" type="optional">
<function-arg-description>
Trust all server SSL certificates
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsCertNickname" type="optional">
<function-arg-description>
Nickname of certificate for SSL client authentication
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsProxyAs" type="optional">
<function-arg-description>
Use the proxied authorization control with the given authorization ID
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsUsePasswordPolicyControl" type="optional">
<function-arg-description>
Use the password policy request control
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsSimplePageSize" type="optional">
<function-arg-description>
Use the simple paged results control with the given page size
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsSortOrder" type="optional">
<function-arg-description>
Sort the results using the provided sort order
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsVirtualListView" type="optional">
<function-arg-description>
Use the virtual list view control to retrieve the specified results page
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsGetEffectiveRightsAuthzid" type="optional">
<function-arg-description>
Use geteffectiverights control with the provided authzid
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsGetEffectiveRightsAttribute" type="optional">
<function-arg-description>
Specifies geteffectiverights control specific attribute list
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsVersion" type="optional">
<function-arg-description>
LDAP protocol version number
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsSizeLimit" type="optional">
<function-arg-description>
Maximum number of entries to return from the search
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsDontWrap" type="optional">
<function-arg-description>
Do not wrap long lines
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsVerbose" type="optional">
<function-arg-description>
Use verbose mode
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsScope" type="optional">
<function-arg-description>
The scope of the search operation
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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"/>
</function-arg-def>
<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>
<function-arg-def name="dsFilter" type="optional">
<function-arg-description>
The filter for the search operation
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<function-arg-def name="dsAttributes" type="optional">
<function-arg-description>
Only return these attributes
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="outputFile" type="optional" default="'None'">
<function-arg-description>
Output file containing the search result in ldif format
</function-arg-description>
<function-arg-property name="type" value="file"/>
</function-arg-def>
<function-arg-def name="outputPath" type="optional">
<function-arg-description>
Path containing the outputFile
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<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>
<function-arg-def name="logStderr" type="optional" default="True">
<function-arg-description>
If true, stderr for the command is redirect to stdout.
</function-arg-description>
<function-arg-property name="type" value="enum">
<function-arg-property-description>
This argument can only have boolean values
</function-arg-property-description>
<function-arg-property-data type="choice" value="True"/>
<function-arg-property-data type="choice" value="False"/>
</function-arg-property>
</function-arg-def>
<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>
</function-map-args>
<sequence>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w %s' % dsInstancePswd)
if dsScope:
STAFCmdParamsList.append('-s %s' % dsScope)
if dsDereferencePolicy:
STAFCmdParamsList.append('-a %s' % dsDereferencePolicy)
if dsTypesOnly:
STAFCmdParamsList.append('-A')
if dsAssertionFilter:
STAFCmdParamsList.append('--assertionFilter "%s"' % dsAssertionFilter)
if dsBaseDN:
STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
else:
STAFCmdParamsList.append('-b ""')
if dsContinueOnError:
STAFCmdParamsList.append('-c')
if dsPersistentSearch:
STAFCmdParamsList.append('-C %s' % dsPersistentSearch)
if dsCountEntries:
STAFCmdParamsList.append('--countEntries')
if dsGetEffectiveRightsAttribute:
for attribute in dsGetEffectiveRightsAttribute:
STAFCmdParamsList.append('-e %s' % attribute)
if dsReportAuthzID:
STAFCmdParamsList.append('-E')
if dsFilename:
STAFCmdParamsList.append('-f %s' % dsFilename)
if dsGetEffectiveRightsAuthzid:
STAFCmdParamsList.append('-g %s' % dsGetEffectiveRightsAuthzid)
if dsVirtualListView:
STAFCmdParamsList.append('-G %s' % dsVirtualListView)
if dsHelp:
STAFCmdParamsList.append('-H')
if dsEncoding:
STAFCmdParamsList.append('-i %s' % dsEncoding)
if dsBindPasswordFile:
STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
if dsControl:
STAFCmdParamsList.append('-J "%s"' % dsControl)
if dsKeyStorePath:
STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
if dsTimeLimit:
STAFCmdParamsList.append('-l %s' % dsTimeLimit)
if dsMatchedValuesFilter:
STAFCmdParamsList.append('--matchedValuesFilter "%s"' % dsMatchedValuesFilter)
if dsDryRun:
STAFCmdParamsList.append('-n')
if dsCertNickname:
STAFCmdParamsList.append('-N %s' % dsCertNickname)
if dsSaslOption:
STAFCmdParamsList.append('-o %s' % dsSaslOption)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsTrustStorePath:
STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
if dsUseStartTLS:
STAFCmdParamsList.append('-q')
if dsUseSASLExternal:
STAFCmdParamsList.append('-r')
if dsSimplePageSize:
STAFCmdParamsList.append('--simplePageSize %s' % dsSimplePageSize)
if dsSortOrder:
STAFCmdParamsList.append('-S %s' % dsSortOrder)
if dsDontWrap:
STAFCmdParamsList.append('-T')
if dsTrustStorePassword:
STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
if dsTrustStorePasswordFile:
STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
if dsKeyStorePasswordFile:
STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
if dsUsePasswordPolicyControl:
STAFCmdParamsList.append('--usePasswordPolicyControl')
if dsVersion:
STAFCmdParamsList.append('-V %s' % dsVersion)
if dsVerbose:
STAFCmdParamsList.append('-v')
if dsKeyStorePassword:
STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
if dsTrustAll:
STAFCmdParamsList.append('-X')
if dsProxyAs:
STAFCmdParamsList.append('-Y "%s"' % dsProxyAs)
if dsUseSSL:
STAFCmdParamsList.append('-Z')
if dsSizeLimit:
STAFCmdParamsList.append('-z %s' % dsSizeLimit)
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if dsFilter:
STAFCmdParamsList.append('"%s"' % dsFilter)
if dsAttributes:
STAFCmdParamsList.append('%s' % dsAttributes)
if not outputPath:
outputPath = '%s/..' % (dsPath)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<if expr="outputFile != 'None'">
<call function="'runCommand'" >
{ 'name' : 'LDAP Search Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'outputFile': '%s/%s' % (outputPath, outputFile) ,
'expectedRC': expectedRC ,
'logStderr' : logStderr,
'knownIssue': knownIssue
}
</call>
<else>
<call function="'runCommand'" >
{ 'name' : 'LDAP Search Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC ,
'logStderr' : logStderr,
'knownIssue': knownIssue
}
</call>
</else>
</if>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="SearchObject">
<function-prolog>
This function searches the Directory Server with optional arguments possible
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="pathname"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsProxyDN" type="optional">
<function-arg-description>
Directory Server Proxy DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsScope" type="optional">
<function-arg-description>
The scope of the search operation
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<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"/>
</function-arg-def>
<function-arg-def name="dsFilter" type="optional">
<function-arg-description>
The filter for the search operation
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<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="filter"/>
</function-arg-def>
<function-arg-def name="attributes" type="optional">
<function-arg-description>
Optional Attributes to return
</function-arg-description>
<function-arg-property name="type" value="attributes"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if dsProxyDN:
STAFCmdParamsList.append('-Y "%s"' % dsProxyDN)
if dsScope:
STAFCmdParamsList.append('-s %s' % dsScope)
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if dsBaseDN:
STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
if dsFilter:
STAFCmdParamsList.append('"%s"' % dsFilter)
if attributes:
STAFCmdParamsList.append('%s' % attributes)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'name' : 'ldapsearch',
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="SearchObjectNoPwd">
<function-prolog>
This function searches the Directory Server with optional arguments possible
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="pathname"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<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"/>
</function-arg-def>
<function-arg-def name="dsFilter" type="optional">
<function-arg-description>
The filter for the search operation
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<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="filter"/>
</function-arg-def>
<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-def>
<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>
</function-map-args>
<sequence>
<call function="'runCommand'" >
{ 'name' : 'Search Base Object No Password',
'command' : '%s/ldapsearch%s' % (dsBinPath,fileExt),
'arguments' : '-h %s -p %s -D "%s" %s -b "%s" "%s"' % (dsInstanceHost,dsInstancePort,dsInstanceDn,extraParams,dsBaseDN,dsFilter),
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- TO BE DEPRECATED -->
<function name="AnonSearchObject">
<function-prolog>
This function searches the Directory Server anonymously with optional arguments possible
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="pathname"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<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"/>
</function-arg-def>
<function-arg-def name="dsFilter" type="optional">
<function-arg-description>
The filter for the search operation
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<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="filter"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<script>
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
</script>
<call function="'runCommand'" >
{ 'name' : 'Anonymous Search Base Object',
'location' : location,
'command' : STAFCmd,
'arguments' : '-h %s -p %s %s -b "%s" "%s"' % (dsInstanceHost,dsInstancePort,extraParams,dsBaseDN,dsFilter),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- ldapdelete Function With Script-->
<function name="ldapDeleteWithScript">
<function-prolog>
This function performs an ldapdelete using the script
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="hostname"/>
</function-arg-def>
<function-arg-def name="dsContinueOnError" type="optional">
<function-arg-description>
Continue processing even if there are errors
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsFilename" type="optional">
<function-arg-description>
Specifies the LDIF file containing the changes to apply
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsHelp" type="optional">
<function-arg-description>
Display this usage information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsEncoding" type="optional">
<function-arg-description>
Use the specified character set for command-line input
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBindPasswordFile" type="optional">
<function-arg-description>
Bind password file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsControl" type="optional">
<function-arg-description>
Use a request control with the provided information
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePath" type="optional">
<function-arg-description>
Certificate keystore path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePasswordFile" type="optional">
<function-arg-description>
Certificate keystore PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePassword" type="optional">
<function-arg-description>
Certificate keystore PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsDryRun" type="optional">
<function-arg-description>
Show what would be done but do not perform any operation
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsSaslOption" type="optional">
<function-arg-description>
SASL bind options
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePath" type="optional">
<function-arg-description>
Certificate trust store path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePassword" type="optional">
<function-arg-description>
Certificate trust store PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePasswordFile" type="optional">
<function-arg-description>
Certificate trust store PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsUseStartTLS" type="optional">
<function-arg-description>
Use StartTLS to secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSASLExternal" type="optional">
<function-arg-description>
Use the SASL EXTERNAL authentication mechanism
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSSL" type="optional">
<function-arg-description>
Use SSL for secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsTrustAll" type="optional">
<function-arg-description>
Trust all server SSL certificates
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsVersion" type="optional">
<function-arg-description>
Display Directory Server version information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsCertNickname" type="optional">
<function-arg-description>
Nickname of certificate for SSL client authentication
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsLdapVersion" type="optional">
<function-arg-description>
LDAP protocol version number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsVerbose" type="optional">
<function-arg-description>
Use verbose mode
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsDeleteSubtree" type="optional">
<function-arg-description>
Delete the specified entry and all entries below it
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsDn" type="optional">
<function-arg-description>
DNs of the entries to delete
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapdelete%s' % (dsBinPath,fileExt)
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w %s' % dsInstancePswd)
if dsContinueOnError:
STAFCmdParamsList.append('-c')
if dsFilename:
STAFCmdParamsList.append('-f %s' % dsFilename)
if dsHelp:
STAFCmdParamsList.append('-H')
if dsEncoding:
STAFCmdParamsList.append('-i %s' % dsEncoding)
if dsBindPasswordFile:
STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
if dsControl:
STAFCmdParamsList.append('-J %s' % dsControl)
if dsKeyStorePath:
STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
if dsCertNickname:
STAFCmdParamsList.append('-N %s' % dsCertNickname)
if dsDryRun:
STAFCmdParamsList.append('-n')
if dsSaslOption:
STAFCmdParamsList.append('-o %s' % dsSaslOption)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsTrustStorePath:
STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
if dsUseStartTLS:
STAFCmdParamsList.append('-q')
if dsUseSASLExternal:
STAFCmdParamsList.append('-r')
if dsTrustStorePassword:
STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
if dsTrustStorePasswordFile:
STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
if dsKeyStorePasswordFile:
STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
if dsVersion:
STAFCmdParamsList.append('--version')
if dsVerbose:
STAFCmdParamsList.append('-v')
if dsLdapVersion:
STAFCmdParamsList.append('-V %s' % dsLdapVersion)
if dsKeyStorePassword:
STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
if dsTrustAll:
STAFCmdParamsList.append('-X')
if dsDeleteSubtree:
STAFCmdParamsList.append('-x')
if dsUseSSL:
STAFCmdParamsList.append('-Z')
if dsDn:
for dn in dsDn:
STAFCmdParamsList.append('"%s"' % dn)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'name' : 'LDAP Delete Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="DeleteEntry">
<function-prolog>
This function an entry in the Directory Server
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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>
<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>
<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>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBaseDN" type="required">
<function-arg-description>
Entry to be deleted in the Directory Server
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<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>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapdelete%s' % (dsBinPath,fileExt)
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if dsBaseDN:
STAFCmdParamsList.append('"%s"' % dsBaseDN)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'name' : 'Delete Object',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- ldapcompare Function With Script-->
<function name="ldapCompareWithScript">
<function-prolog>
This function performs an ldapcompare using the script
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="hostname"/>
</function-arg-def>
<function-arg-def name="dsAssertionFilter" type="optional">
<function-arg-description>
Use the LDAP assertion control with the provided filter
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<function-arg-def name="dsContinueOnError" type="optional">
<function-arg-description>
Continue processing even if there are errors
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsReportAuthzID" type="optional">
<function-arg-description>
Use the authorization identity control
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsFilename" type="optional">
<function-arg-description>
Specifies the LDIF file containing the changes to apply
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsHelp" type="optional">
<function-arg-description>
Display this usage information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsEncoding" type="optional">
<function-arg-description>
Use the specified character set for command-line input
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBindPasswordFile" type="optional">
<function-arg-description>
Bind password file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsControl" type="optional">
<function-arg-description>
Use a request control with the provided information
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePath" type="optional">
<function-arg-description>
Certificate keystore path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePasswordFile" type="optional">
<function-arg-description>
Certificate keystore PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePassword" type="optional">
<function-arg-description>
Certificate keystore PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsDryRun" type="optional">
<function-arg-description>
Show what would be done but do not perform any operation
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsSaslOption" type="optional">
<function-arg-description>
SASL bind options
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePath" type="optional">
<function-arg-description>
Certificate trust store path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePassword" type="optional">
<function-arg-description>
Certificate trust store PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePasswordFile" type="optional">
<function-arg-description>
Certificate trust store PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsUseStartTLS" type="optional">
<function-arg-description>
Use StartTLS to secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSASLExternal" type="optional">
<function-arg-description>
Use the SASL EXTERNAL authentication mechanism
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSSL" type="optional">
<function-arg-description>
Use SSL for secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsTrustAll" type="optional">
<function-arg-description>
Trust all server SSL certificates
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsVersion" type="optional">
<function-arg-description>
Display Directory Server version information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsCertNickname" type="optional">
<function-arg-description>
Nickname of certificate for SSL client authentication
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsLdapVersion" type="optional">
<function-arg-description>
LDAP protocol version number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsVerbose" type="optional">
<function-arg-description>
Use verbose mode
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsAttributeValue" type="optional">
<function-arg-description>
Attribute:value assertion argument
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsDn" type="optional">
<function-arg-description>
DNs of the entries for with to perform the compare operations
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="useCmpRC" type="optional">
<function-arg-description>
Use an exit code that indicates whether comparison is successful.
Results are an exit code of 6 (COMPARE_TRUE) or
an exit code of 5 (COMPARE_FALSE).
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapcompare%s' % (dsBinPath,fileExt)
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w %s' % dsInstancePswd)
if dsAssertionFilter:
STAFCmdParamsList.append('--assertionFilter "%s"' % dsAssertionFilter)
if dsContinueOnError:
STAFCmdParamsList.append('-c')
if dsReportAuthzID:
STAFCmdParamsList.append('-E')
if dsFilename:
STAFCmdParamsList.append('-f %s' % dsFilename)
if dsHelp:
STAFCmdParamsList.append('-H')
if dsEncoding:
STAFCmdParamsList.append('-i %s' % dsEncoding)
if dsBindPasswordFile:
STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
if dsControl:
STAFCmdParamsList.append('-J %s' % dsControl)
if dsKeyStorePath:
STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
if dsCertNickname:
STAFCmdParamsList.append('-N %s' % dsCertNickname)
if dsDryRun:
STAFCmdParamsList.append('-n')
if dsSaslOption:
STAFCmdParamsList.append('-o %s' % dsSaslOption)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsTrustStorePath:
STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
if dsUseStartTLS:
STAFCmdParamsList.append('-q')
if dsUseSASLExternal:
STAFCmdParamsList.append('-r')
if dsTrustStorePassword:
STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
if dsTrustStorePasswordFile:
STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
if dsKeyStorePasswordFile:
STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
if dsVersion:
STAFCmdParamsList.append('--version')
if dsVerbose:
STAFCmdParamsList.append('-v')
if dsLdapVersion:
STAFCmdParamsList.append('-V %s' % dsLdapVersion)
if dsKeyStorePassword:
STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
if dsTrustAll:
STAFCmdParamsList.append('-X')
if dsUseSSL:
STAFCmdParamsList.append('-Z')
if useCmpRC:
STAFCmdParamsList.append('--useCompareResultCode')
if dsDn:
for dn in dsDn:
STAFCmdParamsList.append('"%s"' % dn)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<call function="'runCommand'" >
{ 'name' : 'LDAP Compare Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="compareEntry">
<function-prolog>
This function compares the attribute and value an entry to the Directory Server
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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>
<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>
<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>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="attrToBeCompared" type="required">
<function-arg-description>
Attribute to be compared in Directory Server
</function-arg-description>
<function-arg-property name="type" value="attribute"/>
</function-arg-def>
<function-arg-def name="entryToBeCompared" type="required">
<function-arg-description>
Entry to be compared in Directory Server
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<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>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapcompare%s' % (dsBinPath,fileExt)
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if attrToBeCompared:
STAFCmdParamsList.append('"%s"' % attrToBeCompared)
if entryToBeCompared:
STAFCmdParamsList.append('"%s"' % entryToBeCompared)
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<call function="'runCommand'" >
{ 'name' : 'Compare Object',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="_ldapCommonArgs">
<function-prolog>
This function resolves common ldap arguments
</function-prolog>
<function-no-args/>
<script>
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w "%s"' % dsInstancePswd)
</script>
</function>
<!-- ldappasswordmodify Function With Script-->
<function name="ldapPasswordModifyWithScript">
<function-prolog>
This function performs an ldappasswordmodify using the script
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="hostname"/>
</function-arg-def>
<function-arg-def name="dsHelp" type="optional">
<function-arg-description>
Display this usage information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsBindPasswordFile" type="optional">
<function-arg-description>
Bind password file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePath" type="optional">
<function-arg-description>
Certificate keystore path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePasswordFile" type="optional">
<function-arg-description>
Certificate keystore PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsKeyStorePassword" type="optional">
<function-arg-description>
Certificate keystore PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePath" type="optional">
<function-arg-description>
Certificate trust store path
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePassword" type="optional">
<function-arg-description>
Certificate trust store PIN
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsTrustStorePasswordFile" type="optional">
<function-arg-description>
Certificate trust store PIN file
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsUseStartTLS" type="optional">
<function-arg-description>
Use StartTLS to secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsUseSSL" type="optional">
<function-arg-description>
Use SSL for secure communication with the server
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsTrustAll" type="optional">
<function-arg-description>
Trust all server SSL certificates
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsAuthzID" type="optional">
<function-arg-description>
Specifies the authorization ID for the user entry whose password should be changed
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsProvideDNForAuthzID" type="optional">
<function-arg-description>
Indicates that the bind DN should be used as the authorization ID for the password modify operation
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsCurrentPassword" type="optional">
<function-arg-description>
Specifies the current password for the target user
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsCurrentPasswordFile" type="optional">
<function-arg-description>
Specifies the path to a file containing the current password for the target user
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsNewPassword" type="optional">
<function-arg-description>
Specifies the new password for the target user
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsNewPasswordFile" type="optional">
<function-arg-description>
Specifies the path to a file containing the new password for the target user
</function-arg-description>
<function-arg-property name="type" value="filename"/>
</function-arg-def>
<function-arg-def name="dsVersion" type="optional">
<function-arg-description>
Display Directory Server version information
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsSaslOption" type="optional">
<function-arg-description>
SASL bind options
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldappasswordmodify%s' % (dsBinPath,fileExt)
if dsAuthzID:
STAFCmdParamsList.append('-a "%s"' % dsAuthzID)
if dsProvideDNForAuthzID:
STAFCmdParamsList.append('-A')
if dsInstanceHost:
STAFCmdParamsList.append('-h %s' % dsInstanceHost)
if dsInstanceDn:
STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
if dsInstancePswd:
STAFCmdParamsList.append('-w %s' % dsInstancePswd)
if dsCurrentPassword:
STAFCmdParamsList.append('-c %s' % dsCurrentPassword)
if dsCurrentPasswordFile:
STAFCmdParamsList.append('-C %s' % dsCurrentPasswordFile)
if dsHelp:
STAFCmdParamsList.append('-H')
if dsBindPasswordFile:
STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
if dsKeyStorePath:
STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
if dsNewPassword:
STAFCmdParamsList.append('-n %s' % dsNewPassword)
if dsNewPasswordFile:
STAFCmdParamsList.append('-N %s' % dsNewPasswordFile)
if dsSaslOption:
STAFCmdParamsList.append('-o %s' % dsSaslOption)
if dsInstancePort:
STAFCmdParamsList.append('-p %s' % dsInstancePort)
if dsTrustStorePath:
STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
if dsUseStartTLS:
STAFCmdParamsList.append('-q')
if dsTrustStorePassword:
STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
if dsTrustStorePasswordFile:
STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
if dsKeyStorePasswordFile:
STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
if dsVersion:
STAFCmdParamsList.append('-V')
if dsKeyStorePassword:
STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
if dsTrustAll:
STAFCmdParamsList.append('-X')
if dsUseSSL:
STAFCmdParamsList.append('-Z')
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<call function="'runCommand'" >
{ 'name' : 'LDAP Password Modify Script',
'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- Modify an attribute -->
<function name="modifyAnAttribute">
<function-prolog>
This function modifies an entry in the Directory Server
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="required">
<function-arg-description>
Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="required">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="required">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="DNToModify" type="required">
<function-arg-description>
DN to modify
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="attributeName" type="optional">
<function-arg-description>
Attribute to modify
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="newAttributeValue" type="optional">
<function-arg-description>
New Attribute Value
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="listAttributes" type="optional" default="' '">
<function-arg-description>
List of attributes name and value to modify. The format is name:value
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="changetype" type="required">
<function-arg-description>
Type of modification, can be delete, add, replace
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="suppressTestStatus" type="optional" default="0">
<function-arg-description>
Supress the call to checkTestRC
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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="string"/>
</function-arg-def>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
<!-- Build the Command -->
STAFCmdParamsList=[]
STAFCmdParams=''
STAFCmd=''
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<if expr="listAttributes != ' '">
<iterate var="anAttributeToModify" in="listAttributes">
<script>
if anAttributeToModify:
anAttributeToModify=anAttributeToModify.replace('"','QUOT')
STAFCmdParamsList.append('-l "%s"' % anAttributeToModify)
</script>
</iterate>
</if>
<script>
if newAttributeValue:
newAttributeValue=newAttributeValue.replace('"','QUOT')
</script>
<script>
if DNToModify:
STAFCmdParamsList.append('-d "%s"' % DNToModify)
if attributeName:
STAFCmdParamsList.append('-a "%s"' % attributeName)
if newAttributeValue:
STAFCmdParamsList.append('-v "%s"' % newAttributeValue)
if changetype:
STAFCmdParamsList.append('-t "%s"' % changetype)
STAFCmdParams=' '.join(STAFCmdParamsList)
STAFCmd='modifyAnAttribute'
</script>
<if expr="suppressTestStatus == '1'">
<script>
expectedRC = 'noCheck'
</script>
</if>
<call function="'runCommand'" >
{ 'name' : 'Modify An Attribute value',
'command' : '%s/bin/java' % JAVA_HOME,
'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
'location' : location,
'envCmd' : ['CLASSPATH=%s/../%s/ldapjndi' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldapjndi' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
[RC,STAXResult]
</return>
</sequence>
</function>
<!-- Create a load on Directory with modifies -->
<function name="loadOfModifies">
<function-prolog>
This function creates a load of modifies against Directory. It is only for entries with uid=user.xxx.
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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>
<function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="required">
<function-arg-description>
Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="required">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="required">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="partialDNToModify" type="required">
<function-arg-description>
partial DN to modify, all but the uid=user.xxxx
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="attributeName" type="optional">
<function-arg-description>
Attribute to modify
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="newAttributeValue" type="optional">
<function-arg-description>
New Attribute Value
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="listAttributes" type="optional" default="' '">
<function-arg-description>
List of attributes name and value to modify. The format is name:value
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="changetype" type="required">
<function-arg-description>
Type of modification, can be delete, add, replace
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="numEntries" type="required">
<function-arg-description>
Number of entries to modify
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="clientID" type="optional">
<function-arg-description>
ID for the client doing the modify
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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="string"/>
</function-arg-def>
</function-map-args>
<sequence>
<script>
import random
curr_rdn_num=random.randint(0,99)
curr_dn="uid=user.%s,%s" % (curr_rdn_num, partialDNToModify)
</script>
<message>
'****From client, %s, Modifying %s' % (clientID,curr_dn)
</message>
<call function="'modifyAnAttribute'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsPath' : dsPath ,
'DNToModify' : curr_dn ,
'attributeName' : 'description' ,
'newAttributeValue' : 'New description for %s' % curr_dn ,
'changetype' : 'replace' ,
'suppressTestStatus' : '1' }
</call>
<return>
[STAXCode,STAXReason]
</return>
</sequence>
</function>
<!-- Add a New entry-->
<function name="addAnEntry">
<function-prolog>
This function modifies an entry in the Directory Server
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname" />
</function-arg-def>
<function-arg-def name="dsInstancePort" type="required">
<function-arg-description>
Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="required">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="required">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="DNToAdd" type="required">
<function-arg-description>
DN to add
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="listAttributes" type="required">
<function-arg-description>
Attributes to add
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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-def>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
# build the command
STAFCmdParamsList=[]
STAFCmdParams=''
STAFCmd=''
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<iterate var="anAttributeToAdd" in="listAttributes">
<script>
anAttributeToAdd=anAttributeToAdd.replace('"','QUOT')
STAFCmdParamsList.append('-v "%s"' % anAttributeToAdd)
</script>
</iterate>
<script>
if DNToAdd:
STAFCmdParamsList.append('-d "%s"' % DNToAdd)
STAFCmdParams=' '.join(STAFCmdParamsList)
STAFCmd='addAnEntry'
</script>
<call function="'runCommand'" >
{ 'name' : 'Add New Entry',
'command' : '%s/bin/java' % JAVA_HOME,
'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
'location' : location,
'envCmd' : ['CLASSPATH=%s/../%s/ldapjndi' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldapjndi' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- Rename an entry -->
<function name="modifyDn">
<function-prolog>
This function renames an entry, either by a modRDN or by a modDN
</function-prolog>
<function-map-args>
<function-arg-def name="location"
type="optional"
default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsPath"
type="optional"
default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost"
type="optional"
default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="required">
<function-arg-description>
Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="required">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="required">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="DNToModify" type="required">
<function-arg-description>
DN to modify
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="newRDN"
type="optional"
default="None">
<function-arg-description>
New rdn name : ie uid=jdoe_bis. If not passed, the newRDN will be the
same old rdn
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="deleteOldRDN"
type="optional"
default="None">
<function-arg-description>
1 : delete old rdn, 0 do not delete old rdn, default value is 1
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="newSuperior"
type="optional"
default="None">
<function-arg-description>
New parent entry for the entry
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
#Build the Command
STAFCmdParamsList=[]
STAFCmdParams=''
STAFCmd=''
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'" />
<script>
if DNToModify:
STAFCmdParamsList.append('-d "%s"' % DNToModify)
if newRDN:
STAFCmdParamsList.append('-e "%s"' % newRDN)
if deleteOldRDN == 0:
STAFCmdParamsList.append('-f "false"')
elif deleteOldRDN == 1:
STAFCmdParamsList.append('-f "true"')
if newSuperior:
STAFCmdParamsList.append('-g "%s"' % newSuperior)
STAFCmdParams=' '.join(STAFCmdParamsList)
STAFCmd='modifyDn'
</script>
<call function="'runCommand'" >
{ 'name' : 'Modify DN',
'command' : '%s/bin/java' % JAVA_HOME,
'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
'location' : location,
'envCmd' : ['CLASSPATH=%s/../%s/ldapjndi' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldapjndi' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- Do an ldapsearch using SASL authentication -->
<function name="saslSearch">
<function-prolog>
This function searches the Directory Server using SASL authentication
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="required">
<function-arg-description>
Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="dsScope" type="optional">
<function-arg-description>
Search scope
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsBaseDN" type="required">
<function-arg-description>
Search base dn
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="dsFilter" type="required">
<function-arg-description>
Search filter
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="mechanism" type="required">
<function-arg-description>
SASL mechanism
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="authenticationId" type="required">
<function-arg-description>
Authentication ID
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="password" type="required">
<function-arg-description>
Authentication password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="authorizationId" type="optional">
<function-arg-description>
Authorization ID
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="realm" type="optional">
<function-arg-description>
Attribute to modify
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="protection" type="optional">
<function-arg-description>
Quality of protection (auth / auth-int / auth-conf)
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="strength" type="optional">
<function-arg-description>
Cipher strength (low / medium / high)
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="maxbuffersize" type="optional">
<function-arg-description>
Maximum receive buffer size.
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="suppressTestStatus" type="optional" default="0">
<function-arg-description>
Supress the call to checkTestRC
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<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="string"/>
</function-arg-def>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
<!-- Build the Command -->
STAFCmdParamsList=[]
STAFCmdParams=''
STAFCmd=''
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if dsScope:
STAFCmdParamsList.append('-s "%s"' % dsScope)
if dsBaseDN:
STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
if dsFilter:
STAFCmdParamsList.append('-f "%s"' % dsFilter)
if mechanism:
STAFCmdParamsList.append('--mech "%s"' % mechanism)
if authenticationId:
STAFCmdParamsList.append('--authid "%s"' % authenticationId)
if password:
STAFCmdParamsList.append('-w "%s"' % password)
if authorizationId:
STAFCmdParamsList.append('--authorizationId "%s"' % authorizationId)
if realm:
STAFCmdParamsList.append('--realm "%s"' % realm)
if protection:
STAFCmdParamsList.append('--qop "%s"' % protection)
if strength:
STAFCmdParamsList.append('--strength "%s"' % strength)
if maxbuffersize:
STAFCmdParamsList.append('--maxbufsize "%s"' % maxbuffersize)
STAFCmdParams=' '.join(STAFCmdParamsList)
STAFCmd='saslSearchClient'
</script>
<if expr="suppressTestStatus == '1'">
<script>
expectedRC = 'noCheck'
</script>
</if>
<call function="'runCommand'" >
{ 'name' : 'Modify An Attribute value',
'command' : '%s/bin/java' % JAVA_HOME,
'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
'location' : location,
'envCmd' : ['CLASSPATH=%s/../%s/ldapjndi' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldapjndi' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<function name="SearchExternalChangelog">
<function-prolog>
This function searches the external changelog
</function-prolog>
<function-map-args>
<function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<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="pathname"/>
</function-arg-def>
<function-arg-def name="dsInstanceHost" type="optional">
<function-arg-description>
Directory Server Host Name
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsInstancePort" type="optional">
<function-arg-description>
Directory Server Port Number
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="dsInstanceDn" type="optional">
<function-arg-description>
Directory Server Manager DN
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<function-arg-def name="dsInstancePswd" type="optional">
<function-arg-description>
Directory Server Manager Password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="dsScope" type="optional">
<function-arg-description>
The scope of the search operation
</function-arg-description>
<function-arg-property name="type" value="dn"/>
</function-arg-def>
<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"/>
</function-arg-def>
<function-arg-def name="dsFilter" type="required">
<function-arg-description>
The filter for the search operation
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<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>
<function-arg-def name="attributes" type="optional">
<function-arg-description>
Optional Attributes to return
</function-arg-description>
<function-arg-property name="type" value="attributes"/>
</function-arg-def>
<function-arg-def name="changelogCookie"
type="optional"
default="None">
<function-arg-description>
Changelog cookie of the last change retrieved.
(OpenDS external changelog => non draft-compatible mode)
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="changeNumberFilter"
type="optional"
default="None">
<function-arg-description>
Changenumber corresponding to the last change retrieved.
(Changelog draft-compatible mode)
</function-arg-description>
<function-arg-property name="type" value="filter"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
</script>
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
</script>
<!-- Set common ldap arguments -->
<call function="'_ldapCommonArgs'"/>
<script>
if changelogCookie:
control = '1.3.6.1.4.1.26027.1.5.4:false:%s' % changelogCookie
STAFCmdParamsList.append('--control "%s"' % control)
if dsScope:
STAFCmdParamsList.append('-s %s' % dsScope)
if extraParams:
STAFCmdParamsList.append('%s' % extraParams)
if dsBaseDN:
STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
if dsFilter:
if changeNumberFilter:
searchFilter = '&amp;%s%s' % (changeNumberFilter, dsFilter)
else:
searchFilter = dsFilter
STAFCmdParamsList.append('"%s"' % searchFilter)
else:
if changeNumberFilter:
STAFCmdParamsList.append('"%s"' % changeNumberFilter)
if attributes:
STAFCmdParamsList.append('%s' % attributes)
else:
STAFCmdParamsList.append('"*" +')
STAFCmdParams=' '.join(STAFCmdParamsList)
</script>
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
<!-- Give the changes time to propagate in the ECL -->
<script>
myCounter = 1
taskRC = 1
noOfLoops = 10
</script>
<loop from="1" to="noOfLoops" while="taskRC != 0">
<sequence>
<message>
'LOOP number %s - %s %s' % (myCounter, STAFCmd, STAFCmdParams)
</message>
<call function="'runCommand'">
{ 'command' : STAFCmd,
'arguments' : STAFCmdParams,
'location' : location,
'name' : 'ldapsearch',
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<script>
STAFCmdRC = RC
STAFCmdResult = STAXResult
myCounter = myCounter + 1
</script>
<if expr='STAFCmdResult[0][1] != None and len(STAFCmdResult[0][1].strip()) > 0'>
<sequence>
<script>taskRC = 0</script>
<return>STAFCmdResult</return>
</sequence>
</if>
</sequence>
</loop>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- Read ECL and replay changes on stand-alone server -->
<function name="eclReadAndPlay">
<function-prolog>
This function reads the ECL in a replicated server and replays the changes
on a stand-alone server
</function-prolog>
<function-map-args>
<function-arg-def name="location"
type="optional"
default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Location of target host
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="dsPath"
type="optional"
default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<function-arg-def name="standaloneHost"
type="optional"
default="STAF_REMOTE_HOSTNAME">
<function-arg-description>
Stand-alone directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="standalonePort" type="required">
<function-arg-description>
Stand-alone directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="replicaHost1" type="required">
<function-arg-description>
Replicated Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="replicaPort1" type="required">
<function-arg-description>
Replicated Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="replicaHost2" type="required">
<function-arg-description>
Replicated Directory server hostname or IP address
</function-arg-description>
<function-arg-property name="type" value="hostname"/>
</function-arg-def>
<function-arg-def name="replicaPort2" type="required">
<function-arg-description>
Replicated Directory server port number
</function-arg-description>
<function-arg-property name="type" value="Port number"/>
</function-arg-def>
<function-arg-def name="bindDn" type="required">
<function-arg-description>
Bind DN
</function-arg-description>
<function-arg-property name="type" value="DN"/>
</function-arg-def>
<function-arg-def name="bindPswd" type="required">
<function-arg-description>
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="eclMode" type="required">
<function-arg-description>
ECL search mode: "draft" or "opends"
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="queueSize"
type="optional"
default="1000">
<function-arg-description>
Size of the queue where the read updates are stored for the writer to
replay on the stand-alone server
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
<function-arg-def name="displayMissingChanges"
type="optional"
default="False">
<function-arg-description>
Whether information on missing changes should be displayed or not
</function-arg-description>
<function-arg-property name="type" value="boolean"/>
</function-arg-def>
<function-arg-def name="outputFilename" type="required">
<function-arg-description>
Standard output file name
</function-arg-description>
<function-arg-property name="type" value="filepath"/>
</function-arg-def>
<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>
<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>
</function-map-args>
<sequence>
<!-- Local variables -->
<script>
mylocation=location
#Build the Command
STAFCmdParamsList=[]
STAFCmdParams=''
STAFCmd='EclReadAndPlay'
</script>
<!-- Set common ldap arguments -->
<script>
STAFCmdParamsList.append('-m %s' % eclMode)
STAFCmdParamsList.append('-q %s' % queueSize)
STAFCmdParamsList.append('-D "%s"' % bindDn)
STAFCmdParamsList.append('-w "%s"' % bindPswd)
STAFCmdParamsList.append('-s %s:%s' % (standaloneHost, standalonePort))
STAFCmdParamsList.append('-p %s:%s' % (replicaHost1, replicaPort1))
STAFCmdParamsList.append('-p %s:%s' % (replicaHost2, replicaPort2))
STAFCmdParamsList.append('-o %s' % outputFilename)
if (displayMissingChanges == True):
displayMC = 'true'
else:
displayMC = 'false'
STAFCmdParamsList.append('-x %s' % displayMC)
STAFCmdParams=' '.join(STAFCmdParamsList)
STAFCmd='EclReadAndPlay'
</script>
<call function="'runCommand'" >
{ 'name' : 'Read ECL and replay',
'command' : '%s/bin/java' % JAVA_HOME,
'arguments' : '%s %s' % (STAFCmd,STAFCmdParams),
'location' : location,
'envCmd' : ['CLASSPATH=%s/../%s/ldapjdk:%s/../%s/ldapjdk/ldapjdk.jar' \
% (dsPath,remote.reljavadir,dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldapjdk' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
</stax>