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

Sebastien Bertholet
14.30.2008 100a7f8b6227b86957e9c95fe51796b1435203e9
allow to use secure replication and to enable ssl (LDAPsport)
4 files modified
55 ■■■■ changed files
opends/tests/system-tests/phases/configuration/configuration_opends.xml 24 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/parser/parser.py 11 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/shared/functions/opendsadm.xml 17 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/scenario/conf.dtd 3 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/configuration/configuration_opends.xml
@@ -275,12 +275,14 @@
                      'dsInstanceDn'      : DIRECTORY_INSTANCE_DN,
                      'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD,
                      'dsReplicationPort' : instance.getREPLPort(),
                      'dsSecureReplication' : instance.getSecureReplication(),
                      'refInstanceHost'   : instanceSource.getHost(),
                      'refInstancePort'   : instanceSource.getLDAPPort(),
                      'refInstanceDn'     : DIRECTORY_INSTANCE_DN,
                      'refInstancePswd'   : DIRECTORY_INSTANCE_PSWD,
                      'refReplicationPort': instanceSource.getREPLPort(),
                      'replicationDnList' : [suffix.getSuffixDn()],
                      'refSecureReplication' : instanceSource.getSecureReplication(),
                      'expectedRC'        : [0,5],
                      'fileFd'            : cFileFd
                    }
@@ -350,6 +352,14 @@
        </function-arg-description>
      </function-arg-def>
        
      <function-arg-def name="dsSecureReplication" type="optional"
                        default="'false'">
        <function-arg-description>
          Use replication over ssl on first server
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="refInstanceHost" type="optional"
                        default="STAF_REMOTE_HOSTNAME">
        <function-arg-description>
@@ -387,6 +397,14 @@
        </function-arg-description>
      </function-arg-def>        
        
      <function-arg-def name="refSecureReplication" type="optional"
                        default="'false'">
        <function-arg-description>
          Use replication over ssl on reference server
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="adminUID" type="optional"
                        default="DIRECTORY_INSTANCE_DN">
        <function-arg-description>
@@ -464,6 +482,12 @@
          for dn in replicationDnList:
            STAFCmdParamsList.append('-b "%s"' % dn)
          
        if ( dsSecureReplication == 'true' ):
          STAFCmdParamsList.append('--secureReplication1')
        if ( refSecureReplication == 'true' ):
          STAFCmdParamsList.append('--secureReplication2')
        if adminUID:
          STAFCmdParamsList.append('-I "%s"' % adminUID)
          
opends/tests/system-tests/phases/parser/parser.py
@@ -338,7 +338,7 @@
  def __init__(self, iid, name, product, role, host, installDir, tarball, \
               portLDAP, portLDAPS, portJMX, portREPL, \
               sslEnabled, certificate, startTlsEnabled, \
               tuning):
               secureReplication,tuning):
    # from instance object
    self.iid             = iid
    self.name            = name
@@ -356,6 +356,7 @@
    self.sslEnabled      = sslEnabled
    self.certificate     = certificate
    self.startTlsEnabled = startTlsEnabled
    self.secureReplication = secureReplication
    self.tuning          = tuning
    
  def getLDAPSPort(self):
@@ -382,6 +383,9 @@
  def getIsStartTlsEnabled(self):
    return self.startTlsEnabled
    
  def getSecureReplication(self):
    return self.secureReplication
  def getTuning(self):
    return self.tuning
@@ -657,6 +661,7 @@
  cSslEnabled      = 'false'
  cCertificate     = NOT_DEFINED
  cStartTlsEnabled = 'false'
  cSecureReplication  = 'false'
  cIsJava          = 'false'
  cXms             = NOT_DEFINED
  cXmx             = NOT_DEFINED
@@ -724,7 +729,7 @@
        cSslEnabled      = _getAttributeNode(thisSubChild,'sslEnabled')
        cCertificate     = _getAttributeNode(thisSubChild,'certificate')
        cStartTlsEnabled = _getAttributeNode(thisSubChild,'startTlsEnabled')
        cSecureReplication = _getAttributeNode(thisSubChild,'secureReplication')
      
      elif (thisSubChild.getNodeType() == Node.ELEMENT_NODE and
          thisSubChild.getNodeName() == 'tuning'):
@@ -801,7 +806,7 @@
                             opendsZip,\
                             cPortLDAP,cPortLDAPS,cPortJMX,cPortREPL,\
                             cSslEnabled,cCertificate,cStartTlsEnabled,\
                             cOpendsTuning)]
                             cSecureReplication,cOpendsTuning)]
opends/tests/system-tests/phases/shared/functions/opendsadm.xml
@@ -967,8 +967,15 @@
        STAFCmd='%s/dsreplication' % (dsBinPath)
        
        STAFCmdParamsList.append('status -n')
        STAFCmdParamsList.append('--trustAll')
        STAFCmdParamsList.append('-h %s' % instance.getHost())
        STAFCmdParamsList.append('-p %s' % instance.getLDAPPort())
        if ( instance.getIsSslEnabled() == 'true' ):
          port = instance.getLDAPSPort()
          STAFCmdParamsList.append('--useSSL')
        else:
          port = instance.getLDAPPort()
        STAFCmdParamsList.append('-p %s' % port )
        STAFCmdParamsList.append('-b %s' % suffix.getSuffixDn())
        STAFCmdParamsList.append('-I "%s"' % adminDN)
        STAFCmdParamsList.append('-w "%s"' % adminPwd)
@@ -1021,8 +1028,14 @@
          <iterate in="instances" var="instance">
            <sequence>
              <script>
                if ( instance.getIsSslEnabled() == 'true' ):
                  port = instance.getLDAPPort()
                else:
                  port = instance.getLDAPSPort()
                serverName = '%s:%s' % \
                             (instance.getHost(),instance.getLDAPPort())
                             (instance.getHost(),port)
                nbEntries = NOT_DEFINED
                
                for e in cmdOutput:
opends/tests/system-tests/scenario/conf.dtd
@@ -56,7 +56,8 @@
  <!ATTLIST security
        sslEnabled ( true | false ) "false"
        certificate ( generateSelfSigned ) "generateSelfSigned"
        startTlsEnabled ( true | false ) "false">
        startTlsEnabled ( true | false ) "false"
        secureReplication ( true | false ) "false" >
  <!ELEMENT tuning (java?,databaseCachePercentage?,replicationPurgeDelay?)>
    <!ELEMENT java EMPTY>
    <!ATTLIST java