Skip to content

Commit 1f7ce41

Browse files
committed
fix "http error 410 Gone": upgrade scaleway-sdk-go
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
1 parent d42c711 commit 1f7ce41

File tree

4 files changed

+96
-154
lines changed

4 files changed

+96
-154
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@
2727
# *.prof
2828

2929
/docker-machine-driver-scaleway
30+
/docker-machine-driver-scaleway-v2
31+
.env

driver/scaleway.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/docker/machine/libmachine/ssh"
1616
"github.com/docker/machine/libmachine/state"
1717

18-
instance "github.com/scaleway/scaleway-sdk-go/api/instance/v1"
18+
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
1919
"github.com/scaleway/scaleway-sdk-go/scw"
2020

2121
"github.com/sirupsen/logrus"
@@ -294,7 +294,7 @@ func (d *Driver) Create() (err error) {
294294
log.Debugf("Creating server name: %s", name)
295295
log.Debugf("Creating server image: %s", image)
296296
log.Debugf("Creating server zone: %s", zone)
297-
var volumes map[string]*instance.VolumeTemplate
297+
var volumes map[string]*instance.VolumeServerTemplate
298298
if d.rootVolumeSize != 0 {
299299
var t instance.VolumeVolumeType
300300
switch d.rootVolumeType {
@@ -305,9 +305,10 @@ func (d *Driver) Create() (err error) {
305305
default:
306306
return fmt.Errorf("You must provide an known root-volume-type: local or block")
307307
}
308-
volumes = map[string]*instance.VolumeTemplate{
308+
size := scw.Size(d.rootVolumeSize) * scw.GB
309+
volumes = map[string]*instance.VolumeServerTemplate{
309310
"0": {
310-
Size: scw.Size(d.rootVolumeSize) * scw.GB,
311+
Size: &size,
311312
VolumeType: t,
312313
},
313314
}
@@ -322,7 +323,7 @@ func (d *Driver) Create() (err error) {
322323
CommercialType: commercialType,
323324
Image: image,
324325
Volumes: volumes,
325-
EnableIPv6: ipv6,
326+
EnableIPv6: &ipv6,
326327
BootType: &bootType,
327328
// Bootscript: &bootscript,
328329
// Organization: organizationId,

go.mod

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,12 @@ replace (
99
go 1.15
1010

1111
require (
12-
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
13-
github.com/creack/goselect v0.1.1 // indirect
14-
github.com/docker/docker v1.13.2-0.20170601211448-f5ec1e2936dc // indirect
15-
github.com/docker/go-units v0.4.0 // indirect
12+
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
13+
github.com/docker/docker v27.0.1+incompatible // indirect
1614
github.com/docker/machine v0.16.2
17-
github.com/dustin/go-humanize v1.0.0 // indirect
18-
github.com/google/go-cmp v0.3.1 // indirect
19-
github.com/gorilla/websocket v1.4.1 // indirect
20-
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
21-
github.com/mattn/go-isatty v0.0.11 // indirect
22-
github.com/moul/gotty-client v1.7.0 // indirect
23-
github.com/moul/http2curl v1.0.0 // indirect
2415
github.com/pkg/errors v0.8.1 // indirect
25-
github.com/renstrom/fuzzysearch v1.1.0 // indirect
26-
github.com/samalba/dockerclient v0.0.0-20160531175551-a30362618471 // indirect
27-
github.com/scaleway/scaleway-cli v1.11.1
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7
29-
github.com/sirupsen/logrus v1.7.0
30-
github.com/smartystreets/goconvey v1.6.4 // indirect
31-
github.com/stretchr/objx v0.1.1 // indirect
32-
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9 // indirect
33-
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
34-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
35-
gopkg.in/yaml.v2 v2.3.0
16+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.28
17+
github.com/sirupsen/logrus v1.9.3
18+
golang.org/x/crypto v0.24.0 // indirect
3619
gotest.tools v2.2.0+incompatible // indirect
37-
moul.io/anonuuid v1.2.1
3820
)

0 commit comments

Comments
 (0)