Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
module github.com/linode/docker-machine-driver-linode

go 1.24.0

toolchain go1.24.1
go 1.24.11

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

require (
github.com/docker/machine v0.16.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27 h1:6XE5SIyDteS5BFR3EhlEt7UUBhkcf77loHYWaVS4BHM=
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.27/go.mod h1:WX9wJGY7+MC7527nUL2hvFOLNlowPeNjeiLtX5B6MnQ=
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43 h1:3AOpTvIZHfvNnCEaPvmMTiX65gY3yYtpabcAZJUgsTE=
gitlab.com/gitlab-org/ci-cd/docker-machine v0.16.2-gitlab.43/go.mod h1:WDpNHYkfs5yjw3iwSBFrFrsGZRGf2hPjkLVCbCvJvj8=
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
Expand Down
8 changes: 6 additions & 2 deletions pkg/drivers/linode/linode.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,21 @@ func (d *Driver) getClient() *linodego.Client {
}

client.SetUserAgent(ua)
client.SetDebug(true)
d.client = &client
}
return d.client
}

// SetClient sets the Linode API client for the driver
func (d *Driver) SetClient(client *linodego.Client) {
d.client = client
}

func createRandomRootPassword() (string, error) {
rawRootPass := make([]byte, 50)
_, err := rand.Read(rawRootPass)
if err != nil {
return "", fmt.Errorf("Failed to generate random password")
return "", errors.New("Failed to generate random password")
}
rootPass := base64.StdEncoding.EncodeToString(rawRootPass)
return rootPass, nil
Expand Down