-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(object): basic CRUD support for buckets (#3588)
Co-authored-by: scaleway-bot <github@scaleway.com> Co-authored-by: lmasson <lmasson@scaleway.com> Co-authored-by: Laure-di <62625835+Laure-di@users.noreply.github.com> Co-authored-by: Rémy Léone <rleone@scaleway.com>
- Loading branch information
1 parent
729c9ab
commit 6790095
Showing
39 changed files
with
5,482 additions
and
19 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
cmd/scw/testdata/test-all-usage-object-bucket-create-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Create an Object Storage Bucket with the S3 protocol. The namespace is shared between all S3 users, so its name must be unique. | ||
|
||
USAGE: | ||
scw object bucket create <name ...> [arg=value ...] | ||
|
||
ARGS: | ||
name The unique name of the bucket | ||
[tags.{index}] List of tags to set on the bucket | ||
[enable-versioning=false] Whether or not objects in the bucket should have multiple versions | ||
[acl=private] The permissions given to users (grantees) to read or write objects | ||
[region=fr-par] Region to target. If none is passed will use default region from the config | ||
|
||
FLAGS: | ||
-h, --help help for create | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
19 changes: 19 additions & 0 deletions
19
cmd/scw/testdata/test-all-usage-object-bucket-delete-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Delete an S3 bucket with all its content. | ||
|
||
USAGE: | ||
scw object bucket delete <name ...> [arg=value ...] | ||
|
||
ARGS: | ||
name The unique name of the bucket | ||
[region=fr-par] Region to target. If none is passed will use default region from the config | ||
|
||
FLAGS: | ||
-h, --help help for delete | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
20 changes: 20 additions & 0 deletions
20
cmd/scw/testdata/test-all-usage-object-bucket-get-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Get the properties of an S3 bucket like tags, endpoint, access control, versioning, size, etc. | ||
|
||
USAGE: | ||
scw object bucket get <name ...> [arg=value ...] | ||
|
||
ARGS: | ||
name The unique name of the bucket | ||
[with-size=false] Whether to return the total size of the bucket and the number of objects. This operation can take long for large buckets. | ||
[region=fr-par] Region to target. If none is passed will use default region from the config | ||
|
||
FLAGS: | ||
-h, --help help for get | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
18 changes: 18 additions & 0 deletions
18
cmd/scw/testdata/test-all-usage-object-bucket-list-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
List all existing S3 buckets in the specified region | ||
|
||
USAGE: | ||
scw object bucket list [arg=value ...] | ||
|
||
ARGS: | ||
[region=fr-par] Region to target. If none is passed will use default region from the config | ||
|
||
FLAGS: | ||
-h, --help help for list | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
22 changes: 22 additions & 0 deletions
22
cmd/scw/testdata/test-all-usage-object-bucket-update-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Update an S3 bucket's properties like tags, access control and versioning. | ||
|
||
USAGE: | ||
scw object bucket update <name ...> [arg=value ...] | ||
|
||
ARGS: | ||
name The unique name of the bucket | ||
[tags.{index}] List of new tags to set on the bucket | ||
[enable-versioning=false] Whether or not objects in the bucket should have multiple versions | ||
[acl=private] The permissions given to users (grantees) to read or write objects | ||
[region=fr-par] Region to target. If none is passed will use default region from the config | ||
|
||
FLAGS: | ||
-h, --help help for update | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
24 changes: 24 additions & 0 deletions
24
cmd/scw/testdata/test-all-usage-object-bucket-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 | ||
🟥🟥🟥 STDERR️️ 🟥🟥🟥️ | ||
Manage S3 buckets creation, deletion and updates to properties like tags, ACL and versioning. | ||
|
||
USAGE: | ||
scw object bucket <command> | ||
|
||
AVAILABLE COMMANDS: | ||
create Create an S3 bucket | ||
delete Delete an S3 bucket | ||
get Get information about an S3 bucket | ||
list List S3 buckets | ||
update Update an S3 bucket | ||
|
||
FLAGS: | ||
-h, --help help for bucket | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use | ||
|
||
Use "scw object bucket [command] --help" for more information about a command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.