Skip to content

Commit 5f2d641

Browse files
fix(instance): optional image field (#4202)
1 parent 02c8e16 commit 5f2d641

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241016074915-cfe16eadece2
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241017133226-2eefb481a740
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
465465
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241016074915-cfe16eadece2 h1:RJiIfnp9Jh35YJswV5soHKu+pKFHJkrSJlX7zyobfI4=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241016074915-cfe16eadece2/go.mod h1:3jrRJM7638J+P33hKy9MBvfOBxNo8pEGNQQoIv65Ihg=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241017133226-2eefb481a740 h1:6znLikGwSaarp3QCambwHFyYde3Qm4bcmyumsWhkZWA=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241017133226-2eefb481a740/go.mod h1:3jrRJM7638J+P33hKy9MBvfOBxNo8pEGNQQoIv65Ihg=
470470
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
471471
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
472472
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/instance/v1/custom_server_create_builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ func (sb *ServerBuilder) AddImage(image string) (*ServerBuilder, error) {
171171
image = localImage.ID
172172
}
173173

174-
sb.createReq.Image = image
174+
sb.createReq.Image = &image
175175

176176
getImageResponse, err := sb.apiInstance.GetImage(&instance.GetImageRequest{
177177
Zone: sb.createReq.Zone,
178-
ImageID: sb.createReq.Image,
178+
ImageID: *(sb.createReq.Image),
179179
})
180180
if err != nil {
181181
logger.Warningf("cannot get image %s: %s", sb.createReq.Image, err)

0 commit comments

Comments
 (0)