From cec086869b21556597831c3f08dbc96ca27d8f8a Mon Sep 17 00:00:00 2001
From: tdj_tx <tdj_tx@localhost>
Date: Mon, 06 Aug 2007 15:45:55 +0000
Subject: [PATCH] removed the default backend, also added parsing for branches, attributes, and filters. for example, you can specify multiple include branches 'dsIncludeBranch' : ['dc=com','dc=example,dc=com']
---
opends/tests/functional-tests/shared/functions/dsadm.xml | 41 ++++++++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/opends/tests/functional-tests/shared/functions/dsadm.xml b/opends/tests/functional-tests/shared/functions/dsadm.xml
index 1271eb0..aca3a6d 100755
--- a/opends/tests/functional-tests/shared/functions/dsadm.xml
+++ b/opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -863,7 +863,7 @@
</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-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
<function-arg-description>
Pathname to installation root
</function-arg-description>
@@ -893,7 +893,7 @@
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
- <function-arg-def name="dsBackEnd" type="optional" default="'%s' % DIRECTORY_INSTANCE_BE">
+ <function-arg-def name="dsBackEnd" type="optional">
<function-arg-description>
Backend ID for the backend to import
</function-arg-description>
@@ -992,12 +992,12 @@
</function-map-args>
<sequence>
-
+
<!-- Build the Command -->
<script>
STAFCmdParamsList=[]
STAFCmdParams=''
-
+
if dsPath:
dsBinPath='%s/%s' % (dsPath,fileFolder)
STAFCmd='%s/import-ldif%s' % (dsBinPath,fileExt)
@@ -1013,27 +1013,30 @@
if dsReplaceExisting:
STAFCmdParamsList.append('-r')
-
- if dsBackEnd:
- STAFCmdParamsList.append('-n %s' % dsBackEnd)
-
+
if dsIncludeBranch:
- STAFCmdParamsList.append('-b %s' % dsIncludeBranch)
+ for InBranch in dsIncludeBranch:
+ STAFCmdParamsList.append('-b %s ' % InBranch)
if dsExcludeBranch:
- STAFCmdParamsList.append('-B %s' % dsExcludeBranch)
+ for ExBranch in dsExcludeBranch:
+ STAFCmdParamsList.append('-B %s ' % ExBranch)
if dsIncludeAttribute:
- STAFCmdParamsList.append('-i %s' % dsIncludeAttribute)
+ for InAttr in dsIncludeAttribute:
+ STAFCmdParamsList.append('-i %s ' % InAttr)
if dsExcludeAttribute:
- STAFCmdParamsList.append('-e %s' % dsExcludeAttribute)
+ for ExAttr in dsExcludeAttribute:
+ STAFCmdParamsList.append('-e %s ' % ExAttr)
if dsIncludeFilter:
- STAFCmdParamsList.append('-I %s' % dsIncludeFilter)
+ for InFilter in dsIncludeFilter:
+ STAFCmdParamsList.append('-I %s ' % InFilter)
if dsExcludeFilter:
- STAFCmdParamsList.append('-E %s' % dsExcludeFilter)
+ for ExFilter in dsExcludeFilter:
+ STAFCmdParamsList.append('-E %s ' % ExFilter)
if dsRejectFile:
STAFCmdParamsList.append('-R %s' % dsRejectFile)
@@ -1042,10 +1045,10 @@
STAFCmdParamsList.append('-O')
if dsRandomSeed:
- STAFCmdParamsList.append('-S %s' % dsRandomSeed)
+ STAFCmdParamsList.append('-s %s' % dsRandomSeed)
if dsSkipSchemaValidation:
- STAFCmdParamsList.append('-s')
+ STAFCmdParamsList.append('-S')
if dsIsCompressed:
STAFCmdParamsList.append('-c')
@@ -1058,10 +1061,14 @@
if dsHelp:
STAFCmdParamsList.append('-H')
+
+ if dsBackEnd:
+ STAFCmdParamsList.append('-n %s' % dsBackEnd)
STAFCmdParams=' '.join(STAFCmdParamsList)
+
</script>
-
+
<message>
'%s %s' % (STAFCmd, STAFCmdParams)
</message>
--
Gitblit v1.10.0