From 70043a239c082bbcd8df70acebd6aef26fd14cf0 Mon Sep 17 00:00:00 2001
From: smaguin <smaguin@localhost>
Date: Tue, 29 May 2007 06:48:38 +0000
Subject: [PATCH] add modifyAnAttribute
---
opends/tests/functional-tests/shared/functions/ldap.xml | 140 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 140 insertions(+), 0 deletions(-)
diff --git a/opends/tests/functional-tests/shared/functions/ldap.xml b/opends/tests/functional-tests/shared/functions/ldap.xml
index ab37579..ec5b813 100755
--- a/opends/tests/functional-tests/shared/functions/ldap.xml
+++ b/opends/tests/functional-tests/shared/functions/ldap.xml
@@ -813,4 +813,144 @@
</function>
+
+
+ <!-- Modify an attribut -->
+ <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="'%s' % 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="'%s' % 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="DNToBeModified" 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="attributToBeModified" type="required">
+ <function-arg-description>
+ Attribut to modify
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="newAttributValue" type="required">
+ <function-arg-description>
+ New Attribut 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 modifcation, can be delete, add, replace
+ </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 DNToBeModified:
+ STAFCmdParamsList.append('-d "%s"' % DNToBeModified)
+
+ if attributToBeModified:
+ STAFCmdParamsList.append('-a "%s"' % attributToBeModified)
+
+ if newAttributValue:
+ STAFCmdParamsList.append('-v "%s"' % newAttributValue)
+
+ if changetype:
+ STAFCmdParamsList.append('-t "%s"' % changetype)
+
+ STAFCmdParams=' '.join(STAFCmdParamsList)
+
+ STAFCmd='modifyAnAttribute'
+
+ </script>
+
+ <process name="'Modify An Attribut value'">
+ <location>'%s' % location</location>
+ <command>'java'</command>
+ <workdir>'%s' % TESTS_JAVA_DIR</workdir>
+ <parms>'%s %s' % (STAFCmd,STAFCmdParams)</parms>
+ <envs>
+ ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME,'CLASSPATH=%s' % TESTS_JAVA_DIR]
+ </envs>
+ <console use="'same'"/>
+ <stderr mode="'stdout'"/>
+ <returnstdout/>
+ </process>
+
+ <call function="'checkRC'">
+ { 'returncode' : RC ,
+ 'result' : STAXResult }
+ </call>
+
+ </sequence>
+
+ </function>
+
+
+
</stax>
--
Gitblit v1.10.0