From 6aff8783ff9b58473ba2bd3e472abdd87fab369c Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Tue, 20 Sep 2022 10:35:59 +0200 Subject: [PATCH] fix: optional maps arg name (#2518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jules Castéran --- ...ge-container-container-create-usage.golden | 2 +- ...ge-container-container-update-usage.golden | 2 +- ...ge-container-namespace-create-usage.golden | 2 +- ...ge-container-namespace-update-usage.golden | 2 +- ...sage-function-function-create-usage.golden | 2 +- ...sage-function-function-update-usage.golden | 2 +- ...age-function-namespace-create-usage.golden | 2 +- ...age-function-namespace-update-usage.golden | 2 +- ...st-all-usage-iot-route-update-usage.golden | 36 +++++++++---------- ...est-all-usage-k8s-pool-update-usage.golden | 2 +- docs/commands/container.md | 8 ++--- docs/commands/function.md | 8 ++--- docs/commands/iot.md | 2 +- docs/commands/k8s.md | 2 +- .../container/v1beta1/container_cli.go | 8 ++--- .../function/v1beta1/function_cli.go | 8 ++--- internal/namespaces/iot/v1/iot_cli.go | 2 +- internal/namespaces/k8s/v1/k8s_cli.go | 3 +- 18 files changed, 48 insertions(+), 47 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden index 4b643429f5..47ac22b266 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden @@ -8,7 +8,7 @@ USAGE: ARGS: [namespace-id] [name=] - [environment-variables.value.{key}] + [environment-variables.{key}] [min-scale] [max-scale] [memory-limit] diff --git a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden index 234d43d0e1..28e98b1ff4 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: container-id - [environment-variables.value.{key}] + [environment-variables.{key}] [min-scale] [max-scale] [memory-limit] diff --git a/cmd/scw/testdata/test-all-usage-container-namespace-create-usage.golden b/cmd/scw/testdata/test-all-usage-container-namespace-create-usage.golden index 8c2d3f29a0..2600a9fb02 100644 --- a/cmd/scw/testdata/test-all-usage-container-namespace-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-namespace-create-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: [name=] - [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] diff --git a/cmd/scw/testdata/test-all-usage-container-namespace-update-usage.golden b/cmd/scw/testdata/test-all-usage-container-namespace-update-usage.golden index ab11d5b14e..677392c4d3 100644 --- a/cmd/scw/testdata/test-all-usage-container-namespace-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-namespace-update-usage.golden @@ -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] diff --git a/cmd/scw/testdata/test-all-usage-function-function-create-usage.golden b/cmd/scw/testdata/test-all-usage-function-function-create-usage.golden index ba125b3718..a7e7c7ef9b 100644 --- a/cmd/scw/testdata/test-all-usage-function-function-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-function-create-usage.golden @@ -8,7 +8,7 @@ USAGE: ARGS: [name=] [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) diff --git a/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden b/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden index 2364803508..a5ed63e253 100644 --- a/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-function-update-usage.golden @@ -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) diff --git a/cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden b/cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden index 8b886a9098..a9ccfd1df5 100644 --- a/cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-namespace-create-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: [name=] - [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] diff --git a/cmd/scw/testdata/test-all-usage-function-namespace-update-usage.golden b/cmd/scw/testdata/test-all-usage-function-namespace-update-usage.golden index 08c11be8b3..39fdbab3e6 100644 --- a/cmd/scw/testdata/test-all-usage-function-namespace-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-namespace-update-usage.golden @@ -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] diff --git a/cmd/scw/testdata/test-all-usage-iot-route-update-usage.golden b/cmd/scw/testdata/test-all-usage-iot-route-update-usage.golden index 2392eca408..761f9c894d 100644 --- a/cmd/scw/testdata/test-all-usage-iot-route-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-iot-route-update-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden index 600700965b..8c2c5025f1 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-pool-update-usage.golden @@ -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) diff --git a/docs/commands/container.md b/docs/commands/container.md index 83442b9074..ffba036ead 100644 --- a/docs/commands/container.md +++ b/docs/commands/container.md @@ -53,7 +53,7 @@ scw container container create [arg=value ...] |------|---|-------------| | namespace-id | | | | name | Default: `` | | -| environment-variables.value.{key} | | | +| environment-variables.{key} | | | | min-scale | | | | max-scale | | | | memory-limit | | | @@ -172,7 +172,7 @@ scw container container update [arg=value ...] | Name | | Description | |------|---|-------------| | container-id | Required | | -| environment-variables.value.{key} | | | +| environment-variables.{key} | | | | min-scale | | | | max-scale | | | | memory-limit | | | @@ -366,7 +366,7 @@ scw container namespace create [arg=value ...] | Name | | Description | |------|---|-------------| | name | Default: `` | | -| 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 | | | @@ -454,7 +454,7 @@ scw container namespace update [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 | | | diff --git a/docs/commands/function.md b/docs/commands/function.md index b19ab312a2..7b233de4c4 100644 --- a/docs/commands/function.md +++ b/docs/commands/function.md @@ -212,7 +212,7 @@ scw function function create [arg=value ...] |------|---|-------------| | name | Default: `` | | | 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` | | @@ -370,7 +370,7 @@ scw function function update [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` | | @@ -435,7 +435,7 @@ scw function namespace create [arg=value ...] | Name | | Description | |------|---|-------------| | name | Default: `` | | -| 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 | | | @@ -523,7 +523,7 @@ scw function namespace update [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 | | | diff --git a/docs/commands/iot.md b/docs/commands/iot.md index 301f94b24d..230e662633 100644 --- a/docs/commands/iot.md +++ b/docs/commands/iot.md @@ -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`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | diff --git a/docs/commands/k8s.md b/docs/commands/k8s.md index 8df2774034..f1357e3bd2 100644 --- a/docs/commands/k8s.md +++ b/docs/commands/k8s.md @@ -929,7 +929,7 @@ scw k8s pool update [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`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go index d78211c439..a394264b18 100644 --- a/internal/namespaces/container/v1beta1/container_cli.go +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/internal/namespaces/function/v1beta1/function_cli.go b/internal/namespaces/function/v1beta1/function_cli.go index fde7dbe16c..a9aed2145b 100644 --- a/internal/namespaces/function/v1beta1/function_cli.go +++ b/internal/namespaces/function/v1beta1/function_cli.go @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/internal/namespaces/iot/v1/iot_cli.go b/internal/namespaces/iot/v1/iot_cli.go index b3826ea572..d122af4696 100644 --- a/internal/namespaces/iot/v1/iot_cli.go +++ b/internal/namespaces/iot/v1/iot_cli.go @@ -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, diff --git a/internal/namespaces/k8s/v1/k8s_cli.go b/internal/namespaces/k8s/v1/k8s_cli.go index a8137d7487..ad8a164d87 100644 --- a/internal/namespaces/k8s/v1/k8s_cli.go +++ b/internal/namespaces/k8s/v1/k8s_cli.go @@ -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,