From 0604e856d66375ae0041546ddff0b75d47204c9b Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Mon, 30 Jul 2007 22:56:17 +0000
Subject: [PATCH] 1. fix for search index \n2. added add index with dsconfig\n3.added delete index with dsconfig\n4.added entry limit test but disabled for now

---
 opends/tests/functional-tests/shared/functions/tools.xml |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/opends/tests/functional-tests/shared/functions/tools.xml b/opends/tests/functional-tests/shared/functions/tools.xml
index 1841505..360f936 100644
--- a/opends/tests/functional-tests/shared/functions/tools.xml
+++ b/opends/tests/functional-tests/shared/functions/tools.xml
@@ -437,6 +437,8 @@
       <function-arg-def name="attributes" type="required">
         <function-arg-description>
           Specify a list of attributes to trigger index rebuild on
+          This should be passed on as a python array like
+          [ 'uid', 'telephonenumber' ]
         </function-arg-description>
       </function-arg-def>
     </function-map-args>
@@ -444,7 +446,7 @@
     <sequence>
       <script>
         _cmd='%s/rebuild-index%s' % (dsBinPath,fileExt)
-        _args=' -b %s -i %s' % ( baseDN, ' '.join(attributes) )
+        _args=' -b %s -i %s' % ( baseDN, ' -i '.join(attributes) )
       </script>
       <message log="1" level="'info'">
         '%s %s' % (_cmd,_args)
@@ -466,5 +468,56 @@
       <return>STAXResult</return>
     </sequence>
   </function>
+  
+  <function name="CLI_verify-index">
+    <function-prolog>
+      This wraps the verify-index tool to make it easy to use from STAX
+    </function-prolog>
+    <function-map-args>
+      <function-arg-def name="baseDN" type="required">
+        <function-arg-description>
+          Specify a back-end supporting indexing and triggers a verification of all 
+          indexes in the scope of the provided baseDN
+        </function-arg-description>
+      </function-arg-def>
+      <function-arg-def name="attributes" type="required">
+        <function-arg-description>
+          Specify a list of attributes to trigger index verification on
+          This should be passed as a python array like
+          [ 'uid','telephonenumber' ]
+        </function-arg-description>
+      </function-arg-def>
+      <function-arg-def name="clean" type="optional">
+        <function-arg-description>
+          Specify a list of attributes to trigger index verification on
+        </function-arg-description>
+      </function-arg-def>
+    </function-map-args>
+
+    <sequence>
+      <script>
+        _cmd='%s/verify-index%s' % (dsBinPath,fileExt)
+        _args=' -b %s -i %s' % ( baseDN, ' -i '.join(attributes) )
+      </script>
+      <message log="1" level="'info'">
+        '%s %s' % (_cmd,_args)
+      </message>
+        
+      <process name="'verify-index'">
+        <location>'%s' % location</location>
+        <command>'%s' % _cmd</command>
+        <parms>'%s' % _args</parms>
+        <workdir>'%s' % dsBinPath</workdir>
+        <envs>
+          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
+        </envs>
+        <console use="'same'"/>
+        <stderr mode="'stdout'"/>
+        <returnstdout/>
+      </process>
+
+      <return>STAXResult</return>
+    </sequence>
+  </function>
 
 </stax>

--
Gitblit v1.10.0