Skip to content

Commit 8d59a4e

Browse files
scaleway-botLaure-di
authored andcommitted
feat(rdb): add has_maintenances filter to ListInstances endpoint and... (scaleway#4850)
1 parent 018dc90 commit 8d59a4e

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ USAGE:
66
scw rdb instance list [arg=value ...]
77

88
ARGS:
9-
[tags.{index}] List Database Instances that have a given tag
10-
[name] Lists Database Instances that match a name pattern
11-
[order-by] Criteria to use when ordering Database Instance listings (created_at_asc | created_at_desc | name_asc | name_desc | region | status_asc | status_desc)
12-
[project-id] Project ID to list the Database Instance of
13-
[organization-id] Please use project_id instead
14-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
9+
[tags.{index}] List Database Instances that have a given tag
10+
[name] Lists Database Instances that match a name pattern
11+
[order-by] Criteria to use when ordering Database Instance listings (created_at_asc | created_at_desc | name_asc | name_desc | region | status_asc | status_desc)
12+
[project-id] Project ID to list the Database Instance of
13+
[has-maintenances] Filter to only list instances with a scheduled maintenance
14+
[organization-id] Please use project_id instead
15+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1516

1617
FLAGS:
1718
-h, --help help for list

docs/commands/rdb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,7 @@ scw rdb instance list [arg=value ...]
875875
| name | | Lists Database Instances that match a name pattern |
876876
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `region`, `status_asc`, `status_desc` | Criteria to use when ordering Database Instance listings |
877877
| project-id | | Project ID to list the Database Instance of |
878+
| has-maintenances | | Filter to only list instances with a scheduled maintenance |
878879
| organization-id | | Please use project_id instead |
879880
| 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 |
880881

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.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250617152214-69633d417037
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250617152214-69633d417037 h1:NfJcMj32LgXi0YZ/a4FklGJ1y7fvTjXpbTKGYwZvfrg=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250617152214-69633d417037/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356 h1:9cMV1lFohW5MTZJ5YRa3bjhOjErTdnAV27GkGJUlaRk=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/rdb/v1/rdb_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,13 @@ func rdbInstanceList() *core.Command {
825825
Deprecated: false,
826826
Positional: false,
827827
},
828+
{
829+
Name: "has-maintenances",
830+
Short: `Filter to only list instances with a scheduled maintenance`,
831+
Required: false,
832+
Deprecated: false,
833+
Positional: false,
834+
},
828835
{
829836
Name: "organization-id",
830837
Short: `Please use project_id instead`,

0 commit comments

Comments
 (0)