[#1867] services/control: Interpret empty list of IDs as all shards

In neofs-cli the flag is still required, but `all` can be used to
process all shards.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-10 21:14:12 +03:00 committed by fyrchik
parent b632260995
commit c0199dee93
7 changed files with 30 additions and 11 deletions

View file

@ -48,7 +48,8 @@ func initControlEvacuateShardCmd() {
flags := evacuateShardCmd.Flags()
flags.String(controlRPC, controlRPCDefault, controlRPCUsage)
flags.StringSlice(shardIDFlag, nil, "List of shard IDs in base58 encoding")
flags.Bool(shardAllFlag, false, "Process all shards")
flags.Bool(dumpIgnoreErrorsFlag, false, "Skip invalid/unreadable objects")
_ = evacuateShardCmd.MarkFlagRequired(shardIDFlag)
evacuateShardCmd.MarkFlagsMutuallyExclusive(shardIDFlag, shardAllFlag)
}