diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-07-04 00:44:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-04 00:44:43 -0700 |
| commit | a122baa4271aa5d51ccc4692f6fae01bafd21d84 (patch) | |
| tree | 52dad96addef80f60f5f992a7954391cbfd6dffb | |
| parent | 267d45c313a5fe3444de2c62d4d175fd43a757d2 (diff) | |
| parent | 5bc895673e3f3967371680ce7603331bf652d09f (diff) | |
| download | seaweedfs-a122baa4271aa5d51ccc4692f6fae01bafd21d84.tar.xz seaweedfs-a122baa4271aa5d51ccc4692f6fae01bafd21d84.zip | |
Merge pull request #3268 from guol-fnst/fix_usage
add getting bucket quota
| -rw-r--r-- | weed/shell/command_s3_bucket_quota.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/command_s3_bucket_quota.go b/weed/shell/command_s3_bucket_quota.go index fc53a9c2b..b7dbe416a 100644 --- a/weed/shell/command_s3_bucket_quota.go +++ b/weed/shell/command_s3_bucket_quota.go @@ -32,7 +32,7 @@ func (c *commandS3BucketQuota) Do(args []string, commandEnv *CommandEnv, writer bucketCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) bucketName := bucketCommand.String("name", "", "bucket name") - operationName := bucketCommand.String("op", "set", "operation name [set|remove|enable|disable]") + operationName := bucketCommand.String("op", "set", "operation name [set|get|remove|enable|disable]") sizeMB := bucketCommand.Int64("sizeMB", 0, "bucket quota size in MiB") if err = bucketCommand.Parse(args); err != nil { return nil @@ -64,6 +64,9 @@ func (c *commandS3BucketQuota) Do(args []string, commandEnv *CommandEnv, writer switch *operationName { case "set": bucketEntry.Quota = *sizeMB * 1024 * 1024 + case "get": + fmt.Fprintf(writer, "bucket quota: %dMiB \n", bucketEntry.Quota/1024/1024) + return nil case "remove": bucketEntry.Quota = 0 case "enable": |
