[OPENDJ-1840] dsconfig should support batching commands from standard input Created: 20/Feb/15  Updated: 08/Nov/19  Resolved: 26/Feb/15

Status: Done
Project: OpenDJ
Component/s: tools
Affects Version/s: 3.0.0
Fix Version/s: 3.0.0, 2.8.0

Type: New Feature Priority: Minor
Reporter: Jean-Noël Rouvignac Assignee: Jean-Noël Rouvignac
Resolution: Fixed Votes: 0
Labels: release-notes

Issue Links:
Depends
is required by OPENDJ-1859 Document dsconfig --batch option Done
is required by OPENDJ-575 Add support to dsconfig for reading b... Done
Relates
relates to OPENDJ-2748 dsconfig --batch and --batchFilePath ... Done
Dev Assignee: Jean-Noël Rouvignac

 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


 Comments   
Comment by Matthew Swift [ 07/Nov/19 ]

Moved to closed state because the fixVersion has already been released.

Generated at Tue Oct 27 05:56:45 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.