Skip to content

Commit 2a2f478

Browse files
authored
feat(cockpit): add support for positional (#5002)
1 parent 08256c7 commit 2a2f478

9 files changed

+18
-18
lines changed

cmd/scw/testdata/test-all-usage-cockpit-data-source-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Delete a given data source. Note that this action will permanently delete this data source and any data associated with it.
44

55
USAGE:
6-
scw cockpit data-source delete [arg=value ...]
6+
scw cockpit data-source delete <data-source-id ...> [arg=value ...]
77

88
ARGS:
99
data-source-id ID of the data source to delete

cmd/scw/testdata/test-all-usage-cockpit-data-source-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Retrieve information about a given data source, specified by the data source ID. The data source's information such as its name, type, URL, origin, and retention period, is returned.
44

55
USAGE:
6-
scw cockpit data-source get [arg=value ...]
6+
scw cockpit data-source get <data-source-id ...> [arg=value ...]
77

88
ARGS:
99
data-source-id ID of the relevant data source

cmd/scw/testdata/test-all-usage-cockpit-data-source-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Update a given data source attributes (name and/or retention_days).
44

55
USAGE:
6-
scw cockpit data-source update [arg=value ...]
6+
scw cockpit data-source update <data-source-id ...> [arg=value ...]
77

88
ARGS:
99
data-source-id ID of the data source to update

cmd/scw/testdata/test-all-usage-cockpit-token-delete-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone.
44

55
USAGE:
6-
scw cockpit token delete [arg=value ...]
6+
scw cockpit token delete <token-id ...> [arg=value ...]
77

88
ARGS:
99
token-id ID of the token to delete

cmd/scw/testdata/test-all-usage-cockpit-token-get-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Retrieve information about a given token, specified by the token ID. The token's information such as its scopes, is returned.
44

55
USAGE:
6-
scw cockpit token get [arg=value ...]
6+
scw cockpit token get <token-id ...> [arg=value ...]
77

88
ARGS:
99
token-id Token ID

docs/commands/cockpit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Delete a given data source. Note that this action will permanently delete this d
217217
**Usage:**
218218

219219
```
220-
scw cockpit data-source delete [arg=value ...]
220+
scw cockpit data-source delete <data-source-id ...> [arg=value ...]
221221
```
222222

223223

@@ -237,7 +237,7 @@ Retrieve information about a given data source, specified by the data source ID.
237237
**Usage:**
238238

239239
```
240-
scw cockpit data-source get [arg=value ...]
240+
scw cockpit data-source get <data-source-id ...> [arg=value ...]
241241
```
242242

243243

@@ -280,7 +280,7 @@ Update a given data source attributes (name and/or retention_days).
280280
**Usage:**
281281

282282
```
283-
scw cockpit data-source update [arg=value ...]
283+
scw cockpit data-source update <data-source-id ...> [arg=value ...]
284284
```
285285

286286

@@ -643,7 +643,7 @@ Delete a given token, specified by the token ID. Deleting a token is irreversibl
643643
**Usage:**
644644

645645
```
646-
scw cockpit token delete [arg=value ...]
646+
scw cockpit token delete <token-id ...> [arg=value ...]
647647
```
648648

649649

@@ -663,7 +663,7 @@ Retrieve information about a given token, specified by the token ID. The token's
663663
**Usage:**
664664

665665
```
666-
scw cockpit token get [arg=value ...]
666+
scw cockpit token get <token-id ...> [arg=value ...]
667667
```
668668

669669

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.24.0
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20250915122732-e1e0d6a999c6
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.1
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
460460
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
461461
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
462462
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
463-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2 h1:WeANDlfGb3oFt08xg4TVd+zmVfif6/9uVXXMjg7Jgr4=
464-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250912134829-9294f115f3d2/go.mod h1:47B1d/YXmSAxlJxUJxClzHR6b3T4M1WyCvwENPQNBWc=
463+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20250915122732-e1e0d6a999c6 h1:Jps8nJ4Sc+BbZrNzbmKtwDWTU8mn7ar9u9LdkFw5ddU=
464+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20250915122732-e1e0d6a999c6/go.mod h1:47B1d/YXmSAxlJxUJxClzHR6b3T4M1WyCvwENPQNBWc=
465465
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
466466
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
467467
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/cockpit/v1/cockpit_cli.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ func cockpitDataSourceGet() *core.Command {
610610
Short: `ID of the relevant data source`,
611611
Required: true,
612612
Deprecated: false,
613-
Positional: false,
613+
Positional: true,
614614
},
615615
core.RegionArgSpec(
616616
scw.RegionFrPar,
@@ -644,7 +644,7 @@ func cockpitDataSourceDelete() *core.Command {
644644
Short: `ID of the data source to delete`,
645645
Required: true,
646646
Deprecated: false,
647-
Positional: false,
647+
Positional: true,
648648
},
649649
core.RegionArgSpec(
650650
scw.RegionFrPar,
@@ -764,7 +764,7 @@ func cockpitDataSourceUpdate() *core.Command {
764764
Short: `ID of the data source to update`,
765765
Required: true,
766766
Deprecated: false,
767-
Positional: false,
767+
Positional: true,
768768
},
769769
{
770770
Name: "name",
@@ -972,7 +972,7 @@ func cockpitTokenGet() *core.Command {
972972
Short: `Token ID`,
973973
Required: true,
974974
Deprecated: false,
975-
Positional: false,
975+
Positional: true,
976976
},
977977
core.RegionArgSpec(
978978
scw.RegionFrPar,
@@ -1006,7 +1006,7 @@ func cockpitTokenDelete() *core.Command {
10061006
Short: `ID of the token to delete`,
10071007
Required: true,
10081008
Deprecated: false,
1009-
Positional: false,
1009+
Positional: true,
10101010
},
10111011
core.RegionArgSpec(
10121012
scw.RegionFrPar,

0 commit comments

Comments
 (0)