Skip to content

Commit 07afb2c

Browse files
authored
chore(rdb): remove get-metric command (#1239)
1 parent 8f1adcc commit 07afb2c

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ AVAILABLE COMMANDS:
1212
delete Delete an instance
1313
get Get an instance
1414
get-certificate Get the TLS certificate of an instance
15-
get-metrics Get instance metrics
1615
list List instances
1716
update Update an instance
1817
upgrade Upgrade an instance to an higher instance type

internal/namespaces/rdb/v1/rdb_cli.go

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ func GetGeneratedCommands() *core.Commands {
4949
rdbLogPrepare(),
5050
rdbLogList(),
5151
rdbLogGet(),
52-
rdbInstanceGetMetrics(),
5352
rdbSettingsAdd(),
5453
rdbSettingsDelete(),
5554
rdbACLList(),
@@ -940,52 +939,6 @@ func rdbLogGet() *core.Command {
940939
}
941940
}
942941

943-
func rdbInstanceGetMetrics() *core.Command {
944-
return &core.Command{
945-
Short: `Get instance metrics`,
946-
Long: `Get database instance metrics.`,
947-
Namespace: "rdb",
948-
Resource: "instance",
949-
Verb: "get-metrics",
950-
ArgsType: reflect.TypeOf(rdb.GetInstanceMetricsRequest{}),
951-
ArgSpecs: core.ArgSpecs{
952-
{
953-
Name: "instance-id",
954-
Short: `UUID of the instance`,
955-
Required: true,
956-
Positional: true,
957-
},
958-
{
959-
Name: "start-date",
960-
Short: `Start date to gather metrics from`,
961-
Required: false,
962-
Positional: false,
963-
},
964-
{
965-
Name: "end-date",
966-
Short: `End date to gather metrics from`,
967-
Required: false,
968-
Positional: false,
969-
},
970-
{
971-
Name: "metric-name",
972-
Short: `Name of the metric to gather`,
973-
Required: false,
974-
Positional: false,
975-
},
976-
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
977-
},
978-
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
979-
request := args.(*rdb.GetInstanceMetricsRequest)
980-
981-
client := core.ExtractClient(ctx)
982-
api := rdb.NewAPI(client)
983-
return api.GetInstanceMetrics(request)
984-
985-
},
986-
}
987-
}
988-
989942
func rdbSettingsAdd() *core.Command {
990943
return &core.Command{
991944
Short: `Add an instance setting`,

0 commit comments

Comments
 (0)