[#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

@ -45,6 +45,7 @@ func initControlFlushCacheCmd() {
ff := flushCacheCmd.Flags()
ff.String(controlRPC, controlRPCDefault, controlRPCUsage)
ff.StringSlice(shardIDFlag, nil, "List of shard IDs in base58 encoding")
ff.Bool(shardAllFlag, false, "Process all shards")
_ = flushCacheCmd.MarkFlagRequired(shardIDFlag)
flushCacheCmd.MarkFlagsMutuallyExclusive(shardIDFlag, shardAllFlag)
}