Skip to content

Commit ed26f47

Browse files
authored
chore: bump sdk-go (#2532)
1 parent d6804de commit ed26f47

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
1919
github.com/mattn/go-colorable v0.1.13
2020
github.com/mattn/go-isatty v0.0.16
21-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220927151912-e4665d911d6f
21+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221004094754-879a66c4d2f9
2222
github.com/spf13/cobra v1.5.0
2323
github.com/spf13/pflag v1.0.5
2424
github.com/stretchr/testify v1.8.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
7373
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
7474
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220927151912-e4665d911d6f h1:qsugnqny7lUAfb2r9rdzDd6P8Wfet67vHiFvjLJlqak=
7575
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220927151912-e4665d911d6f/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
76+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221004094754-879a66c4d2f9 h1:+1XmEP+Os3mmd4u8B3JhbtZHax+Ed+fR1boOJXoCHI8=
77+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221004094754-879a66c4d2f9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
7678
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
7779
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
7880
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=

internal/namespaces/instance/v1/custom_snapshot.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ func snapshotCreateBuilder(c *core.Command) *core.Command {
4949
api := instance.NewAPI(client)
5050
if args.Unified {
5151
request.VolumeType = instance.SnapshotVolumeTypeUnified
52-
} else {
52+
} else if request.VolumeID != nil {
5353
// If the snapshot is not unified, we need to set the snapshot volume type to the same type as the volume we target.
54+
// Done only when creating snapshot from volume
5455
volume, err := api.GetVolume(&instance.GetVolumeRequest{
55-
VolumeID: args.VolumeID,
56+
VolumeID: *args.VolumeID,
5657
Zone: args.Zone,
5758
})
5859
if err != nil {

0 commit comments

Comments
 (0)