File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
internal/namespaces/instance/v1 Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ require (
18
18
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
19
19
github.com/mattn/go-colorable v0.1.13
20
20
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
22
22
github.com/spf13/cobra v1.5.0
23
23
github.com/spf13/pflag v1.0.5
24
24
github.com/stretchr/testify v1.8.0
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
73
73
github.com/russross/blackfriday/v2 v2.1.0 /go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM =
74
74
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220927151912-e4665d911d6f h1:qsugnqny7lUAfb2r9rdzDd6P8Wfet67vHiFvjLJlqak =
75
75
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 =
76
78
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ =
77
79
github.com/sergi/go-diff v1.2.0 /go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM =
78
80
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU =
Original file line number Diff line number Diff line change @@ -49,10 +49,11 @@ func snapshotCreateBuilder(c *core.Command) *core.Command {
49
49
api := instance .NewAPI (client )
50
50
if args .Unified {
51
51
request .VolumeType = instance .SnapshotVolumeTypeUnified
52
- } else {
52
+ } else if request . VolumeID != nil {
53
53
// 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
54
55
volume , err := api .GetVolume (& instance.GetVolumeRequest {
55
- VolumeID : args .VolumeID ,
56
+ VolumeID : * args .VolumeID ,
56
57
Zone : args .Zone ,
57
58
})
58
59
if err != nil {
You can’t perform that action at this time.
0 commit comments