Skip to content

Commit

Permalink
feat(redis): migrate to v1 (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Oct 4, 2022
1 parent 3bb5975 commit 028d70d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 1,133 deletions.
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-redis-acl-add-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
cluster-id UUID of the cluster you want to add acl rules to
[acl-rules.{index}.ip] IPv4 network address of the rule
[acl-rules.{index}.ip-cidr] IPv4 network address of the rule
[acl-rules.{index}.description] Description of the rule
[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)

Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-redis-acl-set-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
cluster-id UUID of the cluster where the ACL rules has to be set
[acl-rules.{index}.ip] IPv4 network address of the rule
[acl-rules.{index}.ip-cidr] IPv4 network address of the rule
[acl-rules.{index}.description] Description of the rule
[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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ARGS:
user-name Name of the user created when the cluster is created
password Password of the user
[cluster-size] Number of nodes for the cluster
[acl-rules.{index}.ip] IPv4 network address of the rule
[acl-rules.{index}.ip-cidr] IPv4 network address of the rule
[acl-rules.{index}.description] Description of the rule
[endpoints.{index}.private-network.id] UUID of the private network to be connected to the cluster
[endpoints.{index}.private-network.service-ips.{index}] Endpoint IPv4 adress with a CIDR notation. You must provide at least one IPv4 per node. Check documentation about IP and subnet limitation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ USAGE:

ARGS:
cluster-id UUID of the cluster
[start-date] Start date to gather metrics from
[end-date] End date to gather metrics from
[start-at] Start date to gather metrics from
[end-at] End date to gather metrics from
[metric-name] Name of the metric to gather
[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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
cluster-id UUID of the cluster where the settings has to be set
[settings-name] Setting name to delete
setting-name Setting name to delete
[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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARGS:
[include-disabled] Whether or not to include disabled Redis™ engine versions
[include-beta] Whether or not to include beta Redis™ engine versions
[include-deprecated] Whether or not to include deprecated Redis™ engine versions
[version-name] List Redis™ engine versions that match a given name pattern
[version] List Redis™ engine versions that match a given name pattern
[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:
Expand Down
14 changes: 7 additions & 7 deletions docs/commands/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ scw redis acl add [arg=value ...]
| Name | | Description |
|------|---|-------------|
| cluster-id | Required | UUID of the cluster you want to add acl rules to |
| acl-rules.{index}.ip | | IPv4 network address of the rule |
| acl-rules.{index}.ip-cidr | | IPv4 network address of the rule |
| acl-rules.{index}.description | | Description of the rule |
| zone | Default: `fr-par-1`<br />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 |

Expand Down Expand Up @@ -116,7 +116,7 @@ scw redis acl set [arg=value ...]
| Name | | Description |
|------|---|-------------|
| cluster-id | Required | UUID of the cluster where the ACL rules has to be set |
| acl-rules.{index}.ip | | IPv4 network address of the rule |
| acl-rules.{index}.ip-cidr | | IPv4 network address of the rule |
| acl-rules.{index}.description | | Description of the rule |
| zone | Default: `fr-par-1`<br />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 |

Expand Down Expand Up @@ -151,7 +151,7 @@ scw redis cluster create [arg=value ...]
| user-name | Required | Name of the user created when the cluster is created |
| password | Required | Password of the user |
| cluster-size | | Number of nodes for the cluster |
| acl-rules.{index}.ip | | IPv4 network address of the rule |
| acl-rules.{index}.ip-cidr | | IPv4 network address of the rule |
| acl-rules.{index}.description | | Description of the rule |
| endpoints.{index}.private-network.id | | UUID of the private network to be connected to the cluster |
| endpoints.{index}.private-network.service-ips.{index} | | Endpoint IPv4 adress with a CIDR notation. You must provide at least one IPv4 per node. Check documentation about IP and subnet limitation. |
Expand Down Expand Up @@ -262,8 +262,8 @@ scw redis cluster metrics <cluster-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| cluster-id | Required | UUID of the cluster |
| start-date | | Start date to gather metrics from |
| end-date | | End date to gather metrics from |
| start-at | | Start date to gather metrics from |
| end-at | | End date to gather metrics from |
| metric-name | | Name of the metric to gather |
| zone | Default: `fr-par-1`<br />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 |

Expand Down Expand Up @@ -496,7 +496,7 @@ scw redis setting delete [arg=value ...]
| Name | | Description |
|------|---|-------------|
| cluster-id | Required | UUID of the cluster where the settings has to be set |
| settings-name | | Setting name to delete |
| setting-name | Required | Setting name to delete |
| zone | Default: `fr-par-1`<br />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 |


Expand Down Expand Up @@ -546,7 +546,7 @@ scw redis version list [arg=value ...]
| include-disabled | | Whether or not to include disabled Redis™ engine versions |
| include-beta | | Whether or not to include beta Redis™ engine versions |
| include-deprecated | | Whether or not to include deprecated Redis™ engine versions |
| version-name | | List Redis™ engine versions that match a given name pattern |
| version | | List Redis™ engine versions that match a given name pattern |
| zone | Default: `fr-par-1`<br />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 |


Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/get_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1"
redis "github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/shell"
versionNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/version"
Expand Down
File renamed without changes.
Loading

0 comments on commit 028d70d

Please sign in to comment.