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

dsconfig should support batching commands from standard input

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0, 2.8.0
    • Component/s: tools
    • Labels:
    • Sprint:
      Sprint 52

      Description

      Right now, dsconfig accepts the --batchFile option to read batch commands from a file, but this has the disadvantage that one must go through an indirection to understand what a script does and also that when moving the script, the batch file must also be moved alongside.

      I am suggesting to add a --batch option which will read commands from standard input.
      Here is a sample usage it would look like:

      bin/dsconfig -h "localhost" -p "4444" -D "cn=Directory Manager" -w "admin" -X -n --batch <<END_OF_COMMAND_INPUT
          create-backend        --backend-name userRoot -t persistit  --set base-dn:"dc=example,dc=com" --set db-cache-percent:20  --set enabled:true
          create-backend-index  --backend-name userRoot -t generic    --set index-type:equality  --set index-type:substring --index-name cn
          create-backend-index  --backend-name userRoot -t generic    --set index-type:equality  --set index-type:substring --index-name sn
          create-backend-index  --backend-name userRoot -t generic    --set index-type:equality                             --index-name uid
          create-backend-index  --backend-name userRoot -t generic    --set index-type:equality  --set index-type:substring --index-name mail
      END_OF_COMMAND_INPUT
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                JnRouvignac Jean-Noël Rouvignac
                Reporter:
                JnRouvignac Jean-Noël Rouvignac
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: