Skip to content

Commit 99d6d13

Browse files
docs(instance): fix terminate action documentation and remove b_ssd volumes documentation (#4820)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 0926fff commit 99d6d13

9 files changed

+18
-81
lines changed

cmd/scw/testdata/test-all-usage-instance-snapshot-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ EXAMPLES:
1616
scw instance snapshot create name=foobar volume-id=11111111-1111-1111-1111-111111111111
1717

1818
Import a QCOW file as an Instance snapshot
19-
scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=b_ssd bucket=my-bucket key=my-qcow2-file-name
19+
scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=l_ssd bucket=my-bucket key=my-qcow2-file-name
2020

2121
ARGS:
2222
[name=<generated>] Name of the snapshot

cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ have one Instance with a volume containing the OS and another one
99
containing the application data, and you want to use different
1010
snapshot strategies on both volumes.
1111

12-
A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
1312
Volumes can be created from snapshots of their own type.
1413

1514
USAGE:

cmd/scw/testdata/test-all-usage-instance-volume-list-usage.golden

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@ EXAMPLES:
99
List all volumes
1010
scw instance volume list
1111

12-
List all block storage volumes
13-
scw instance volume list volume-type=b_ssd
14-
15-
List all local storage volumes
16-
scw instance volume list volume-type=l_ssd
17-
1812
List all volumes that match a name
1913
scw instance volume list name=foobar
2014

21-
List all block storage volumes that match a name
22-
scw instance volume list volume-type=b_ssd name=foobar
23-
2415
ARGS:
2516
[volume-type] Filter by volume type (l_ssd | b_ssd | unified | scratch | sbs_volume | sbs_snapshot)
2617
[project-id] Filter volume by Project ID

cmd/scw/testdata/test-all-usage-instance-volume-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
3+
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
44

55
USAGE:
66
scw instance volume update <volume-id ...> [arg=value ...]

cmd/scw/testdata/test-all-usage-instance-volume-usage.golden

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ A volume is where you store your data inside your Instance. It
44
appears as a block device on Linux that you can use to create
55
a filesystem and mount it.
66

7-
Two different types of volume (`volume_type`) are available:
8-
- `l_ssd` is a local block storage: your data is downloaded on
9-
the hypervisor and you need to power off your Instance to attach
10-
or detach a volume.
11-
- `b_ssd` is a remote block storage: your data is stored on a
12-
centralized cluster. You can plug and unplug a volume while
13-
your Instance is running.
7+
The Instance API only supports local (`l_ssd`) and `scratch` volume types.
8+
Block storage volumes can also be attached to Instances, these volumes are
9+
managed by the SBS API (https://www.scaleway.com/en/developers/api/block/).
1410

1511
Minimum and maximum volume sizes for each volume types can be queried
1612
from the zone `/products/volumes` API endpoint. _I.e_ for:
@@ -21,10 +17,6 @@ Each type of volume is also subject to a global quota for the sum of all the
2117
volumes. This quota depends of the level of support and may be
2218
changed on demand.
2319

24-
Be wary that when terminating an Instance, if you want to keep
25-
your block storage volume, **you must** detach it before you
26-
issue the `terminate` call.
27-
2820
When using multiple block devices, it's advised to mount them by
2921
using their UUID instead of their device name. A device name is
3022
subject to change depending on the volumes order. Block devices

docs/commands/instance.md

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,7 +2487,6 @@ have one Instance with a volume containing the OS and another one
24872487
containing the application data, and you want to use different
24882488
snapshot strategies on both volumes.
24892489

2490-
A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
24912490
Volumes can be created from snapshots of their own type.
24922491

24932492

@@ -2559,7 +2558,7 @@ scw instance snapshot create name=foobar volume-id=11111111-1111-1111-1111-11111
25592558

25602559
Import a QCOW file as an Instance snapshot
25612560
```
2562-
scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=b_ssd bucket=my-bucket key=my-qcow2-file-name
2561+
scw instance snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=l_ssd bucket=my-bucket key=my-qcow2-file-name
25632562
```
25642563

25652564

@@ -3010,13 +3009,9 @@ A volume is where you store your data inside your Instance. It
30103009
appears as a block device on Linux that you can use to create
30113010
a filesystem and mount it.
30123011

3013-
Two different types of volume (`volume_type`) are available:
3014-
- `l_ssd` is a local block storage: your data is downloaded on
3015-
the hypervisor and you need to power off your Instance to attach
3016-
or detach a volume.
3017-
- `b_ssd` is a remote block storage: your data is stored on a
3018-
centralized cluster. You can plug and unplug a volume while
3019-
your Instance is running.
3012+
The Instance API only supports local (`l_ssd`) and `scratch` volume types.
3013+
Block storage volumes can also be attached to Instances, these volumes are
3014+
managed by the SBS API (https://www.scaleway.com/en/developers/api/block/).
30203015

30213016
Minimum and maximum volume sizes for each volume types can be queried
30223017
from the zone `/products/volumes` API endpoint. _I.e_ for:
@@ -3027,10 +3022,6 @@ Each type of volume is also subject to a global quota for the sum of all the
30273022
volumes. This quota depends of the level of support and may be
30283023
changed on demand.
30293024

3030-
Be wary that when terminating an Instance, if you want to keep
3031-
your block storage volume, **you must** detach it before you
3032-
issue the `terminate` call.
3033-
30343025
When using multiple block devices, it's advised to mount them by
30353026
using their UUID instead of their device name. A device name is
30363027
subject to change depending on the volumes order. Block devices
@@ -3190,26 +3181,11 @@ List all volumes
31903181
scw instance volume list
31913182
```
31923183

3193-
List all block storage volumes
3194-
```
3195-
scw instance volume list volume-type=b_ssd
3196-
```
3197-
3198-
List all local storage volumes
3199-
```
3200-
scw instance volume list volume-type=l_ssd
3201-
```
3202-
32033184
List all volumes that match a name
32043185
```
32053186
scw instance volume list name=foobar
32063187
```
32073188

3208-
List all block storage volumes that match a name
3209-
```
3210-
scw instance volume list volume-type=b_ssd name=foobar
3211-
```
3212-
32133189

32143190

32153191

@@ -3239,7 +3215,7 @@ scw instance volume plan-migration <volume-id ...> [arg=value ...]
32393215

32403216
### Update a volume
32413217

3242-
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
3218+
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
32433219

32443220
**Usage:**
32453221

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250610132304-0ea56270b666
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250612160241-cb8e35ad61c5
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250610132304-0ea56270b666 h1:NYaPksM7wPC69Fe9VCUoYY8GYB1hplR6s5hO2PA9rSQ=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250610132304-0ea56270b666/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250612160241-cb8e35ad61c5 h1:c13eCwQV4J6zi5v43Xd2c2xwbkfUU8t1zxstAt6picQ=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250612160241-cb8e35ad61c5/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ have one Instance with a volume containing the OS and another one
210210
containing the application data, and you want to use different
211211
snapshot strategies on both volumes.
212212
213-
A snapshot's volume type is its original volume's type (` + "`" + `l_ssd` + "`" + ` or ` + "`" + `b_ssd` + "`" + `).
214213
Volumes can be created from snapshots of their own type.`,
215214
Namespace: "instance",
216215
Resource: "snapshot",
@@ -243,13 +242,9 @@ func instanceVolume() *core.Command {
243242
appears as a block device on Linux that you can use to create
244243
a filesystem and mount it.
245244
246-
Two different types of volume (` + "`" + `volume_type` + "`" + `) are available:
247-
- ` + "`" + `l_ssd` + "`" + ` is a local block storage: your data is downloaded on
248-
the hypervisor and you need to power off your Instance to attach
249-
or detach a volume.
250-
- ` + "`" + `b_ssd` + "`" + ` is a remote block storage: your data is stored on a
251-
centralized cluster. You can plug and unplug a volume while
252-
your Instance is running.
245+
The Instance API only supports local (` + "`" + `l_ssd` + "`" + `) and ` + "`" + `scratch` + "`" + ` volume types.
246+
Block storage volumes can also be attached to Instances, these volumes are
247+
managed by the SBS API (https://www.scaleway.com/en/developers/api/block/).
253248
254249
Minimum and maximum volume sizes for each volume types can be queried
255250
from the zone ` + "`" + `/products/volumes` + "`" + ` API endpoint. _I.e_ for:
@@ -260,10 +255,6 @@ Each type of volume is also subject to a global quota for the sum of all the
260255
volumes. This quota depends of the level of support and may be
261256
changed on demand.
262257
263-
Be wary that when terminating an Instance, if you want to keep
264-
your block storage volume, **you must** detach it before you
265-
issue the ` + "`" + `terminate` + "`" + ` call.
266-
267258
When using multiple block devices, it's advised to mount them by
268259
using their UUID instead of their device name. A device name is
269260
subject to change depending on the volumes order. Block devices
@@ -1837,7 +1828,7 @@ func instanceSnapshotCreate() *core.Command {
18371828
},
18381829
{
18391830
Short: "Import a QCOW file as an Instance snapshot",
1840-
ArgsJSON: `{"bucket":"my-bucket","key":"my-qcow2-file-name","name":"my-imported-snapshot","volume_type":"b_ssd","zone":"fr-par-1"}`,
1831+
ArgsJSON: `{"bucket":"my-bucket","key":"my-qcow2-file-name","name":"my-imported-snapshot","volume_type":"l_ssd","zone":"fr-par-1"}`,
18411832
},
18421833
},
18431834
}
@@ -2152,22 +2143,10 @@ func instanceVolumeList() *core.Command {
21522143
Short: "List all volumes",
21532144
ArgsJSON: `null`,
21542145
},
2155-
{
2156-
Short: "List all block storage volumes",
2157-
ArgsJSON: `{"volume_type":"b_ssd"}`,
2158-
},
2159-
{
2160-
Short: "List all local storage volumes",
2161-
ArgsJSON: `{"volume_type":"l_ssd"}`,
2162-
},
21632146
{
21642147
Short: "List all volumes that match a name",
21652148
ArgsJSON: `{"name":"foobar"}`,
21662149
},
2167-
{
2168-
Short: "List all block storage volumes that match a name",
2169-
ArgsJSON: `{"name":"foobar","volume_type":"b_ssd"}`,
2170-
},
21712150
},
21722151
View: &core.View{Fields: []*core.ViewField{
21732152
{
@@ -2348,7 +2327,7 @@ func instanceVolumeGet() *core.Command {
23482327
func instanceVolumeUpdate() *core.Command {
23492328
return &core.Command{
23502329
Short: `Update a volume`,
2351-
Long: `Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only ` + "`" + `b_ssd` + "`" + ` volumes can currently be increased in size.`,
2330+
Long: `Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).`,
23522331
Namespace: "instance",
23532332
Resource: "volume",
23542333
Verb: "update",

0 commit comments

Comments
 (0)