diff --git a/cmd/scw/testdata/test-all-usage-redis-cluster-list-usage.golden b/cmd/scw/testdata/test-all-usage-redis-cluster-list-usage.golden index 1342f301c8..8c75e227fe 100644 --- a/cmd/scw/testdata/test-all-usage-redis-cluster-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-redis-cluster-list-usage.golden @@ -6,11 +6,12 @@ USAGE: scw redis cluster list [arg=value ...] ARGS: - [tags.{index}] Tags of the clusters to filter upon - [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 - [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 | pl-waw-1) + [tags.{index}] Tags of the clusters to filter upon + [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 + [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 | pl-waw-1) FLAGS: -h, --help help for list diff --git a/docs/commands/redis.md b/docs/commands/redis.md index c5ae887491..80f4eb19ee 100644 --- a/docs/commands/redis.md +++ b/docs/commands/redis.md @@ -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 | +| organization-id | | Organization ID to list the cluster of | | zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `pl-waw-1` | Zone to target. If none is passed will use default zone from the config | diff --git a/go.mod b/go.mod index a9f707c6fa..4196760321 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98 github.com/mattn/go-colorable v0.1.12 github.com/mattn/go-isatty v0.0.14 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220624140600-38685b7aadbb + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220630163426-8dc9d2b95d0b github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.0 diff --git a/go.sum b/go.sum index 81646cacf2..95faa514c5 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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.20220624140600-38685b7aadbb h1:47x0la4woy6fwiU5xcahypU6NCcfnprcrW39rWJCuDI= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220624140600-38685b7aadbb/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220630163426-8dc9d2b95d0b h1:z0q2TsHNDT/2TKjlUpGsvZ3JVqclONKeHKho432UVy8= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220630163426-8dc9d2b95d0b/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.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= diff --git a/internal/namespaces/redis/v1alpha1/redis_cli.go b/internal/namespaces/redis/v1alpha1/redis_cli.go index c3b001fe59..d901f9e867 100644 --- a/internal/namespaces/redis/v1alpha1/redis_cli.go +++ b/internal/namespaces/redis/v1alpha1/redis_cli.go @@ -367,6 +367,13 @@ func redisClusterList() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "organization-id", + Short: `Organization ID to list the cluster of`, + Required: false, + Deprecated: false, + Positional: false, + }, core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZonePlWaw1), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {