Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(redis): allow filtering the list of Clusters using version attribute #2560

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARGS:
[name] Name of the clusters to filter upon
[order-by] Criteria to use when ordering cluster listing (created_at_asc | created_at_desc | name_asc | name_desc)
[project-id] Project ID to list the cluster of
[version] Version of the clusters to filter upon
[organization-id] Organization ID to list the cluster of
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1)

Expand Down
1 change: 1 addition & 0 deletions docs/commands/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ scw redis cluster list [arg=value ...]
| name | | Name of the clusters to filter upon |
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Criteria to use when ordering cluster listing |
| project-id | | Project ID to list the cluster of |
| version | | Version of the clusters to filter upon |
| organization-id | | Organization ID to list the cluster of |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1` | Zone to target. If none is passed will use default zone 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.20221021090213-af5c083146b1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221025083458-eee4b9bd7660
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
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.20221021090213-af5c083146b1 h1:iIJOeHT9KHf8gqt8iFVPuPBkIQddUket5AyFdfrv0Jg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221021090213-af5c083146b1/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221025083458-eee4b9bd7660 h1:5M5cNSXGDMtxB/hBDwMSkrllHO0iqNCP3irPrrBc7GA=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20221025083458-eee4b9bd7660/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.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
Expand Down
7 changes: 7 additions & 0 deletions internal/namespaces/redis/v1/redis_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,13 @@ func redisClusterList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "version",
Short: `Version of the clusters to filter upon`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Organization ID to list the cluster of`,
Expand Down