Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-2027

Command-line tools requiring arguments should display usage if none are given

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.8.0, 2.6.2
    • Fix Version/s: 3.0.0
    • Component/s: tools
    • Labels:
    • Support Ticket IDs:
    • Sprint:
      OpenDJ Sprint 62, OpenDJ Sprint 63

      Description

      Command line tools such as create-rc-script and import-ldif require arguments, but when executed without only give an error message.

      $ bin//create-rc-script 
      An error occurred while parsing the command-line arguments:  The argument outputfile is required to have a value but 
      none was provided in the argument list and no default value is available
      
      $ bin/import-ldif 
      Neither the ldifFile or the templateFile argument was provided.  One of these arguments must be given to specify the 
      source for the LDIF data to be imported
      

      Unlike the above, the dbtest and dsframework commands actually tells users to use --help to get information on the required arguments.

      $ bin/dbtest 
      A sub-command must be specified
      
      See "dbtest --help" to get more usage help
      

      These tools as a whole, should be consistent and display the Tool Usage message.
      Good Usage Example:

      $ bin/make-ldif 
      An error occurred while parsing the command-line arguments:  The argument
      templatefile is required to have a value but none was provided in the argument
      list and no default value is available
      This utility can be used to generate LDIF data based on a definition in a
      template file
      
      Usage:  make-ldif  {options}
              where {options} include:
      
      -t, --templateFile {file}
          The path to the template file with information about the LDIF data to
          generate
      -o, --ldifFile {file}
          The path to the LDIF file to be written
      -s, --randomSeed {seed}
          The seed to use to initialize the random number generator
          Default value: 0
      
      General Options
      
      -V, --version
          Display Directory Server version information
      -?, -H, --help
          Show this usage information
      

        Attachments

          Activity

            People

            • Assignee:
              gaetan Gaetan Boismal
              Reporter:
              lee.trujillo Lee Trujillo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: