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

andrug
28.20.2008 50bd91f77aab71364b826bd8f169eb3a84ad47a2
Get automatically the name of directory built in the opends zip file
4 files modified
47 ■■■■ changed files
opendj-sdk/opends/tests/system-tests/phases/parser/parser.py 36 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/system-tests/scenario/conf.dtd 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/system-tests/scenario/sample/conf.xml 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/system-tests/scenario/sample2/conf.xml 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/system-tests/phases/parser/parser.py
@@ -547,9 +547,8 @@
      result = parseGlobalParameters(thisChild)
      msg = '%s \n %s' % (msg,result[0])
      scenario   = result[1]
      opendsName = result[2]
      opendsZip  = result[3]
      domain     = result[4]
      opendsZip  = result[2]
      domain     = result[3]
    
    #
    # Parsing instance node
@@ -574,8 +573,7 @@
      # opends instance parsing
      #
      if cProduct == 'opends':
        result = parseOpenDs(cId,cName,cProduct,cRole,opendsName,opendsZip,\
                             thisChild)
        result = parseOpenDs(cId,cName,cProduct,cRole,opendsZip,thisChild)
        msg = '%s \n %s' % (msg,result[0])
        instances.append(result[1])
      
@@ -648,7 +646,7 @@
#
# Parse children and get information for opends instance 
#
def parseOpenDs(cId,cName,cProduct,cRole,opendsName,opendsZip,thisChild):
def parseOpenDs(cId,cName,cProduct,cRole,opendsZip,thisChild):
  msg              = ''
  cHost            = 'localhost'
  cInstallDir      = NOT_DEFINED
@@ -787,7 +785,18 @@
                              cDatabaseCachePercentage,\
                              cReplicationPurgeDelay)
  
  cInstallDir = '%s/%s/%s' % (cInstallDir,cName,opendsName)
  #
  # extract the name of zip and add it to the installDir path
  #
  # 1. Remove the file path
  _list = opendsZip.split('/')
  _file = _list.pop()
  # 2. Get the name of the file without the extension
  _fileName  = _file.split('.')
  _extension = _fileName.pop()
  _fileName  = '.'.join(_fileName)
  cInstallDir = '%s/%s/%s' % (cInstallDir,cName,_fileName)
  return [msg,OpendsInstance(cId,cName,cProduct,cRole,cHost,cInstallDir,\
                             opendsZip,\
                             cPortLDAP,cPortLDAPS,cPortJMX,cPortREPL,\
@@ -1178,12 +1187,11 @@
  msg        = ''
  result     = []
  scenario   = NOT_DEFINED
  opendsName = NOT_DEFINED
  opendsZip  = NOT_DEFINED
  domain     = NOT_DEFINED
  
  #
  # Parsing second level : opendsName,...
  # Parsing second level
  #
  if thisChild.hasChildNodes():
    
@@ -1194,10 +1202,6 @@
      thisSubChild = subChildren.item(j)
      
      if (thisSubChild.getNodeType() == Node.ELEMENT_NODE and
          thisSubChild.getNodeName() == 'opendsName'):
        opendsName = _getPropValue(thisSubChild)
      elif (thisSubChild.getNodeType() == Node.ELEMENT_NODE and
          thisSubChild.getNodeName() == 'opendsZip'):
        opendsZip = _getPropValue(thisSubChild)
        
@@ -1228,12 +1232,10 @@
    msg = '%s\n ERROR: parseGlobalParameters(): no child for this node' % msg
    
    
  if (opendsName == NOT_DEFINED):
    msg = '%s\n ERROR: parseGlobalParameters() : opendsName not defined' % (msg)
  if (opendsZip == NOT_DEFINED):
    msg = '%s\n ERROR: parseGlobalParameters() : opendsZip not defined' % (msg)
  return [msg,scenario,opendsName,opendsZip,domain]
  return [msg,scenario,opendsZip,domain]
@@ -1249,7 +1251,7 @@
  description = NOT_DEFINED
  
  #
  # Parsing second level : opendsName,...
  # Parsing second level
  #
  if thisChild.hasChildNodes():
    
opendj-sdk/opends/tests/system-tests/scenario/conf.dtd
@@ -28,12 +28,11 @@
                                   suffix?, scheduler?)>
<!-- ========== GLOBAL PARAMETERS NODE ========================= -->
<!ELEMENT globalParameters (scenario,opendsName,opendsZip,directoryManagerDn?,
<!ELEMENT globalParameters (scenario,opendsZip,directoryManagerDn?,
                            directoryManagerPswd?,domain?)>
  <!ELEMENT scenario (name,description)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT description (#PCDATA)>
  <!ELEMENT opendsName (#PCDATA)>
  <!ELEMENT opendsZip (#PCDATA)>
  <!ELEMENT directoryManagerDn (#PCDATA)>
  <!ELEMENT directoryManagerPswd (#PCDATA)>
opendj-sdk/opends/tests/system-tests/scenario/sample/conf.xml
@@ -42,9 +42,9 @@
      <description>This is an example</description>
    </scenario>
    
    <opendsName>OpenDS-1.0.0</opendsName>
    <opendsZip>NEED_VALUE</opendsZip>
    <domain>NEED_VALUE</domain>
    <!-- Example : <domain>france.sun.com</domain> -->
    <domain></domain>
    
  </globalParameters>
  
opendj-sdk/opends/tests/system-tests/scenario/sample2/conf.xml
@@ -44,9 +44,9 @@
      </description>
    </scenario>
    
    <opendsName>OpenDS-1.0.0</opendsName>
    <opendsZip>NEED_VALUE</opendsZip>
    <domain>NEED_VALUE</domain>
    <!-- Example : <domain>france.sun.com</domain> -->
    <domain></domain>
    
  </globalParameters>