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

jvergara
02.42.2009 58262dc99cb9776773c0333fafcd7ff27deffc5b
Undo the changes for issue 4326 (Allow setup of a Server without Data suffix) since some tests are broken with the new behavior.  The code has been left in a way that simply changing the default value of the base DN option to null, the command-line setup will allow to configure the server with no base DN.
3 files modified
16 ■■■■■ changed files
opends/src/messages/messages/admin_tool.properties 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/InstallDS.java 9 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java 5 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/admin_tool.properties
@@ -470,7 +470,7 @@
INFO_DESCRIPTION_REPLICATION_BASEDNS=Base DN of \
 the data to be replicated, initialized or for which we want to disable \
 replication.  Multiple base DN's can be provided by using this option multiple \
 times.  If this option is not provided no base DN will be created
 times
INFO_DESCRIPTION_REPLICATION_ADMIN_UID=User ID of the \
 Global Administrator to use to bind to the server.  For the '%s' subcommand \
 if no Global Administrator was defined previously for none of the server the \
opends/src/server/org/opends/server/tools/InstallDS.java
@@ -769,6 +769,10 @@
    // Check the validity of the base DNs
    LinkedList<String> baseDNs = argParser.baseDNArg.getValues();
    if (baseDNs.isEmpty() && argParser.baseDNArg.getDefaultValue() != null)
    {
      baseDNs.add(argParser.baseDNArg.getDefaultValue());
    }
    for (String baseDN : baseDNs)
    {
      try
@@ -1333,7 +1337,8 @@
  throws UserDataException
  {
    boolean prompt = true;
    if (!argParser.baseDNArg.isPresent())
    if (!argParser.baseDNArg.isPresent() &&
        argParser.baseDNArg.getDefaultValue() == null)
    {
      try
      {
@@ -1355,7 +1360,7 @@
    else
    {
      // Check the validity of the base DNs
      LinkedList<String>baseDNs = promptIfRequiredForDNs(
      LinkedList<String> baseDNs = promptIfRequiredForDNs(
          argParser.baseDNArg, INFO_INSTALLDS_PROMPT_BASEDN.get(), true);
      dataOptions = promptIfRequiredForDataOptions(baseDNs);
    }
opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java
@@ -204,7 +204,7 @@
        OPTION_LONG_BASEDN.toLowerCase(), OPTION_SHORT_BASEDN,
        OPTION_LONG_BASEDN, false, true, true,
        INFO_BASEDN_PLACEHOLDER.get(),
        null, OPTION_LONG_BASEDN,
        "dc=example,dc=com", OPTION_LONG_BASEDN,
        INFO_INSTALLDS_DESCRIPTION_BASEDN.get());
    addArgument(baseDNArg);
@@ -661,7 +661,8 @@
      errorMessages.add(message);
    }
    if (noPromptArg.isPresent() && !baseDNArg.isPresent())
    if (noPromptArg.isPresent() && !baseDNArg.isPresent() &&
        baseDNArg.getDefaultValue() == null)
    {
      Argument[] args = {importLDIFArg, addBaseEntryArg, sampleDataArg};
      for (Argument arg : args)