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

ugaston
25.08.2007 9d5ed3745302291fb99defe154a68ec912e25882
opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -161,184 +161,6 @@
    </sequence>
  </function>
  <!-- This function configures DS using the configure-ds script -->
  <function name="ConfigureDsWithScript">
    <function-prolog>
      This function configures a Directory Server using a 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="filepath"/>
      </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="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsLdapPort" type="optional">
        <function-arg-description>
          Directory server LDAP port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsLdapsPort" type="optional">
        <function-arg-description>
          Directory server LDAPS port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsEnableStartTLS" type="optional">
        <function-arg-description>
          Specifies whether to enable or not StartTLS
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsJmxPort" type="optional">
        <function-arg-description>
          Directory server JMX port number
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsKeyManagerProviderDN" type="optional">
        <function-arg-description>
          DN of the key manager provider to use for SSL and/or StartTLS
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsTrustManagerProviderDN" type="optional">
        <function-arg-description>
          DN of the trust manager provider to use for SSL and/or StartTLS
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsKeyManagerPath" type="optional">
        <function-arg-description>
          Path of the keystore to be used by the key manager provider
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsCertNickName" type="optional">
        <function-arg-description>
          Nickname of the certificate
        </function-arg-description>
        <function-arg-property name="type" value="Port number"/>
      </function-arg-def>
      <function-arg-def name="dsBaseDN" type="optional">
        <function-arg-description>
          Base DN (only single base DN supported).
        </function-arg-description>
        <function-arg-property name="type" value="DN"/>
      </function-arg-def>
      <function-arg-def name="dsRootUserDN" type="optional">
        <function-arg-description>
          Root User Bind DN
        </function-arg-description>
        <function-arg-property name="type" value="DN"/>
      </function-arg-def>
      <function-arg-def name="dsRootPassword" type="optional">
        <function-arg-description>
          Root User Bind password
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="dsRootPasswordFile" type="optional">
        <function-arg-description>
          Root User password file
        </function-arg-description>
        <function-arg-property name="type" value="filename"/>
      </function-arg-def>
      <function-arg-def name="dsHelp" type="optional">
        <function-arg-description>
          Help option
        </function-arg-description>
        <function-arg-property name="help" value="option"/>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <!-- Build the Command -->
      <script>
        STAFCmdParamsList=[]
        STAFCmdParams=''
        if dsPath:
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/configure-ds%s' % (dsBinPath,fileExt)
        if dsVersion:
          STAFCmdParamsList.append('-V %s' % dsVersion)
        if dsLdapPort:
          STAFCmdParamsList.append('-p %s' % dsLdapPort)
        if dsLdapsPort:
          STAFCmdParamsList.append('-P %s' % dsLdapsPort)
        if dsEnableStartTLS:
          STAFCmdParamsList.append('-q %s' % dsEnableStartTLS)
        if dsJmxPort:
          STAFCmdParamsList.append('-x %s' % dsJmxPort)
        if dsKeyManagerProviderDN:
          STAFCmdParamsList.append('-k "%s"' % dsKeyManagerProviderDN)
        if dsTrustManagerProviderDN:
          STAFCmdParamsList.append('-t "%s"' % dsTrustManagerProviderDN)
        if dsKeyManagerPath:
          STAFCmdParamsList.append('-m "%s"' % dsKeyManagerPath)
        if dsCertNickName:
          STAFCmdParamsList.append('-a "%s"' % dsCertNickName)
        if dsBaseDN:
          STAFCmdParamsList.append('-b "%s"' % dsBaseDN)
        if dsRootUserDN:
          STAFCmdParamsList.append('-D "%s"' % dsRootUserDN)
        if dsRootPassword:
          STAFCmdParamsList.append('-w "%s"' % dsRootPassword)
        if dsRootPasswordFile:
          STAFCmdParamsList.append('-j "%s"' % dsRootPasswordFile)
        if dsHelp:
          STAFCmdParamsList.append('-H')
        STAFCmdParams=' '.join(STAFCmdParamsList)
      </script>
      <message>
        '%s %s' % (STAFCmd, STAFCmdParams)
      </message>
      <call function="'runCommand'">
        { 'location'  : location,
          'name'      : 'Setup DS Script',
          'command'   : STAFCmd,
          'arguments' : STAFCmdParams
        }
      </call>
      <call function="'checkRC'">
        { 'returncode' : RC ,
          'result'     : STAXResult }
      </call>
    </sequence>
  </function>
  <!-- This function starts DS using the start-ds script -->
  <function name="StartDsWithScript">
    <function-prolog>