Skip to content

Commit 145ec80

Browse files
authored
feat(instance): add scratch storage (#3346)
1 parent 979e8c9 commit 145ec80

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ARGS:
1616
[additional-snapshots.{index}.id] UUID of the snapshot to add
1717
[additional-snapshots.{index}.name] Name of the additional snapshot
1818
[additional-snapshots.{index}.size] Size of the additional snapshot
19-
[additional-snapshots.{index}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd | unified)
19+
[additional-snapshots.{index}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd | unified | scratch)
2020
[additional-snapshots.{index}.project-id] Project ID that own the additional snapshot
2121
[project-id] Project ID to use. If none is passed the default project ID will be used
2222
[tags.{index}] Tags of the image

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARGS:
1919
[name=<generated>] Volume name
2020
[project-id] Project ID to use. If none is passed the default project ID will be used
2121
[tags.{index}] Volume tags
22-
[volume-type] Volume type (l_ssd | b_ssd | unified)
22+
[volume-type] Volume type (l_ssd | b_ssd | unified | scratch)
2323
[size] Volume disk size, must be a multiple of 512
2424
[base-volume] ID of the volume on which this volume will be based
2525
[base-snapshot] ID of the snapshot on which this volume will be based

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EXAMPLES:
2222
scw instance volume list volume-type=b_ssd name=foobar
2323

2424
ARGS:
25-
[volume-type] Filter by volume type (l_ssd | b_ssd | unified)
25+
[volume-type] Filter by volume type (l_ssd | b_ssd | unified | scratch)
2626
[project-id] Filter volume by Project ID
2727
[tags.{index}] Filter volumes with these exact tags (to filter with several tags, use commas to separate them)
2828
[name] Filter volume by name (for eg. "vol" will return "myvolume" but not "data")

docs/commands/instance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ scw instance image create [arg=value ...]
132132
| additional-snapshots.{index}.id | | UUID of the snapshot to add |
133133
| additional-snapshots.{index}.name | | Name of the additional snapshot |
134134
| additional-snapshots.{index}.size | | Size of the additional snapshot |
135-
| additional-snapshots.{index}.volume-type | One of: `l_ssd`, `b_ssd`, `unified` | Underlying volume type of the additional snapshot |
135+
| additional-snapshots.{index}.volume-type | One of: `l_ssd`, `b_ssd`, `unified`, `scratch` | Underlying volume type of the additional snapshot |
136136
| additional-snapshots.{index}.project-id | | Project ID that own the additional snapshot |
137137
| ~~additional-snapshots.{index}.organization-id~~ | Deprecated | Organization ID that own the additional snapshot |
138138
| project-id | | Project ID to use. If none is passed the default project ID will be used |
@@ -2928,7 +2928,7 @@ scw instance volume create [arg=value ...]
29282928
| name | Default: `<generated>` | Volume name |
29292929
| project-id | | Project ID to use. If none is passed the default project ID will be used |
29302930
| tags.{index} | | Volume tags |
2931-
| volume-type | One of: `l_ssd`, `b_ssd`, `unified` | Volume type |
2931+
| volume-type | One of: `l_ssd`, `b_ssd`, `unified`, `scratch` | Volume type |
29322932
| size | | Volume disk size, must be a multiple of 512 |
29332933
| base-volume | | ID of the volume on which this volume will be based |
29342934
| base-snapshot | | ID of the snapshot on which this volume will be based |
@@ -3032,7 +3032,7 @@ scw instance volume list [arg=value ...]
30323032

30333033
| Name | | Description |
30343034
|------|---|-------------|
3035-
| volume-type | One of: `l_ssd`, `b_ssd`, `unified` | Filter by volume type |
3035+
| volume-type | One of: `l_ssd`, `b_ssd`, `unified`, `scratch` | Filter by volume type |
30363036
| project-id | | Filter volume by Project ID |
30373037
| tags.{index} | | Filter volumes with these exact tags (to filter with several tags, use commas to separate them) |
30383038
| name | | Filter volume by name (for eg. "vol" will return "myvolume" but not "data") |

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230821160755-82a4aa87ba70
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230829075301-d16b548612e4
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.7.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
491491
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
492492
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
493493
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
494-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230821160755-82a4aa87ba70 h1:k8EwAXHaONvKu7l55pnC4EoY/XpNyM0/5J/+Bruw2PU=
495-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230821160755-82a4aa87ba70/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
494+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230829075301-d16b548612e4 h1:yaIT6F5d7vs4MRg+aCaWIO9FAN2kYRy61y0Did8RuSU=
495+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20.0.20230829075301-d16b548612e4/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
496496
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
497497
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
498498
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/instance/v1/instance_cli.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ func instanceServerUpdate() *core.Command {
619619
Required: false,
620620
Deprecated: false,
621621
Positional: false,
622-
EnumValues: []string{"l_ssd", "b_ssd", "unified"},
622+
EnumValues: []string{"l_ssd", "b_ssd", "unified", "scratch"},
623623
},
624624
{
625625
Name: "volumes.{key}.base-snapshot",
@@ -1219,7 +1219,7 @@ func instanceImageCreate() *core.Command {
12191219
Required: false,
12201220
Deprecated: false,
12211221
Positional: false,
1222-
EnumValues: []string{"l_ssd", "b_ssd", "unified"},
1222+
EnumValues: []string{"l_ssd", "b_ssd", "unified", "scratch"},
12231223
},
12241224
{
12251225
Name: "extra-volumes.{key}.project",
@@ -1628,7 +1628,7 @@ func instanceVolumeList() *core.Command {
16281628
Required: false,
16291629
Deprecated: false,
16301630
Positional: false,
1631-
EnumValues: []string{"l_ssd", "b_ssd", "unified"},
1631+
EnumValues: []string{"l_ssd", "b_ssd", "unified", "scratch"},
16321632
},
16331633
{
16341634
Name: "project",
@@ -1772,7 +1772,7 @@ func instanceVolumeCreate() *core.Command {
17721772
Required: false,
17731773
Deprecated: false,
17741774
Positional: false,
1775-
EnumValues: []string{"l_ssd", "b_ssd", "unified"},
1775+
EnumValues: []string{"l_ssd", "b_ssd", "unified", "scratch"},
17761776
},
17771777
{
17781778
Name: "size",

0 commit comments

Comments
 (0)