From 11c1c81d41c4c5949a12a946c0c5476cf56dd5bd Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Mon, 9 Sep 2024 14:29:25 +0200 Subject: [PATCH] feat(cockpit): add support for alerts (#4106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Léone --- .../test-all-usage-cockpit-data-source-create-usage.golden | 2 +- .../test-all-usage-cockpit-data-source-list-usage.golden | 2 +- docs/commands/cockpit.md | 4 ++-- internal/namespaces/cockpit/v1/cockpit_cli.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-cockpit-data-source-create-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-data-source-create-usage.golden index 8db807090..7e3b496cf 100644 --- a/cmd/scw/testdata/test-all-usage-cockpit-data-source-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-cockpit-data-source-create-usage.golden @@ -12,7 +12,7 @@ USAGE: ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used [name] Data source name - [type] Data source type (unknown_type | metrics | logs | traces) + [type] Data source type (unknown_type | metrics | logs | traces | alerts) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-cockpit-data-source-list-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-data-source-list-usage.golden index 702bf5fa8..9eaba9f54 100644 --- a/cmd/scw/testdata/test-all-usage-cockpit-data-source-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-cockpit-data-source-list-usage.golden @@ -10,7 +10,7 @@ ARGS: [order-by] Sort order for data sources in the response (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc) [project-id] Project ID to use. If none is passed the default project ID will be used [origin] Origin to filter for, only data sources with matching origin will be returned (unknown_origin | scaleway | external) - [types.{index}] Types to filter for, only data sources with matching types will be returned (unknown_type | metrics | logs | traces) + [types.{index}] Types to filter for, only data sources with matching types will be returned (unknown_type | metrics | logs | traces | alerts) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) FLAGS: diff --git a/docs/commands/cockpit.md b/docs/commands/cockpit.md index e9a9606ae..6d6f5418d 100644 --- a/docs/commands/cockpit.md +++ b/docs/commands/cockpit.md @@ -206,7 +206,7 @@ scw cockpit data-source create [arg=value ...] |------|---|-------------| | project-id | | Project ID to use. If none is passed the default project ID will be used | | name | | Data source name | -| type | One of: `unknown_type`, `metrics`, `logs`, `traces` | Data source type | +| type | One of: `unknown_type`, `metrics`, `logs`, `traces`, `alerts` | Data source type | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | @@ -270,7 +270,7 @@ scw cockpit data-source list [arg=value ...] | 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 | | project-id | | Project ID to use. If none is passed the default project ID will be used | | origin | One of: `unknown_origin`, `scaleway`, `external` | Origin to filter for, only data sources with matching origin will be returned | -| types.{index} | One of: `unknown_type`, `metrics`, `logs`, `traces` | Types to filter for, only data sources with matching types will be returned | +| types.{index} | One of: `unknown_type`, `metrics`, `logs`, `traces`, `alerts` | Types to filter for, only data sources with matching types will be returned | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/cockpit/v1/cockpit_cli.go b/internal/namespaces/cockpit/v1/cockpit_cli.go index ef4587c5d..e5ce333a0 100644 --- a/internal/namespaces/cockpit/v1/cockpit_cli.go +++ b/internal/namespaces/cockpit/v1/cockpit_cli.go @@ -546,7 +546,7 @@ The name of the data source will then be used as reference to name the associate Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"unknown_type", "metrics", "logs", "traces"}, + EnumValues: []string{"unknown_type", "metrics", "logs", "traces", "alerts"}, }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, @@ -661,7 +661,7 @@ You can list data sources by Project, type and origin.`, Required: false, Deprecated: false, Positional: false, - EnumValues: []string{"unknown_type", "metrics", "logs", "traces"}, + EnumValues: []string{"unknown_type", "metrics", "logs", "traces", "alerts"}, }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw, scw.Region(core.AllLocalities)), },