Skip to content

Commit 41675c1

Browse files
authored
feat(instance): add documentation on ListSnapshotsRequest (#3376)
1 parent f895c8b commit 41675c1

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ EXAMPLES:
1313
scw instance snapshot list zone=fr-par-1
1414

1515
ARGS:
16-
[name]
17-
[project-id]
18-
[tags]
19-
[base-volume-id]
20-
[organization-id]
16+
[project-id] List snapshots only for this Project ID
17+
[name] List snapshots of the requested name
18+
[tags] List snapshots that have the requested tag
19+
[base-volume-id] List snapshots originating only from this volume
20+
[organization-id] List snapshots only for this Organization ID
2121
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)
2222

2323
FLAGS:

docs/commands/instance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,11 +2601,11 @@ scw instance snapshot list [arg=value ...]
26012601

26022602
| Name | | Description |
26032603
|------|---|-------------|
2604-
| name | | |
2605-
| project-id | | |
2606-
| tags | | |
2607-
| base-volume-id | | |
2608-
| organization-id | | |
2604+
| project-id | | List snapshots only for this Project ID |
2605+
| name | | List snapshots of the requested name |
2606+
| tags | | List snapshots that have the requested tag |
2607+
| base-volume-id | | List snapshots originating only from this volume |
2608+
| organization-id | | List snapshots only for this Organization ID |
26092609
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |
26102610

26112611

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.21.0.20230919140146-a731a0058f98
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c
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.21.0.20230919140146-a731a0058f98 h1:iqhgEyhgtkgQzptcemy9csJIzdg7RS64a9Przn2ZDGk=
495-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230919140146-a731a0058f98/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
494+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c h1:ycZnnSiUFyH4YBkkpw81AHrqtDMRn+sf+1qkFSoSUUQ=
495+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20230920081818-d2f8a2eef94c/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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,31 +1334,36 @@ func instanceSnapshotList() *core.Command {
13341334
ArgsType: reflect.TypeOf(instance.ListSnapshotsRequest{}),
13351335
ArgSpecs: core.ArgSpecs{
13361336
{
1337-
Name: "name",
1337+
Name: "project",
1338+
Short: `List snapshots only for this Project ID`,
13381339
Required: false,
13391340
Deprecated: false,
13401341
Positional: false,
13411342
},
13421343
{
1343-
Name: "project",
1344+
Name: "name",
1345+
Short: `List snapshots of the requested name`,
13441346
Required: false,
13451347
Deprecated: false,
13461348
Positional: false,
13471349
},
13481350
{
13491351
Name: "tags",
1352+
Short: `List snapshots that have the requested tag`,
13501353
Required: false,
13511354
Deprecated: false,
13521355
Positional: false,
13531356
},
13541357
{
13551358
Name: "base-volume-id",
1359+
Short: `List snapshots originating only from this volume`,
13561360
Required: false,
13571361
Deprecated: false,
13581362
Positional: false,
13591363
},
13601364
{
13611365
Name: "organization",
1366+
Short: `List snapshots only for this Organization ID`,
13621367
Required: false,
13631368
Deprecated: false,
13641369
Positional: false,

0 commit comments

Comments
 (0)