From ebb19445cc92ee4aebb4432addaeb9d7a39c1824 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 5 Jun 2023 17:47:53 +0000 Subject: [PATCH 1/4] feat: update generated APIs --- ...age-function-namespace-create-usage.golden | 2 +- .../test-all-usage-lbip-create-usage.golden | 1 + .../test-all-usage-lblb-create-usage.golden | 6 +++++- docs/commands/function.md | 2 +- docs/commands/lb.md | 5 ++++- go.mod | 2 +- go.sum | 4 ++-- internal/namespaces/lb/v1/lb_cli.go | 21 +++++++++++++++++++ 8 files changed, 36 insertions(+), 7 deletions(-) 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 0d0b40d45a..12e6d1ce04 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 @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Create a new namespace in a specified Organization or Proejct. +Create a new namespace in a specified Organization or Project. USAGE: scw function namespace create [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-lbip-create-usage.golden b/cmd/scw/testdata/test-all-usage-lbip-create-usage.golden index d3eacbdb85..b9059b04e2 100644 --- a/cmd/scw/testdata/test-all-usage-lbip-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lbip-create-usage.golden @@ -8,6 +8,7 @@ USAGE: ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used [reverse] Reverse DNS (domain name) for the IP address + [is-ipv6] If true, creates a Flexible IP with an ipv6 address [organization-id] Organization ID to use. If none is passed the default organization ID will be used [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 | pl-waw-2) diff --git a/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden b/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden index b131e250ee..dab67d86ce 100644 --- a/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden @@ -9,13 +9,17 @@ ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used name= Name for the Load Balancer [description] Description for the Load Balancer - [ip-id] ID of an existing flexible IP address to attach to the Load Balancer + [assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). + [ip-ids.{index}] List of IP IDs to attach to the Load Balancer [tags.{index}] List of tags for the Load Balancer [type=LB-S] Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types (LB-S | LB-GP-M | LB-GP-L) [ssl-compatibility-level] Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort (ssl_compatibility_level_unknown | ssl_compatibility_level_intermediate | ssl_compatibility_level_modern | ssl_compatibility_level_old) [organization-id] Organization ID to use. If none is passed the default organization ID will be used [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 | pl-waw-2) +DEPRECATED ARGS: + [ip-id] ID of an existing flexible IP address to attach to the Load Balancer + FLAGS: -h, --help help for create -w, --wait wait until the lb is ready diff --git a/docs/commands/function.md b/docs/commands/function.md index 51653f4870..15d887291e 100644 --- a/docs/commands/function.md +++ b/docs/commands/function.md @@ -496,7 +496,7 @@ Function namespace management commands. ### Create a new namespace -Create a new namespace in a specified Organization or Proejct. +Create a new namespace in a specified Organization or Project. **Usage:** diff --git a/docs/commands/lb.md b/docs/commands/lb.md index 8c93ede0bb..998685fe98 100644 --- a/docs/commands/lb.md +++ b/docs/commands/lb.md @@ -788,6 +788,7 @@ scw lb ip create [arg=value ...] |------|---|-------------| | project-id | | Project ID to use. If none is passed the default project ID will be used | | reverse | | Reverse DNS (domain name) for the IP address | +| is-ipv6 | | If true, creates a Flexible IP with an ipv6 address | | organization-id | | Organization ID to use. If none is passed the default organization ID will be used | | zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | @@ -899,7 +900,9 @@ scw lb lb create [arg=value ...] | project-id | | Project ID to use. If none is passed the default project ID will be used | | name | Required
Default: `` | Name for the Load Balancer | | description | | Description for the Load Balancer | -| ip-id | | ID of an existing flexible IP address to attach to the Load Balancer | +| ~~ip-id~~ | Deprecated | ID of an existing flexible IP address to attach to the Load Balancer | +| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). | +| ip-ids.{index} | | List of IP IDs to attach to the Load Balancer | | tags.{index} | | List of tags for the Load Balancer | | type | Default: `LB-S`
One of: `LB-S`, `LB-GP-M`, `LB-GP-L` | Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types | | ssl-compatibility-level | One of: `ssl_compatibility_level_unknown`, `ssl_compatibility_level_intermediate`, `ssl_compatibility_level_modern`, `ssl_compatibility_level_old` | Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort | diff --git a/go.mod b/go.mod index 3998d81c3e..aa39b5ba4e 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/moby/buildkit v0.11.6 github.com/opencontainers/go-digest v1.0.0 github.com/pkg/errors v0.9.1 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index cf63c86c61..346c6c0f30 100644 --- a/go.sum +++ b/go.sum @@ -499,8 +499,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d h1:qeI25+qrQ5MQaMFS2RgmAeAwUSWZSeYy5eYHnmW8vpk= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230526161530-cf508019231d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5 h1:cvEzMB3pnmV7nz/UL8otnJkuQ6HZ9JtkB03REanoWPE= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230605161902-063dd98719c5/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= diff --git a/internal/namespaces/lb/v1/lb_cli.go b/internal/namespaces/lb/v1/lb_cli.go index dbc1d21abc..12bf33781f 100644 --- a/internal/namespaces/lb/v1/lb_cli.go +++ b/internal/namespaces/lb/v1/lb_cli.go @@ -275,6 +275,20 @@ func lbLBCreate() *core.Command { Name: "ip-id", Short: `ID of an existing flexible IP address to attach to the Load Balancer`, Required: false, + Deprecated: true, + Positional: false, + }, + { + Name: "assign-flexible-ip", + Short: `Defines whether to automatically assign a flexible public IP to lb. Default value is ` + "`" + `false` + "`" + ` (do not assign).`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "ip-ids.{index}", + Short: `List of IP IDs to attach to the Load Balancer`, + Required: false, Deprecated: false, Positional: false, }, @@ -554,6 +568,13 @@ func lbIPCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "is-ipv6", + Short: `If true, creates a Flexible IP with an ipv6 address`, + Required: false, + Deprecated: false, + Positional: false, + }, core.OrganizationIDArgSpec(), core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw1, scw.ZonePlWaw2), }, From f18411f281323fdbc155b995e53e04fe386e834d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 6 Jun 2023 14:18:18 +0200 Subject: [PATCH 2/4] Fix --- .../test-all-usage-function-namespace-create-usage.golden | 2 +- docs/commands/function.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 12e6d1ce04..0d0b40d45a 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 @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Create a new namespace in a specified Organization or Project. +Create a new namespace in a specified Organization or Proejct. USAGE: scw function namespace create [arg=value ...] diff --git a/docs/commands/function.md b/docs/commands/function.md index 15d887291e..51653f4870 100644 --- a/docs/commands/function.md +++ b/docs/commands/function.md @@ -496,7 +496,7 @@ Function namespace management commands. ### Create a new namespace -Create a new namespace in a specified Organization or Project. +Create a new namespace in a specified Organization or Proejct. **Usage:** From d444d5d2c8074febc19f726ab3d7c3be3877e3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 6 Jun 2023 15:40:49 +0200 Subject: [PATCH 3/4] Fix --- docs/commands/lb.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/commands/lb.md b/docs/commands/lb.md index 998685fe98..7456812feb 100644 --- a/docs/commands/lb.md +++ b/docs/commands/lb.md @@ -903,6 +903,7 @@ scw lb lb create [arg=value ...] | ~~ip-id~~ | Deprecated | ID of an existing flexible IP address to attach to the Load Balancer | | assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). | | ip-ids.{index} | | List of IP IDs to attach to the Load Balancer | +| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). | | tags.{index} | | List of tags for the Load Balancer | | type | Default: `LB-S`
One of: `LB-S`, `LB-GP-M`, `LB-GP-L` | Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types | | ssl-compatibility-level | One of: `ssl_compatibility_level_unknown`, `ssl_compatibility_level_intermediate`, `ssl_compatibility_level_modern`, `ssl_compatibility_level_old` | Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort | From 245b62a9f179df1fbeab8ad4c314a6cbb7b3a8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 6 Jun 2023 16:01:40 +0200 Subject: [PATCH 4/4] Fix --- cmd/scw/testdata/test-all-usage-lblb-create-usage.golden | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden b/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden index dab67d86ce..0c4040289b 100644 --- a/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lblb-create-usage.golden @@ -11,6 +11,7 @@ ARGS: [description] Description for the Load Balancer [assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). [ip-ids.{index}] List of IP IDs to attach to the Load Balancer + [assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). [tags.{index}] List of tags for the Load Balancer [type=LB-S] Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types (LB-S | LB-GP-M | LB-GP-L) [ssl-compatibility-level] Determines the minimal SSL version which needs to be supported on the client side, in an SSL/TLS offloading context. Intermediate is suitable for general-purpose servers with a variety of clients, recommended for almost all systems. Modern is suitable for services with clients that support TLS 1.3 and do not need backward compatibility. Old is compatible with a small number of very old clients and should be used only as a last resort (ssl_compatibility_level_unknown | ssl_compatibility_level_intermediate | ssl_compatibility_level_modern | ssl_compatibility_level_old)