Skip to content

Commit

Permalink
fix(rdb): add name and version optional fields on ListDatabaseEngineR…
Browse files Browse the repository at this point in the history
…equest (#2555)

Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone authored Oct 21, 2022
1 parent 4b30964 commit 29bc255
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/scw/testdata/test-all-usage-rdb-engine-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ USAGE:
scw rdb engine list [arg=value ...]

ARGS:
[name] Name of the Database Engine
[version] Version of the Database Engine
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/rdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ scw rdb engine list [arg=value ...]

| Name | | Description |
|------|---|-------------|
| name | | Name of the Database Engine |
| version | | Version of the Database Engine |
| 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 |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018115351-2508d848e512
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018125033-9a8efc64603d
github.com/spf13/cobra v1.6.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018115351-2508d848e512 h1:nfobEVAnoUj78XfqBoWTxvbA4QroRrjZPZcO+I1s9F4=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018115351-2508d848e512/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018125033-9a8efc64603d h1:qzG2GUFDAjQbjY3/SQNG1gPfbUPmZBWAMAC0IQfpNjU=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221018125033-9a8efc64603d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
Expand Down
14 changes: 14 additions & 0 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ func rdbEngineList() *core.Command {
// Deprecated: false,
ArgsType: reflect.TypeOf(rdb.ListDatabaseEnginesRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "name",
Short: `Name of the Database Engine`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "version",
Short: `Version of the Database Engine`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down

0 comments on commit 29bc255

Please sign in to comment.