Skip to content

Commit

Permalink
fix: optional maps arg name (#2518)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
  • Loading branch information
scaleway-bot and Codelax authored Sep 20, 2022
1 parent 1b65155 commit 6aff878
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE:
ARGS:
[namespace-id]
[name=<generated>]
[environment-variables.value.{key}]
[environment-variables.{key}]
[min-scale]
[max-scale]
[memory-limit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
container-id
[environment-variables.value.{key}]
[environment-variables.{key}]
[min-scale]
[max-scale]
[memory-limit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
[name=<generated>]
[environment-variables.value.{key}]
[environment-variables.{key}]
[project-id] Project ID to use. If none is passed the default project ID will be used
[description]
[secret-environment-variables.{index}.key]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
namespace-id
[environment-variables.value.{key}]
[environment-variables.{key}]
[description]
[secret-environment-variables.{index}.key]
[secret-environment-variables.{index}.value]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE:
ARGS:
[name=<generated>]
[namespace-id]
[environment-variables.value.{key}]
[environment-variables.{key}]
[min-scale]
[max-scale]
[runtime] (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
function-id
[environment-variables.value.{key}]
[environment-variables.{key}]
[min-scale]
[max-scale]
[runtime] (unknown_runtime | golang | python | python3 | node8 | node10 | node14 | node16 | node17 | python37 | python38 | python39 | python310 | go113 | go117 | go118 | node18)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
[name=<generated>]
[environment-variables.value.{key}]
[environment-variables.{key}]
[project-id] Project ID to use. If none is passed the default project ID will be used
[description]
[secret-environment-variables.{index}.key]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
namespace-id
[environment-variables.value.{key}]
[environment-variables.{key}]
[description]
[secret-environment-variables.{index}.key]
[secret-environment-variables.{index}.value]
Expand Down
36 changes: 18 additions & 18 deletions cmd/scw/testdata/test-all-usage-iot-route-update-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ USAGE:
scw iot route update [arg=value ...]

ARGS:
route-id Route id
[name] Route name
[topic] Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters
[s3-config.bucket-region]
[s3-config.bucket-name]
[s3-config.object-prefix]
[s3-config.strategy] (unknown | per_topic | per_message)
[db-config.host]
[db-config.port]
[db-config.dbname]
[db-config.username]
[db-config.password]
[db-config.query]
[db-config.engine] (unknown | postgresql | mysql)
[rest-config.verb] (unknown | get | post | put | patch | delete)
[rest-config.uri]
[rest-config.headers.value.{key}]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
route-id Route id
[name] Route name
[topic] Topic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters
[s3-config.bucket-region]
[s3-config.bucket-name]
[s3-config.object-prefix]
[s3-config.strategy] (unknown | per_topic | per_message)
[db-config.host]
[db-config.port]
[db-config.dbname]
[db-config.username]
[db-config.password]
[db-config.query]
[db-config.engine] (unknown | postgresql | mysql)
[rest-config.verb] (unknown | get | post | put | patch | delete)
[rest-config.uri]
[rest-config.headers.{key}]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARGS:
[max-size] The new maximum size for the pool
[autohealing] The new value for the enablement of autohealing for the pool
[tags.{index}] The new tags associated with the pool
[kubelet-args.value.{key}]
[kubelet-args.{key}] The new Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental
[upgrade-policy.max-unavailable]
[upgrade-policy.max-surge]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
Expand Down
8 changes: 4 additions & 4 deletions docs/commands/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ scw container container create [arg=value ...]
|------|---|-------------|
| namespace-id | | |
| name | Default: `<generated>` | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| min-scale | | |
| max-scale | | |
| memory-limit | | |
Expand Down Expand Up @@ -172,7 +172,7 @@ scw container container update <container-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| container-id | Required | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| min-scale | | |
| max-scale | | |
| memory-limit | | |
Expand Down Expand Up @@ -366,7 +366,7 @@ scw container namespace create [arg=value ...]
| Name | | Description |
|------|---|-------------|
| name | Default: `<generated>` | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| description | | |
| secret-environment-variables.{index}.key | | |
Expand Down Expand Up @@ -454,7 +454,7 @@ scw container namespace update <namespace-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| namespace-id | Required | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| description | | |
| secret-environment-variables.{index}.key | | |
| secret-environment-variables.{index}.value | | |
Expand Down
8 changes: 4 additions & 4 deletions docs/commands/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ scw function function create [arg=value ...]
|------|---|-------------|
| name | Default: `<generated>` | |
| namespace-id | | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| min-scale | | |
| max-scale | | |
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18` | |
Expand Down Expand Up @@ -370,7 +370,7 @@ scw function function update <function-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| function-id | Required | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| min-scale | | |
| max-scale | | |
| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14`, `node16`, `node17`, `python37`, `python38`, `python39`, `python310`, `go113`, `go117`, `go118`, `node18` | |
Expand Down Expand Up @@ -435,7 +435,7 @@ scw function namespace create [arg=value ...]
| Name | | Description |
|------|---|-------------|
| name | Default: `<generated>` | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| description | | |
| secret-environment-variables.{index}.key | | |
Expand Down Expand Up @@ -523,7 +523,7 @@ scw function namespace update <namespace-id ...> [arg=value ...]
| Name | | Description |
|------|---|-------------|
| namespace-id | Required | |
| environment-variables.value.{key} | | |
| environment-variables.{key} | | |
| description | | |
| secret-environment-variables.{index}.key | | |
| secret-environment-variables.{index}.value | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/iot.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ scw iot route update [arg=value ...]
| db-config.engine | One of: `unknown`, `postgresql`, `mysql` | |
| rest-config.verb | One of: `unknown`, `get`, `post`, `put`, `patch`, `delete` | |
| rest-config.uri | | |
| rest-config.headers.value.{key} | | |
| rest-config.headers.{key} | | |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion docs/commands/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ scw k8s pool update <pool-id ...> [arg=value ...]
| max-size | | The new maximum size for the pool |
| autohealing | | The new value for the enablement of autohealing for the pool |
| tags.{index} | | The new tags associated with the pool |
| kubelet-args.value.{key} | | |
| kubelet-args.{key} | | The new Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental |
| upgrade-policy.max-unavailable | | |
| upgrade-policy.max-surge | | |
| 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
8 changes: 4 additions & 4 deletions internal/namespaces/container/v1beta1/container_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func containerNamespaceCreate() *core.Command {
Default: core.RandomValueGenerator("cns"),
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -255,7 +255,7 @@ func containerNamespaceUpdate() *core.Command {
Positional: true,
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -431,7 +431,7 @@ func containerContainerCreate() *core.Command {
Default: core.RandomValueGenerator("ctnr"),
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -553,7 +553,7 @@ func containerContainerUpdate() *core.Command {
Positional: true,
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down
8 changes: 4 additions & 4 deletions internal/namespaces/function/v1beta1/function_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func functionNamespaceCreate() *core.Command {
Default: core.RandomValueGenerator("ns"),
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -314,7 +314,7 @@ func functionNamespaceUpdate() *core.Command {
Positional: true,
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -490,7 +490,7 @@ func functionFunctionCreate() *core.Command {
Positional: false,
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down Expand Up @@ -600,7 +600,7 @@ func functionFunctionUpdate() *core.Command {
Positional: true,
},
{
Name: "environment-variables.value.{key}",
Name: "environment-variables.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/iot/v1/iot_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ func iotRouteUpdate() *core.Command {
Positional: false,
},
{
Name: "rest-config.headers.value.{key}",
Name: "rest-config.headers.{key}",
Required: false,
Deprecated: false,
Positional: false,
Expand Down
3 changes: 2 additions & 1 deletion internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,8 @@ func k8sPoolUpdate() *core.Command {
Positional: false,
},
{
Name: "kubelet-args.value.{key}",
Name: "kubelet-args.{key}",
Short: `The new Kubelet arguments to be used by this pool. Note that this feature is to be considered as experimental`,
Required: false,
Deprecated: false,
Positional: false,
Expand Down

0 comments on commit 6aff878

Please sign in to comment.