diff --git a/cmd/scw/testdata/test-all-usage-instance-snapshot-create-usage.golden b/cmd/scw/testdata/test-all-usage-instance-snapshot-create-usage.golden index 1801a5a6cb..b7d3a01cc8 100644 --- a/cmd/scw/testdata/test-all-usage-instance-snapshot-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-snapshot-create-usage.golden @@ -16,7 +16,7 @@ EXAMPLES: scw instance snapshot create name=foobar volume-id=11111111-1111-1111-1111-111111111111 Import a QCOW file as an Instance snapshot - scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=unified bucket=my-bucket key=my-qcow2-file-name + scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=b_ssd bucket=my-bucket key=my-qcow2-file-name ARGS: [name=] Name of the snapshot diff --git a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden index ac32baf832..2c5d850302 100644 --- a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden @@ -9,12 +9,8 @@ have one Instance with a volume containing the OS and another one containing the application data, and you want to use different snapshot strategies on both volumes. -A snapshot's volume type can be either its original volume's type -(`l_ssd` or `b_ssd`) or `unified`. Similarly, volumes can be created as well from snapshots -of their own type or `unified`. Therefore, to migrate data from a `l_ssd` volume -to a `b_ssd` volume, one can create a `unified` snapshot from the original volume -and a new `b_ssd` volume from this snapshot. The newly created volume will hold a copy -of the data of the original volume. +A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`). +Volumes can be created from snapshots of their own type. USAGE: scw instance snapshot diff --git a/cmd/scw/testdata/test-all-usage-instance-volume-usage.golden b/cmd/scw/testdata/test-all-usage-instance-volume-usage.golden index 2d4fa4f126..a2fd128dd4 100644 --- a/cmd/scw/testdata/test-all-usage-instance-volume-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-volume-usage.golden @@ -12,9 +12,6 @@ Two different types of volume (`volume_type`) are available: centralized cluster. You can plug and unplug a volume while your Instance is running. -Note: The `unified` volume type is not available for volumes. This -type can only be used on snapshots. - Minimum and maximum volume sizes for each volume types can be queried from the zone `/products/volumes` API endpoint. _I.e_ for: - `fr-par-1` use https://api.scaleway.com/instance/v1/zones/fr-par-1/products/volumes diff --git a/docs/commands/instance.md b/docs/commands/instance.md index a80280a948..ce2d5ddefd 100644 --- a/docs/commands/instance.md +++ b/docs/commands/instance.md @@ -2379,12 +2379,8 @@ have one Instance with a volume containing the OS and another one containing the application data, and you want to use different snapshot strategies on both volumes. -A snapshot's volume type can be either its original volume's type -(`l_ssd` or `b_ssd`) or `unified`. Similarly, volumes can be created as well from snapshots -of their own type or `unified`. Therefore, to migrate data from a `l_ssd` volume -to a `b_ssd` volume, one can create a `unified` snapshot from the original volume -and a new `b_ssd` volume from this snapshot. The newly created volume will hold a copy -of the data of the original volume. +A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`). +Volumes can be created from snapshots of their own type. ### Create a snapshot from a specified volume or from a QCOW2 file @@ -2434,7 +2430,7 @@ scw instance snapshot create name=foobar volume-id=11111111-1111-1111-1111-11111 Import a QCOW file as an Instance snapshot ``` -scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=unified bucket=my-bucket key=my-qcow2-file-name +scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=b_ssd bucket=my-bucket key=my-qcow2-file-name ``` @@ -2845,9 +2841,6 @@ Two different types of volume (`volume_type`) are available: centralized cluster. You can plug and unplug a volume while your Instance is running. -Note: The `unified` volume type is not available for volumes. This -type can only be used on snapshots. - Minimum and maximum volume sizes for each volume types can be queried from the zone `/products/volumes` API endpoint. _I.e_ for: - `fr-par-1` use https://api.scaleway.com/instance/v1/zones/fr-par-1/products/volumes diff --git a/go.mod b/go.mod index 96a7373ada..3a3e0461e5 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/moby/buildkit v0.11.6 github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240304163539-4f60618924cb github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 9fe0443d0a..14e6ed345c 100644 --- a/go.sum +++ b/go.sum @@ -392,8 +392,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240304163539-4f60618924cb h1:hKonT9HWXUZx9113DMqtWPg81A/SQYsq8VGYUCiVDno= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240304163539-4f60618924cb/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= diff --git a/internal/namespaces/instance/v1/instance_cli.go b/internal/namespaces/instance/v1/instance_cli.go index 4bda66d2df..8ec84ef5f2 100644 --- a/internal/namespaces/instance/v1/instance_cli.go +++ b/internal/namespaces/instance/v1/instance_cli.go @@ -204,12 +204,8 @@ have one Instance with a volume containing the OS and another one containing the application data, and you want to use different snapshot strategies on both volumes. -A snapshot's volume type can be either its original volume's type -(` + "`" + `l_ssd` + "`" + ` or ` + "`" + `b_ssd` + "`" + `) or ` + "`" + `unified` + "`" + `. Similarly, volumes can be created as well from snapshots -of their own type or ` + "`" + `unified` + "`" + `. Therefore, to migrate data from a ` + "`" + `l_ssd` + "`" + ` volume -to a ` + "`" + `b_ssd` + "`" + ` volume, one can create a ` + "`" + `unified` + "`" + ` snapshot from the original volume -and a new ` + "`" + `b_ssd` + "`" + ` volume from this snapshot. The newly created volume will hold a copy -of the data of the original volume.`, +A snapshot's volume type is its original volume's type (` + "`" + `l_ssd` + "`" + ` or ` + "`" + `b_ssd` + "`" + `). +Volumes can be created from snapshots of their own type.`, Namespace: "instance", Resource: "snapshot", } @@ -249,9 +245,6 @@ Two different types of volume (` + "`" + `volume_type` + "`" + `) are available: centralized cluster. You can plug and unplug a volume while your Instance is running. -Note: The ` + "`" + `unified` + "`" + ` volume type is not available for volumes. This -type can only be used on snapshots. - Minimum and maximum volume sizes for each volume types can be queried from the zone ` + "`" + `/products/volumes` + "`" + ` API endpoint. _I.e_ for: - ` + "`" + `fr-par-1` + "`" + ` use https://api.scaleway.com/instance/v1/zones/fr-par-1/products/volumes @@ -1474,7 +1467,7 @@ func instanceSnapshotCreate() *core.Command { }, { Short: "Import a QCOW file as an Instance snapshot", - ArgsJSON: `{"bucket":"my-bucket","key":"my-qcow2-file-name","name":"my-imported-snapshot","volume_type":"unified","zone":"fr-par-1"}`, + ArgsJSON: `{"bucket":"my-bucket","key":"my-qcow2-file-name","name":"my-imported-snapshot","volume_type":"b_ssd","zone":"fr-par-1"}`, }, }, }