Skip to content

Commit d5ec863

Browse files
feat: remove s3 integration (#573)
This reverts commit ea013f8.
1 parent e9308e1 commit d5ec863

File tree

1,632 files changed

+11
-593405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,632 files changed

+11
-593405
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ prepare-release-dist: build
9898
GOOS=linux GOARCH=arm go build -o dist/latest/scw-linux-arm github.com/scaleway/scaleway-cli/cmd/scw
9999
GOOS=linux GOARCH=arm64 go build -o dist/latest/scw-linux-arm64 github.com/scaleway/scaleway-cli/cmd/scw
100100

101-
GOOS=darwin GOARCH=386 go build --tags kqueue -o dist/latest/scw-darwin-i386 github.com/scaleway/scaleway-cli/cmd/scw
102-
GOOS=darwin GOARCH=amd64 go build --tags kqueue -o dist/latest/scw-darwin-amd64 github.com/scaleway/scaleway-cli/cmd/scw
101+
GOOS=darwin GOARCH=386 go build -o dist/latest/scw-darwin-i386 github.com/scaleway/scaleway-cli/cmd/scw
102+
GOOS=darwin GOARCH=amd64 go build -o dist/latest/scw-darwin-amd64 github.com/scaleway/scaleway-cli/cmd/scw
103103

104104
# Issue with mody and [free|net]bsd for go1.12+ https://github.com/moby/moby/pull/38818
105105
if [ $(GOMINORVERSION) -lt 12 ]; then \

README.md

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Read the [blog post](https://blog.scaleway.com/2015/05/20/manage-baremetal-serve
5252
* [`rm [OPTIONS] SERVER [SERVER...]`](#scw-rm)
5353
* [`rmi [OPTIONS] IMAGE [IMAGE...]`](#scw-rmi)
5454
* [`run [OPTIONS] IMAGE [COMMAND] [ARGS...]`](#scw-run)
55-
* [`s3 [OPTIONS]`](#scw-s3)
5655
* [`search [OPTIONS] TERM`](#scw-search)
5756
* [`start [OPTIONS] SERVER [SERVER...]`](#scw-start)
5857
* [`stop [OPTIONS] SERVER [SERVER...]`](#scw-stop)
@@ -200,7 +199,6 @@ Commands:
200199
rm Remove one or more servers
201200
rmi Remove one or more image(s)/volume(s)/snapshot(s)
202201
run Run a command in a new server
203-
s3 Access to s3 bucket
204202
search Search the Scaleway Hub for images
205203
start Start a stopped server
206204
stop Stop a running server
@@ -774,80 +772,6 @@ Examples:
774772
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
775773
```
776774

777-
#### `scw s3`
778-
779-
Integration of object storage to the scaleway CLI is done using the minio client. This is not a long term solution and we think about providing our own S3 cli, but it will probably not be compliant with minio client.
780-
Please understand that we will put priority on innovation regarding our cloud rather than doing another full s3 client.
781-
782-
```console
783-
NAME:
784-
scw s3 - Minio Client for cloud storage and filesystems.
785-
786-
USAGE:
787-
scw s3 [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
788-
789-
COMMANDS:
790-
ls List files and folders.
791-
mb Make a bucket or a folder.
792-
cat Display file and object contents.
793-
pipe Redirect STDIN to an object or file or STDOUT.
794-
share Generate URL for sharing.
795-
cp Copy files and objects.
796-
mirror Mirror buckets and folders.
797-
find Search for files and objects.
798-
stat Stat contents of objects and folders.
799-
diff List differences in object name, size, and date between folders.
800-
rm Remove files and objects.
801-
session Manage saved sessions for cp command.
802-
config Manage mc configuration file.
803-
804-
GLOBAL FLAGS:
805-
--config-folder value, -C value Path to configuration folder. (default: "/home/atom/.mc")
806-
--quiet, -q Disable progress bar display.
807-
--no-color Disable color theme.
808-
--json Enable JSON formatted output.
809-
--debug Enable debug output.
810-
--insecure Disable SSL certificate verification.
811-
--help, -h Show help.
812-
```
813-
814-
To begin with, you will need to configure your credentials, using the following command:
815-
816-
```console
817-
$> scw s3 config
818-
AccessKey: <YOUR-ACCESS-KEY>
819-
SecretKey: <YOUR-SECRET-KEY>
820-
```
821-
822-
This call will configure two minio profiles, ams and par, respectively for 'nl-ams' and
823-
'fr-par' regions, currently, the 'fr-par' region is not usable, but will be soon.
824-
825-
The following examples show basic s3 operations on 'nl-ams' region:
826-
827-
Creating a bucket:
828-
```console
829-
$> scw s3 mb ams/minio-test-bucket
830-
Bucket created successfully `ams/minio-test-bucket`.
831-
```
832-
833-
Listing:
834-
```console
835-
$> scw s3 ls ams/
836-
[2018-11-20 11:06:32 CET] 0B minio-test-bucket/
837-
```
838-
839-
Put an object:
840-
```console
841-
$> scw s3 cp /etc/hosts ams/minio-test-bucket/hosts
842-
`/etc/hosts` -> `ams/minio-test-bucket/hosts`
843-
```
844-
845-
Removing an object / bucket:
846-
```console
847-
$> scw s3 rm ams/minio-test-bucket/hosts
848-
Removing `ams/minio-test-bucket/hosts`.
849-
```
850-
851775
#### `scw search`
852776

853777
```console
@@ -1313,7 +1237,7 @@ View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.17.
13131237

13141238
* Fix: it is now possible to `scw inspect` snapshots [#510](https://github.com/scaleway/scaleway-cli/issues/510)
13151239
* Fix: add region details in cache for snapshots, images, bootscripts and volumes [#510](https://github.com/scaleway/scaleway-cli/issues/510)
1316-
* Fix: `scw attach` works again [#508](https://github.com/scaleway/scaleway-cli/issues/508)
1240+
* Fix: `scw attach` works again [#508](https://github.com/scaleway/scaleway-cli/issues/508)
13171241
* Fix unittests
13181242

13191243
View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.16...v1.17)
@@ -1723,7 +1647,6 @@ For previous Node.js versions, see [scaleway-cli-node](https://github.com/moul/s
17231647
* Support of `run -e, --env` option
17241648
* Support of `run --name` option
17251649
* Support of `run -v, --volume` option
1726-
* Support of `s3` command
17271650
* Support of `search` command
17281651
* Support of `search --no-trunc` option
17291652
* Support of `start` command

pkg/cli/cmd_s3.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

pkg/cli/commands.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ var Commands = []*Command{
3333
cmdRm,
3434
cmdRmi,
3535
cmdRun,
36-
cmdS3,
3736
cmdSearch,
3837
cmdStart,
3938
cmdStop,

pkg/commands/s3.go

Lines changed: 0 additions & 155 deletions
This file was deleted.

pkg/config/config.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ func (c *Config) Save(configPath string) error {
5757
func GetConfig(scwrcPath string) (*Config, error) {
5858
var err error
5959

60-
if scwrcPath != "" {
61-
os.Setenv("SCW_CONFIG_PATH", scwrcPath)
62-
}
63-
6460
orgid := os.Getenv("SCW_ORGANIZATION")
6561
token := os.Getenv("SCW_TOKEN")
6662
if token != "" && orgid != "" {

pkg/config/config_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818

1919
func TestGetConfigFilePath(t *testing.T) {
2020
Convey("Testing GetConfigFilePath()", t, func() {
21-
os.Unsetenv("SCW_CONFIG_PATH")
2221
configPath, err := GetConfigFilePath()
2322
So(err, ShouldBeNil)
2423
So(configPath, ShouldNotEqual, "")

pkg/utils/utils.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ func NewSSHExecCmd(publicIPAddress, privateIPAddress, user string, port int, all
8585
quiet := os.Getenv("DEBUG") != "1"
8686
secureExec := os.Getenv("SCW_SECURE_EXEC") == "1"
8787
sshCommand := &sshcommand.Command{
88-
AllocateTTY: allocateTTY,
89-
Command: command,
90-
Host: publicIPAddress,
91-
Quiet: quiet,
92-
SkipHostKeyChecking: !secureExec,
93-
User: user,
94-
NoEscapeCommand: true,
95-
Port: port,
88+
AllocateTTY: allocateTTY,
89+
Command: command,
90+
Host: publicIPAddress,
91+
Quiet: quiet,
92+
SkipHostKeyChecking: !secureExec,
93+
User: user,
94+
NoEscapeCommand: true,
95+
Port: port,
9696
EnableSSHKeyForwarding: enableSSHKeyForwarding,
9797
}
9898
if gatewayIPAddress != "" {

0 commit comments

Comments
 (0)