From 5484b972eb3c29783bccddac0c047d59000c94b3 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 6 Jan 2025 10:26:39 -0500 Subject: [PATCH 1/2] fix: rename `metadata` flag to `extended-metadata` for `list` command Signed-off-by: Rui Chen --- cli/list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/list.go b/cli/list.go index 5341f4e..8c639dd 100644 --- a/cli/list.go +++ b/cli/list.go @@ -40,7 +40,7 @@ var listFlags = []cli.Flag{ Usage: "Size of each generated object. Can be a number or 10KB/MB/GB. All sizes are base 2 binary.", }, cli.BoolFlag{ - Name: "metadata", + Name: "extended-metadata", Usage: "Enable extended MinIO ListObjects with metadata, by default this benchmarking uses ListObjectsV2 API.", }, } @@ -72,7 +72,7 @@ func mainList(ctx *cli.Context) error { b := bench.List{ Common: getCommon(ctx, newGenSource(ctx, "obj.size")), Versions: ctx.Int("versions"), - Metadata: ctx.Bool("metadata"), + Metadata: ctx.Bool("extended-metadata"), CreateObjects: ctx.Int("objects"), NoPrefix: ctx.Bool("noprefix"), } From b8a8556969f03866e8b89e0a083c7434f0e04ae7 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 6 Jan 2025 10:53:54 -0500 Subject: [PATCH 2/2] fix: rename `metadata` to `add-metadata` for put operations Signed-off-by: Rui Chen --- cli/flags.go | 4 ++-- cli/list.go | 4 ++-- cli/put.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/flags.go b/cli/flags.go index b30b6a0..0a55ef5 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -274,8 +274,8 @@ var ioFlags = []cli.Flag{ Usage: "Force requests to be 'host' for host-style or 'path' for path-style lookup. Default will attempt autodetect based on remote host name.", }, cli.StringSliceFlag{ - Name: "metadata", - Usage: "Add user metada to all objects using the format =. Random value can be set with 'rand:%length'. Can be used multiple times. Example: --metadata foo=bar --metadata randomValue=rand:1024.", + Name: "add-metadata", + Usage: "Add user metadata to all objects using the format =. Random value can be set with 'rand:%length'. Can be used multiple times. Example: --add-metadata foo=bar --add-metadata randomValue=rand:1024.", Hidden: true, }, cli.StringSliceFlag{ diff --git a/cli/list.go b/cli/list.go index 8c639dd..5341f4e 100644 --- a/cli/list.go +++ b/cli/list.go @@ -40,7 +40,7 @@ var listFlags = []cli.Flag{ Usage: "Size of each generated object. Can be a number or 10KB/MB/GB. All sizes are base 2 binary.", }, cli.BoolFlag{ - Name: "extended-metadata", + Name: "metadata", Usage: "Enable extended MinIO ListObjects with metadata, by default this benchmarking uses ListObjectsV2 API.", }, } @@ -72,7 +72,7 @@ func mainList(ctx *cli.Context) error { b := bench.List{ Common: getCommon(ctx, newGenSource(ctx, "obj.size")), Versions: ctx.Int("versions"), - Metadata: ctx.Bool("extended-metadata"), + Metadata: ctx.Bool("metadata"), CreateObjects: ctx.Int("objects"), NoPrefix: ctx.Bool("noprefix"), } diff --git a/cli/put.go b/cli/put.go index c424014..acb5ecb 100644 --- a/cli/put.go +++ b/cli/put.go @@ -91,7 +91,7 @@ func putOpts(ctx *cli.Context) minio.PutObjectOptions { PartSize: pSize, } - for _, flag := range []string{"metadata", "tag"} { + for _, flag := range []string{"add-metadata", "tag"} { values := make(map[string]string) for _, v := range ctx.StringSlice(flag) {