ldap.xml revision 3951
3826N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3826N/A<!DOCTYPE stax SYSTEM "/stax.dtd">
3826N/A<!--
3826N/A ! CDDL HEADER START
3826N/A !
3826N/A ! The contents of this file are subject to the terms of the
3826N/A ! Common Development and Distribution License, Version 1.0 only
3826N/A ! (the "License"). You may not use this file except in compliance
3826N/A ! with the License.
3826N/A !
3826N/A ! You can obtain a copy of the license at
3826N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
3826N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
3826N/A ! See the License for the specific language governing permissions
3826N/A ! and limitations under the License.
3826N/A !
3826N/A ! When distributing Covered Code, include this CDDL HEADER in each
3826N/A ! file and include the License file at
3826N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
3826N/A ! add the following below this CDDL HEADER, with the fields enclosed
3826N/A ! by brackets "[]" replaced with your own identifying information:
3826N/A ! Portions Copyright [yyyy] [name of copyright owner]
3826N/A !
3826N/A ! CDDL HEADER END
3826N/A !
3826N/A ! Copyright 2007-2008 Sun Microsystems, Inc.
4458N/A ! -->
3826N/A<stax>
3826N/A <function name="addEntry">
3826N/A <function-prolog>
3826N/A This function adds an entry to the Directory Server from an ldif file
3826N/A </function-prolog>
4259N/A <function-map-args>
4259N/A <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
3826N/A <function-arg-description>
4259N/A Location of target host
4259N/A </function-arg-description>
4259N/A <function-arg-property name="type" value="hostname"/>
4259N/A </function-arg-def>
4259N/A <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
4259N/A <function-arg-description>
4259N/A Pathname to installation root
4259N/A </function-arg-description>
4259N/A <function-arg-property name="type" value="filepath"/>
4259N/A </function-arg-def>
4259N/A <function-arg-def name="dsInstanceHost" type="optional">
4259N/A <function-arg-description>
4259N/A Directory server hostname or IP address
4259N/A </function-arg-description>
4259N/A <function-arg-property name="type" value="hostname"/>
4259N/A </function-arg-def>
4259N/A <function-arg-def name="dsInstancePort" type="optional">
4259N/A <function-arg-description>
4259N/A Directory server port number
4259N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="Port number"/>
4259N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstanceDn" type="optional">
3826N/A <function-arg-description>
3826N/A Bind DN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="DN"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstancePswd" type="optional">
3826N/A <function-arg-description>
3826N/A Bind password
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="entryToBeAdded" type="required">
3826N/A <function-arg-description>
3826N/A Entry to be added to Directory Server in ldif format
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="DN"/>
3826N/A </function-arg-def>
4458N/A <function-arg-def name="extraParams" type="optional">
3826N/A <function-arg-description>
3826N/A Optional extra parameters for specific test cases
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="expectedRC" type="optional" default="0">
4259N/A <function-arg-description>
4259N/A Expected return code value. Default value is 0
4259N/A Wildcard 'noCheck' to not check the RC
4259N/A </function-arg-description>
4259N/A <function-arg-property name="type" value="integer"/>
4259N/A </function-arg-def>
4259N/A <function-arg-def name="verbose" type="optional" default="True">
4259N/A <function-arg-description>
4259N/A Display (or not) output.
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="knownIssue" type="optional" default="None">
4458N/A <function-arg-description>
3826N/A Known issue. Corresponds to an issue number.
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string" />
3826N/A </function-arg-def>
3826N/A </function-map-args>
3826N/A <sequence>
3826N/A <!-- Local variables -->
3826N/A <script>
3826N/A mylocation=location
3826N/A </script>
3826N/A
3826N/A <!-- Build the Command -->
3826N/A <script>
3826N/A STAFCmdParamsList=[]
3826N/A STAFCmdParams=''
3826N/A
3826N/A if dsPath:
3826N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3826N/A STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
3826N/A
3826N/A STAFCmdParamsList.append('-a')
3826N/A </script>
3826N/A
3826N/A <!-- Set common ldap arguments -->
3826N/A <call function="'_ldapCommonArgs'" />
3826N/A
3826N/A <script>
3826N/A if extraParams:
3826N/A STAFCmdParamsList.append('%s' % extraParams)
3826N/A
3826N/A if entryToBeAdded:
3826N/A STAFCmdParamsList.append('-f "%s"' % entryToBeAdded)
3826N/A
3826N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3826N/A </script>
3826N/A <call function="'runCommand'">
3826N/A { 'command' : STAFCmd,
3826N/A 'arguments' : STAFCmdParams,
3826N/A 'location' : mylocation,
3826N/A 'name' : 'Add Entry From LDIF',
3826N/A 'expectedRC' : expectedRC,
3826N/A 'knownIssue' : knownIssue
3826N/A }
3826N/A </call>
3826N/A <return>
3826N/A STAXResult
3826N/A </return>
3826N/A </sequence>
3826N/A </function>
3826N/A
3826N/A
3826N/A <!-- ldapmodify Function With Script-->
3826N/A <function name="ldapModifyWithScript">
3826N/A <function-prolog>
3826N/A This function performs an ldapmodify using the script
3826N/A </function-prolog>
3826N/A <function-map-args>
3826N/A <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
3826N/A <function-arg-description>
3826N/A Location of target host
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
3826N/A <function-arg-description>
3826N/A Pathname to installation root
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsAdd" type="optional">
3826N/A <function-arg-description>
3826N/A Add the entries
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsAssertionFilter" type="optional">
3826N/A <function-arg-description>
3826N/A Use the LDAP assertion control with the provided filter
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filter"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsContinueOnError" type="optional">
3826N/A <function-arg-description>
3826N/A Continue processing even if there are errors
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsReportAuthzID" type="optional">
3826N/A <function-arg-description>
3826N/A Use the authorization identity control
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsFilename" type="optional">
3826N/A <function-arg-description>
3826N/A Specifies the LDIF file containing the changes to apply
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsHelp" type="optional">
3826N/A <function-arg-description>
3826N/A Display this usage information
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsEncoding" type="optional">
3826N/A <function-arg-description>
3826N/A Use the specified character set for command-line input
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsBindPasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Bind password file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsControl" type="optional">
3826N/A <function-arg-description>
3826N/A Use a request control with the provided information
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePath" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore path
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore PIN file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePassword" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore PIN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsDryRun" type="optional">
3826N/A <function-arg-description>
3826N/A Show what would be done but do not perform any operation
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsSaslOption" type="optional">
3826N/A <function-arg-description>
3826N/A SASL bind options
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePath" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store path
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePassword" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store PIN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store PIN file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseStartTLS" type="optional">
3826N/A <function-arg-description>
3826N/A Use StartTLS to secure communication with the server
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseSASLExternal" type="optional">
3826N/A <function-arg-description>
3826N/A Use the SASL EXTERNAL authentication mechanism
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseSSL" type="optional">
3826N/A <function-arg-description>
3826N/A Use SSL for secure communication with the server
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustAll" type="optional">
3826N/A <function-arg-description>
3826N/A Trust all server SSL certificates
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsVersion" type="optional">
3826N/A <function-arg-description>
3826N/A Display Directory Server version information
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsCertNickname" type="optional">
3826N/A <function-arg-description>
3826N/A Nickname of certificate for SSL client authentication
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsProxyAs" type="optional">
3826N/A <function-arg-description>
3826N/A Use the proxied authorization control with the given authorization ID
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPreReadAttributes" type="optional">
3826N/A <function-arg-description>
3826N/A Use the LDAP ReadEntry pre-read control
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPostReadAttributes" type="optional">
3826N/A <function-arg-description>
3826N/A Use the LDAP ReadEntry post-read control
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsLdapVersion" type="optional">
3826N/A <function-arg-description>
3826N/A LDAP protocol version number
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsVerbose" type="optional">
3826N/A <function-arg-description>
3826N/A Use verbose mode
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstanceHost" type="optional">
3826N/A <function-arg-description>
3826N/A Directory Server Host Name
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstancePort" type="optional">
3826N/A <function-arg-description>
3826N/A Directory Server Port Number
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstanceDn" type="optional">
3826N/A <function-arg-description>
3826N/A Directory Server Manager DN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="dn"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstancePswd" type="optional">
3826N/A <function-arg-description>
3826N/A Directory Server Manager Password
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="expectedRC" type="optional" default="0">
3826N/A <function-arg-description>
3826N/A Expected return code value. Default value is 0
3826N/A Wildcard 'noCheck' to not check the RC
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="knownIssue" type="optional" default="None">
3826N/A <function-arg-description>
3826N/A Known issue. Corresponds to an issue number.
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string" />
3826N/A </function-arg-def>
3826N/A </function-map-args>
3826N/A
3826N/A <sequence>
3826N/A
3826N/A <!-- Build the Command -->
3826N/A <script>
3826N/A STAFCmdParamsList=[]
3826N/A STAFCmdParams=''
3826N/A
3826N/A if dsPath:
3826N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3826N/A STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
3826N/A
3826N/A if dsAdd:
3826N/A STAFCmdParamsList.append('-a')
3826N/A
3826N/A if dsInstanceHost:
3826N/A STAFCmdParamsList.append('-h %s' % dsInstanceHost)
3826N/A
3826N/A if dsInstanceDn:
3826N/A STAFCmdParamsList.append('-D "%s"' % dsInstanceDn)
3826N/A
3826N/A if dsInstancePswd:
3826N/A STAFCmdParamsList.append('-w %s' % dsInstancePswd)
3826N/A
3826N/A if dsAssertionFilter:
3826N/A STAFCmdParamsList.append('--assertionFilter "%s"' % dsAssertionFilter)
3826N/A
3826N/A if dsContinueOnError:
3826N/A STAFCmdParamsList.append('-c')
3826N/A
3826N/A if dsReportAuthzID:
3826N/A STAFCmdParamsList.append('-E')
3826N/A
3826N/A if dsFilename:
3826N/A STAFCmdParamsList.append('-f %s' % dsFilename)
3826N/A
3826N/A if dsHelp:
3826N/A STAFCmdParamsList.append('-H')
3826N/A
3826N/A if dsEncoding:
3826N/A STAFCmdParamsList.append('-i %s' % dsEncoding)
3826N/A
3826N/A if dsBindPasswordFile:
3826N/A STAFCmdParamsList.append('-j %s' % dsBindPasswordFile)
3826N/A
3826N/A if dsControl:
3826N/A STAFCmdParamsList.append('-J %s' % dsControl)
3826N/A
3826N/A if dsKeyStorePath:
3826N/A STAFCmdParamsList.append('-K %s' % dsKeyStorePath)
3826N/A
3826N/A if dsCertNickname:
3826N/A STAFCmdParamsList.append('-N %s' % dsCertNickname)
3826N/A
3826N/A if dsDryRun:
3826N/A STAFCmdParamsList.append('-n')
3826N/A
3826N/A if dsSaslOption:
3826N/A STAFCmdParamsList.append('-o %s' % dsSaslOption)
3826N/A
3826N/A if dsInstancePort:
3826N/A STAFCmdParamsList.append('-p %s' % dsInstancePort)
3826N/A
3826N/A if dsTrustStorePath:
3826N/A STAFCmdParamsList.append('-P %s' % dsTrustStorePath)
3826N/A
3826N/A if dsUseStartTLS:
3826N/A STAFCmdParamsList.append('-q')
3826N/A
3826N/A if dsUseSASLExternal:
3826N/A STAFCmdParamsList.append('-r')
3826N/A
3826N/A if dsTrustStorePassword:
3826N/A STAFCmdParamsList.append('--trustStorePassword %s' % dsTrustStorePassword)
3826N/A
3826N/A if dsTrustStorePasswordFile:
3826N/A STAFCmdParamsList.append('-U %s' % dsTrustStorePasswordFile)
3826N/A
3826N/A if dsKeyStorePasswordFile:
3826N/A STAFCmdParamsList.append('-u %s' % dsKeyStorePasswordFile)
3826N/A
3826N/A if dsVersion:
3826N/A STAFCmdParamsList.append('--version')
3826N/A
3826N/A if dsVerbose:
3826N/A STAFCmdParamsList.append('-v')
3826N/A
3826N/A if dsLdapVersion:
3826N/A STAFCmdParamsList.append('-V %s' % dsLdapVersion)
3826N/A
3826N/A if dsKeyStorePassword:
3826N/A STAFCmdParamsList.append('-W %s' % dsKeyStorePassword)
3826N/A
3826N/A if dsTrustAll:
3826N/A STAFCmdParamsList.append('-X')
3826N/A
3826N/A if dsProxyAs:
3826N/A STAFCmdParamsList.append('-Y "%s"' % dsProxyAs)
3826N/A
3826N/A if dsUseSSL:
3826N/A STAFCmdParamsList.append('-Z')
3826N/A
3826N/A if dsPreReadAttributes:
3826N/A for attribute in dsPreReadAttributes:
3826N/A STAFCmdParamsList.append('--preReadAttributes %s' % attribute)
3826N/A
3826N/A if dsPostReadAttributes:
3826N/A for attribute in dsPostReadAttributes:
3826N/A STAFCmdParamsList.append('--postReadAttributes %s' % attribute)
3826N/A
3826N/A
3826N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3826N/A </script>
3826N/A
3826N/A <message>
3826N/A '%s %s' % (STAFCmd, STAFCmdParams)
3826N/A </message>
3826N/A
3826N/A <call function="'runCommand'">
3826N/A { 'name' : 'LDAP Modify Script',
3826N/A 'command' : STAFCmd,
3826N/A 'arguments' : STAFCmdParams,
3826N/A 'location' : location,
3826N/A 'expectedRC': expectedRC,
3826N/A 'knownIssue': knownIssue
3826N/A }
3826N/A </call>
3826N/A
3826N/A <return>
3826N/A STAXResult
3826N/A </return>
3826N/A </sequence>
3826N/A </function>
3826N/A
3826N/A
3826N/A <function name="modifyEntry">
3826N/A <function-prolog>
3826N/A This function modifies an entry in the Directory Server
3826N/A </function-prolog>
3826N/A <function-map-args>
3826N/A <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
3826N/A <function-arg-description>
3826N/A Location of target host
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
3826N/A <function-arg-description>
3826N/A Pathname to installation root
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filepath"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstanceHost" type="optional">
3826N/A <function-arg-description>
3826N/A Directory server hostname or IP address
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstancePort" type="optional">
3826N/A <function-arg-description>
3826N/A Directory server port number
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="Port number"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstanceDn" type="optional">
3826N/A <function-arg-description>
3826N/A Bind DN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="DN"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsInstancePswd" type="optional">
3826N/A <function-arg-description>
3826N/A Bind password
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="entryToBeModified" type="required">
3826N/A <function-arg-description>
3826N/A Entry to be modified in the Directory Server in ldif format
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="DN"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="extraParams" type="optional">
3826N/A <function-arg-description>
3826N/A Optional extra parameters for specific test cases
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="expectedRC" type="optional" default="0">
3826N/A <function-arg-description>
3826N/A Expected return code value. Default value is 0
3826N/A Wildcard 'noCheck' to not check the RC
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="knownIssue" type="optional" default="None">
3826N/A <function-arg-description>
3826N/A Known issue. Corresponds to an issue number.
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string" />
3826N/A </function-arg-def>
3826N/A </function-map-args>
3826N/A <sequence>
3826N/A
3826N/A <!-- Local variables -->
3826N/A <script>
3826N/A mylocation=location
3826N/A </script>
3826N/A
3826N/A <!-- Build the Command -->
3826N/A <script>
3826N/A STAFCmdParamsList=[]
3826N/A STAFCmdParams=''
3826N/A
3826N/A if dsPath:
3826N/A dsBinPath='%s/%s' % (dsPath,fileFolder)
3826N/A STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
3826N/A
3826N/A </script>
3826N/A
3826N/A <!-- Set common ldap arguments -->
3826N/A <call function="'_ldapCommonArgs'"/>
3826N/A
3826N/A <script>
3826N/A if extraParams:
3826N/A STAFCmdParamsList.append('%s' % extraParams)
3826N/A
3826N/A if entryToBeModified:
3826N/A STAFCmdParamsList.append('-f "%s"' % entryToBeModified)
3826N/A
3826N/A STAFCmdParams=' '.join(STAFCmdParamsList)
3826N/A </script>
3826N/A
3826N/A <message>
3826N/A '%s %s' % (STAFCmd, STAFCmdParams)
3826N/A </message>
3826N/A <call function="'runCommand'">
3826N/A { 'location' : location,
3826N/A 'command' : STAFCmd,
3826N/A 'arguments' : STAFCmdParams,
3826N/A 'name' : 'Modify Entry from ldif file',
3826N/A 'expectedRC': expectedRC,
3826N/A 'knownIssue': knownIssue
3826N/A }
3826N/A </call>
3826N/A
3826N/A <return>
3826N/A STAXResult
3826N/A </return>
3826N/A </sequence>
3826N/A </function>
3826N/A
3826N/A
3826N/A <!-- ldapsearch Function With Script-->
3826N/A <function name="ldapSearchWithScript">
3826N/A <function-prolog>
3826N/A This function performs an ldapsearch using the script
3826N/A </function-prolog>
3826N/A <function-map-args>
3826N/A <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
3826N/A <function-arg-description>
3826N/A Location of target host
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
3826N/A <function-arg-description>
3826N/A Pathname to installation root
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="hostname"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsDereferencePolicy" type="optional">
3826N/A <function-arg-description>
3826N/A Specifies dereference alias policy
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTypesOnly" type="optional">
3826N/A <function-arg-description>
3826N/A Specifies to only include attribute type names
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsAssertionFilter" type="optional">
3826N/A <function-arg-description>
3826N/A Use the LDAP assertion control with the provided filter
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filter"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsContinueOnError" type="optional">
3826N/A <function-arg-description>
3826N/A Continue processing even if there are errors
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsPersistentSearch" type="optional">
3826N/A <function-arg-description>
3826N/A Use the persistent search control
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsCountEntries" type="optional">
3826N/A <function-arg-description>
3826N/A Count the number of entries returned by the server
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsReportAuthzID" type="optional">
3826N/A <function-arg-description>
3826N/A Use the authorization identity control
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsFilename" type="optional">
3826N/A <function-arg-description>
3826N/A File containing a list of search filter strings
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsHelp" type="optional">
3826N/A <function-arg-description>
3826N/A Display this usage information
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsEncoding" type="optional">
3826N/A <function-arg-description>
3826N/A Use the specified character set for command-line input
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsBindPasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Bind password file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsControl" type="optional">
3826N/A <function-arg-description>
3826N/A Use a request control with the provided information
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePath" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore path
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore PIN file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsKeyStorePassword" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate keystore PIN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTimeLimit" type="optional">
3826N/A <function-arg-description>
3826N/A Maximum length of time in seconds to allow for the search
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="integer"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsMatchedValuesFilter" type="optional">
3826N/A <function-arg-description>
3826N/A Use the LDAP matched values control with the provided filter
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filter"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsDryRun" type="optional">
3826N/A <function-arg-description>
3826N/A Show what would be done but do not perform any operation
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsSaslOption" type="optional">
3826N/A <function-arg-description>
3826N/A SASL bind options
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePath" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store path
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePassword" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store PIN
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="string"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsTrustStorePasswordFile" type="optional">
3826N/A <function-arg-description>
3826N/A Certificate trust store PIN file
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="filename"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseStartTLS" type="optional">
3826N/A <function-arg-description>
3826N/A Use StartTLS to secure communication with the server
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseSASLExternal" type="optional">
3826N/A <function-arg-description>
3826N/A Use the SASL EXTERNAL authentication mechanism
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <function-arg-def name="dsUseSSL" type="optional">
3826N/A <function-arg-description>
3826N/A Use SSL for secure communication with the server
3826N/A </function-arg-description>
3826N/A <function-arg-property name="type" value="option"/>
3826N/A </function-arg-def>
3826N/A <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-property name="type" value="string" />
</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)
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>
<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>
<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_DIR,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-property name="type" value="string" />
</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_DIR,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-property name="type" value="string" />
</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>
<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_DIR,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-property name="type" value="string" />
</function-arg-def>
</function-map-args>
<sequence>
<call function="'runCommand'" >
{ 'name' : 'Anonymous Search Base Object',
'location' : location,
'command' : '%s/ldapsearch%s' % (dsBinPath,fileExt),
'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_DIR,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="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="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-property name="type" value="string" />
</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_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">
<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-property name="type" value="string" />
</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_DIR,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="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-property name="type" value="string" />
</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 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_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">
<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-property name="type" value="string" />
</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_DIR,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-property name="type" value="string" />
</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-property name="type" value="string" />
</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/ldap' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldap' % (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_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="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-property name="type" value="string" />
</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>
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/ldap' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldap' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
<!-- Modify an attribute -->
<function name="modifyDn">
<function-prolog>
This function rename the rdn
</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">
<function-arg-description>
new rdn name : ie uid=jdoe_bis
</function-arg-description>
<function-arg-property name="type" value="string"/>
</function-arg-def>
<function-arg-def name="deleteOldRDN" type="optional">
<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="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-property name="type" value="string" />
</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:
STAFCmdParamsList.append('-f "%s"' % deleteOldRDN)
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/ldap' % (dsPath,remote.reljavadir)],
'path' : '%s/../%s/ldap' % (dsPath,remote.reljavadir),
'expectedRC': expectedRC,
'knownIssue': knownIssue
}
</call>
<return>
STAXResult
</return>
</sequence>
</function>
</stax>