From 468e2a7b7c8ff154e422761b6bbe1c5a0aa1cd0c Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 12 Feb 2021 15:11:05 +0000 Subject: [PATCH 1/3] feat: update generated cli --- .../applesilicon/v1alpha1/applesilicon_cli.go | 2 +- internal/namespaces/lb/v1/lb_cli.go | 14 ++++++++++++++ internal/namespaces/rdb/v1/rdb_cli.go | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go b/internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go index 92cf57a827..875733a6a8 100644 --- a/internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go +++ b/internal/namespaces/applesilicon/v1alpha1/applesilicon_cli.go @@ -8,7 +8,7 @@ import ( "reflect" "github.com/scaleway/scaleway-cli/internal/core" - applesilicon "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/api/applesilicon/v1alpha1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/lb/v1/lb_cli.go b/internal/namespaces/lb/v1/lb_cli.go index 1bd81aa189..581b7e340d 100644 --- a/internal/namespaces/lb/v1/lb_cli.go +++ b/internal/namespaces/lb/v1/lb_cli.go @@ -790,6 +790,13 @@ func lbBackendCreate() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "health-check.check-send-proxy", + Short: `It defines whether the healthcheck should be done considering the proxy protocol`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "lb-id", Short: `Load balancer ID`, @@ -1237,6 +1244,13 @@ func lbBackendUpdateHealthcheck() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "check-send-proxy", + Short: `It defines whether the healthcheck should be done considering the proxy protocol`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { diff --git a/internal/namespaces/rdb/v1/rdb_cli.go b/internal/namespaces/rdb/v1/rdb_cli.go index fad9691132..486a412b47 100644 --- a/internal/namespaces/rdb/v1/rdb_cli.go +++ b/internal/namespaces/rdb/v1/rdb_cli.go @@ -29,6 +29,7 @@ func GetGeneratedCommands() *core.Commands { rdbDatabase(), rdbNodeType(), rdbLog(), + rdbSnapshot(), rdbEngineList(), rdbNodeTypeList(), rdbBackupList(), @@ -160,6 +161,16 @@ func rdbLog() *core.Command { } } +func rdbSnapshot() *core.Command { + return &core.Command{ + Short: `Block snapshot management`, + Long: `Create, restore and manage block snapshot +`, + Namespace: "rdb", + Resource: "snapshot", + } +} + func rdbEngineList() *core.Command { return &core.Command{ Short: `List available database engines`, @@ -545,6 +556,13 @@ func rdbInstanceUpgrade() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "volume-size", + Short: `Increase your block storage volume size`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { From f7e251b3431404ffd7fd2121f9d3d2e0fc3c4208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Mon, 15 Feb 2021 14:36:12 +0100 Subject: [PATCH 2/3] Fix --- internal/namespaces/rdb/v1/rdb_cli.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/internal/namespaces/rdb/v1/rdb_cli.go b/internal/namespaces/rdb/v1/rdb_cli.go index 486a412b47..fad9691132 100644 --- a/internal/namespaces/rdb/v1/rdb_cli.go +++ b/internal/namespaces/rdb/v1/rdb_cli.go @@ -29,7 +29,6 @@ func GetGeneratedCommands() *core.Commands { rdbDatabase(), rdbNodeType(), rdbLog(), - rdbSnapshot(), rdbEngineList(), rdbNodeTypeList(), rdbBackupList(), @@ -161,16 +160,6 @@ func rdbLog() *core.Command { } } -func rdbSnapshot() *core.Command { - return &core.Command{ - Short: `Block snapshot management`, - Long: `Create, restore and manage block snapshot -`, - Namespace: "rdb", - Resource: "snapshot", - } -} - func rdbEngineList() *core.Command { return &core.Command{ Short: `List available database engines`, @@ -556,13 +545,6 @@ func rdbInstanceUpgrade() *core.Command { Deprecated: false, Positional: false, }, - { - Name: "volume-size", - Short: `Increase your block storage volume size`, - Required: false, - Deprecated: false, - Positional: false, - }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { From 07cd7db48f9d1ba9628907589f34dc20fac86509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Mon, 15 Feb 2021 14:38:33 +0100 Subject: [PATCH 3/3] Fix --- cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden | 1 + .../test-all-usage-lb-backend-update-healthcheck-usage.golden | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden b/cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden index 7e739142d3..58d0a4c508 100644 --- a/cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden @@ -24,6 +24,7 @@ ARGS: [health-check.port] [health-check.check-timeout] [health-check.check-delay] + [health-check.check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol lb-id Load balancer ID server-ip.{index} Backend server IP addresses list (IPv4 or IPv6) [timeout-server] Maximum server connection inactivity time diff --git a/cmd/scw/testdata/test-all-usage-lb-backend-update-healthcheck-usage.golden b/cmd/scw/testdata/test-all-usage-lb-backend-update-healthcheck-usage.golden index e05d30b8eb..843016b2ab 100644 --- a/cmd/scw/testdata/test-all-usage-lb-backend-update-healthcheck-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-backend-update-healthcheck-usage.golden @@ -19,6 +19,7 @@ ARGS: [https-config.uri] [https-config.method] [https-config.code] + [check-send-proxy] It defines whether the healthcheck should be done considering the proxy protocol [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: