Skip to content

Commit 79a35b8

Browse files
Maintenance Update (#214)
* Upgrade docker machine to v0.16.2-gitlab.43 * Turn off linode client debug * Fix lint * Add SetClient function to allow customized linodego client
1 parent 8c25205 commit 79a35b8

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
module github.com/linode/docker-machine-driver-linode
22

3-
go 1.24.0
4-
5-
toolchain go1.24.1
3+
go 1.24.11
64

75
// This replacement is necessary to support Docker versions > v20.x.x
86
// which provide critical security fixes.
9-
replace github.com/docker/machine => gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27
7+
replace github.com/docker/machine => gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43
108

119
require (
1210
github.com/docker/machine v0.16.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
2323
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
2424
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
2525
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
26-
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27 h1:6XE5SIyDteS5BFR3EhlEt7UUBhkcf77loHYWaVS4BHM=
27-
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27/go.mod h1:WX9wJGY7+MC7527nUL2hvFOLNlowPeNjeiLtX5B6MnQ=
26+
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43 h1:3AOpTvIZHfvNnCEaPvmMTiX65gY3yYtpabcAZJUgsTE=
27+
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43/go.mod h1:WDpNHYkfs5yjw3iwSBFrFrsGZRGf2hPjkLVCbCvJvj8=
2828
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
2929
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
3030
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=

pkg/drivers/linode/linode.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,21 @@ func (d *Driver) getClient() *linodego.Client {
102102
}
103103

104104
client.SetUserAgent(ua)
105-
client.SetDebug(true)
106105
d.client = &client
107106
}
108107
return d.client
109108
}
110109

110+
// SetClient sets the Linode API client for the driver
111+
func (d *Driver) SetClient(client *linodego.Client) {
112+
d.client = client
113+
}
114+
111115
func createRandomRootPassword() (string, error) {
112116
rawRootPass := make([]byte, 50)
113117
_, err := rand.Read(rawRootPass)
114118
if err != nil {
115-
return "", fmt.Errorf("Failed to generate random password")
119+
return "", errors.New("Failed to generate random password")
116120
}
117121
rootPass := base64.StdEncoding.EncodeToString(rawRootPass)
118122
return rootPass, nil

0 commit comments

Comments
 (0)