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 (
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
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
7373github.com/russross/blackfriday/v2 v2.1.0 /go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM =
7474github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220927151912-e4665d911d6f h1:qsugnqny7lUAfb2r9rdzDd6P8Wfet67vHiFvjLJlqak =
7575github.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 =
7678github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ =
7779github.com/sergi/go-diff v1.2.0 /go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM =
7880github.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 {
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 {
You can’t perform that action at this time.
0 commit comments