Skip to content

Commit 2f937c8

Browse files
scaleway-botjremy42Mia-Cross
authored
feat: make volume_id positional in the CLI (#4753)
Co-authored-by: devtools-ci-cd <[email protected]> Co-authored-by: Leïla Marabese <[email protected]>
1 parent 6fa305f commit 2f937c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ To create a snapshot, the volume must be in the `in_use` or the `available` stat
44
If your volume is in a transient state, you need to wait until the end of the current operation.
55

66
USAGE:
7-
scw block snapshot create [arg=value ...]
7+
scw block snapshot create <volume-id ...> [arg=value ...]
88

99
ARGS:
10-
[volume-id] UUID of the volume to snapshot
10+
volume-id UUID of the volume to snapshot
1111
[name=<generated>] Name of the snapshot
1212
[project-id] Project ID to use. If none is passed the default project ID will be used
1313
[tags.{index}] List of tags assigned to the snapshot

docs/commands/block.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ If your volume is in a transient state, you need to wait until the end of the cu
3535
**Usage:**
3636

3737
```
38-
scw block snapshot create [arg=value ...]
38+
scw block snapshot create <volume-id ...> [arg=value ...]
3939
```
4040

4141

4242
**Args:**
4343

4444
| Name | | Description |
4545
|------|---|-------------|
46-
| volume-id | | UUID of the volume to snapshot |
46+
| volume-id | Required | UUID of the volume to snapshot |
4747
| name | Default: `<generated>` | Name of the snapshot |
4848
| project-id | | Project ID to use. If none is passed the default project ID will be used |
4949
| tags.{index} | | List of tags assigned to the snapshot |

internal/namespaces/block/v1alpha1/block_cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,9 @@ If your volume is in a transient state, you need to wait until the end of the cu
587587
{
588588
Name: "volume-id",
589589
Short: `UUID of the volume to snapshot`,
590-
Required: false,
590+
Required: true,
591591
Deprecated: false,
592-
Positional: false,
592+
Positional: true,
593593
},
594594
{
595595
Name: "name",

0 commit comments

Comments
 (0)