mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

tdj_tx
06.45.2007 cec086869b21556597831c3f08dbc96ca27d8f8a
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']
1 files modified
41 ■■■■■ changed files
opends/tests/functional-tests/shared/functions/dsadm.xml 41 ●●●●● patch | view | raw | blame | history
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>