Skip to content

Commit 57ebe50

Browse files
authored
Merge branch 'scaleway:master' into master
2 parents f80a9a1 + 6953eac commit 57ebe50

File tree

8 files changed

+44
-44
lines changed

8 files changed

+44
-44
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ USAGE:
88

99
ARGS:
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[name] Data source name
12-
[type] Data source type (unknown_type | metrics | logs | traces)
11+
name Data source name
12+
type Data source type (unknown_type | metrics | logs | traces)
1313
[retention-days] Duration for which the data will be retained in the data source
1414
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1515

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ USAGE:
66
scw cockpit data-source list [arg=value ...]
77

88
ARGS:
9-
[order-by] Sort order for data sources in the response (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc)
109
[project-id] Project ID to use. If none is passed the default project ID will be used
1110
[origin] Origin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returned (unknown_origin | scaleway | external | custom)
1211
[types.{index}] Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returned (unknown_type | metrics | logs | traces)
12+
[order-by] Sort order for data sources in the response (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc)
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1414

1515
FLAGS:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88

99
ARGS:
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[name] Name of the token
11+
name Name of the token
1212
[token-scopes.{index}] Token permission scopes (unknown_scope | read_only_metrics | write_only_metrics | full_access_metrics_rules | read_only_logs | write_only_logs | full_access_logs_rules | full_access_alert_manager | read_only_traces | write_only_traces)
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1414

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ USAGE:
77
scw cockpit token list [arg=value ...]
88

99
ARGS:
10-
[order-by] Order in which to return results (created_at_asc | created_at_desc | name_asc | name_desc)
1110
[project-id] Project ID to use. If none is passed the default project ID will be used
1211
[token-scopes.{index}] Token scopes to filter for (unknown_scope | read_only_metrics | write_only_metrics | full_access_metrics_rules | read_only_logs | write_only_logs | full_access_logs_rules | full_access_alert_manager | read_only_traces | write_only_traces)
12+
[order-by] Order in which to return results (created_at_asc | created_at_desc | name_asc | name_desc)
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1414

1515
FLAGS:

docs/commands/cockpit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ scw cockpit data-source create [arg=value ...]
201201
| Name | | Description |
202202
|------|---|-------------|
203203
| project-id | | Project ID to use. If none is passed the default project ID will be used |
204-
| name | | Data source name |
205-
| type | One of: `unknown_type`, `metrics`, `logs`, `traces` | Data source type |
204+
| name | Required | Data source name |
205+
| type | Required<br />One of: `unknown_type`, `metrics`, `logs`, `traces` | Data source type |
206206
| retention-days | | Duration for which the data will be retained in the data source |
207207
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
208208

@@ -263,10 +263,10 @@ scw cockpit data-source list [arg=value ...]
263263

264264
| Name | | Description |
265265
|------|---|-------------|
266-
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `type_asc`, `type_desc` | Sort order for data sources in the response |
267266
| project-id | | Project ID to use. If none is passed the default project ID will be used |
268267
| origin | One of: `unknown_origin`, `scaleway`, `external`, `custom` | Origin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returned |
269268
| types.{index} | One of: `unknown_type`, `metrics`, `logs`, `traces` | Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returned |
269+
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `type_asc`, `type_desc` | Sort order for data sources in the response |
270270
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
271271

272272

@@ -601,7 +601,7 @@ scw cockpit token create [arg=value ...]
601601
| Name | | Description |
602602
|------|---|-------------|
603603
| project-id | | Project ID to use. If none is passed the default project ID will be used |
604-
| name | | Name of the token |
604+
| name | Required | Name of the token |
605605
| token-scopes.{index} | One of: `unknown_scope`, `read_only_metrics`, `write_only_metrics`, `full_access_metrics_rules`, `read_only_logs`, `write_only_logs`, `full_access_logs_rules`, `full_access_alert_manager`, `read_only_traces`, `write_only_traces` | Token permission scopes |
606606
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
607607

@@ -663,9 +663,9 @@ scw cockpit token list [arg=value ...]
663663

664664
| Name | | Description |
665665
|------|---|-------------|
666-
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Order in which to return results |
667666
| project-id | | Project ID to use. If none is passed the default project ID will be used |
668667
| token-scopes.{index} | One of: `unknown_scope`, `read_only_metrics`, `write_only_metrics`, `full_access_metrics_rules`, `read_only_logs`, `write_only_logs`, `full_access_logs_rules`, `full_access_alert_manager`, `read_only_traces`, `write_only_traces` | Token scopes to filter for |
668+
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Order in which to return results |
669669
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
670670

671671

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.26.3
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20251231090604-170adc175025
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260107085608-8e8f76c5afac
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.2
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
468468
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
469469
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
470470
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
471-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20251231090604-170adc175025 h1:PGrR+ZrTify2ZSWffLal3oyfL19PViJsn/wQAPsyT1A=
472-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20251231090604-170adc175025/go.mod h1:LEsDu4BubxK7/cWhtlQWfuxwL4rf/2UEpxXz1o1EMtM=
471+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260107085608-8e8f76c5afac h1:6k+C/FKpLBvJgjFZXqxQsOaUAwnFM9VDUIaQgtHxL84=
472+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260107085608-8e8f76c5afac/go.mod h1:LEsDu4BubxK7/cWhtlQWfuxwL4rf/2UEpxXz1o1EMtM=
473473
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
474474
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
475475
github.com/secure-systems-lab/go-securesystemslib v0.9.1 h1:nZZaNz4DiERIQguNy0cL5qTdn9lR8XKHf4RUyG1Sx3g=

internal/namespaces/cockpit/v1/cockpit_cli.go

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -556,14 +556,14 @@ The name of the data source will then be used as reference to name the associate
556556
{
557557
Name: "name",
558558
Short: `Data source name`,
559-
Required: false,
559+
Required: true,
560560
Deprecated: false,
561561
Positional: false,
562562
},
563563
{
564564
Name: "type",
565565
Short: `Data source type`,
566-
Required: false,
566+
Required: true,
567567
Deprecated: false,
568568
Positional: false,
569569
EnumValues: []string{
@@ -682,21 +682,6 @@ func cockpitDataSourceList() *core.Command {
682682
// Deprecated: false,
683683
ArgsType: reflect.TypeOf(cockpit.RegionalAPIListDataSourcesRequest{}),
684684
ArgSpecs: core.ArgSpecs{
685-
{
686-
Name: "order-by",
687-
Short: `Sort order for data sources in the response`,
688-
Required: false,
689-
Deprecated: false,
690-
Positional: false,
691-
EnumValues: []string{
692-
"created_at_asc",
693-
"created_at_desc",
694-
"name_asc",
695-
"name_desc",
696-
"type_asc",
697-
"type_desc",
698-
},
699-
},
700685
core.ProjectIDArgSpec(),
701686
{
702687
Name: "origin",
@@ -724,6 +709,21 @@ func cockpitDataSourceList() *core.Command {
724709
"traces",
725710
},
726711
},
712+
{
713+
Name: "order-by",
714+
Short: `Sort order for data sources in the response`,
715+
Required: false,
716+
Deprecated: false,
717+
Positional: false,
718+
EnumValues: []string{
719+
"created_at_asc",
720+
"created_at_desc",
721+
"name_asc",
722+
"name_desc",
723+
"type_asc",
724+
"type_desc",
725+
},
726+
},
727727
core.RegionArgSpec(
728728
scw.RegionFrPar,
729729
scw.RegionNlAms,
@@ -848,7 +848,7 @@ Upon creation, your token's secret key display only once. Make sure that you sav
848848
{
849849
Name: "name",
850850
Short: `Name of the token`,
851-
Required: false,
851+
Required: true,
852852
Deprecated: false,
853853
Positional: false,
854854
},
@@ -899,19 +899,6 @@ You can filter tokens by Project ID and token scopes.`,
899899
// Deprecated: false,
900900
ArgsType: reflect.TypeOf(cockpit.RegionalAPIListTokensRequest{}),
901901
ArgSpecs: core.ArgSpecs{
902-
{
903-
Name: "order-by",
904-
Short: `Order in which to return results`,
905-
Required: false,
906-
Deprecated: false,
907-
Positional: false,
908-
EnumValues: []string{
909-
"created_at_asc",
910-
"created_at_desc",
911-
"name_asc",
912-
"name_desc",
913-
},
914-
},
915902
core.ProjectIDArgSpec(),
916903
{
917904
Name: "token-scopes.{index}",
@@ -932,6 +919,19 @@ You can filter tokens by Project ID and token scopes.`,
932919
"write_only_traces",
933920
},
934921
},
922+
{
923+
Name: "order-by",
924+
Short: `Order in which to return results`,
925+
Required: false,
926+
Deprecated: false,
927+
Positional: false,
928+
EnumValues: []string{
929+
"created_at_asc",
930+
"created_at_desc",
931+
"name_asc",
932+
"name_desc",
933+
},
934+
},
935935
core.RegionArgSpec(
936936
scw.RegionFrPar,
937937
scw.RegionNlAms,

0 commit comments

Comments
 (0)