Skip to content

Commit 849a289

Browse files
authored
fix(lb): remove required option on Create loadbalancer subscriber (#3296)
1 parent 0927eda commit 849a289

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

cmd/scw/testdata/test-all-usage-lb-subscriber-create-usage.golden

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ USAGE:
66
scw lb subscriber create [arg=value ...]
77

88
ARGS:
9-
name Subscriber name
10-
email-config.email Email address to send alerts to
11-
webhook-config.uri URI to receive POST requests
12-
[project-id] Project ID to use. If none is passed the default project ID will be used
13-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
14-
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2)
9+
name Subscriber name
10+
[email-config.email] Email address to send alerts to
11+
[webhook-config.uri] URI to receive POST requests
12+
[project-id] Project ID to use. If none is passed the default project ID will be used
13+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
14+
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2)
1515

1616
FLAGS:
1717
-h, --help help for create

cmd/scw/testdata/test-all-usage-lb-subscriber-update-usage.golden

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw lb subscriber update <subscriber-id ...> [arg=value ...]
77

88
ARGS:
9-
subscriber-id Subscriber ID
10-
name Subscriber name
11-
email-config.email Email address to send alerts to
12-
webhook-config.uri URI to receive POST requests
13-
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2)
9+
subscriber-id Subscriber ID
10+
name Subscriber name
11+
[email-config.email] Email address to send alerts to
12+
[webhook-config.uri] URI to receive POST requests
13+
[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 | nl-ams-3 | pl-waw-1 | pl-waw-2)
1414

1515
FLAGS:
1616
-h, --help help for update

docs/commands/lb.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ scw lb subscriber create [arg=value ...]
13031303
| Name | | Description |
13041304
|------|---|-------------|
13051305
| name | Required | Subscriber name |
1306-
| email-config.email | Required | Email address to send alerts to |
1307-
| webhook-config.uri | Required | URI to receive POST requests |
1306+
| email-config.email | | Email address to send alerts to |
1307+
| webhook-config.uri | | URI to receive POST requests |
13081308
| project-id | | Project ID to use. If none is passed the default project ID will be used |
13091309
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
13101310
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |
@@ -1432,8 +1432,8 @@ scw lb subscriber update <subscriber-id ...> [arg=value ...]
14321432
|------|---|-------------|
14331433
| subscriber-id | Required | Subscriber ID |
14341434
| name | Required | Subscriber name |
1435-
| email-config.email | Required | Email address to send alerts to |
1436-
| webhook-config.uri | Required | URI to receive POST requests |
1435+
| email-config.email | | Email address to send alerts to |
1436+
| webhook-config.uri | | URI to receive POST requests |
14371437
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |
14381438

14391439

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230717114303-9b6e07d6384b
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230720143451-785dc161c15d
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.7.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
497497
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
498498
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
499499
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
500-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230717114303-9b6e07d6384b h1:b5kG1Uzb4Fst6BoLXsgowQHj6WOkECIj+UkM1YwTIQY=
501-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230717114303-9b6e07d6384b/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
500+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230720143451-785dc161c15d h1:fMaLlUJQWVFQeQTMPi5AFXPyM/MZgyFdSo4tp5BOShg=
501+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19.0.20230720143451-785dc161c15d/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
502502
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
503503
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
504504
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,14 +2908,14 @@ func lbSubscriberCreate() *core.Command {
29082908
{
29092909
Name: "email-config.email",
29102910
Short: `Email address to send alerts to`,
2911-
Required: true,
2911+
Required: false,
29122912
Deprecated: false,
29132913
Positional: false,
29142914
},
29152915
{
29162916
Name: "webhook-config.uri",
29172917
Short: `URI to receive POST requests`,
2918-
Required: true,
2918+
Required: false,
29192919
Deprecated: false,
29202920
Positional: false,
29212921
},
@@ -3052,14 +3052,14 @@ func lbSubscriberUpdate() *core.Command {
30523052
{
30533053
Name: "email-config.email",
30543054
Short: `Email address to send alerts to`,
3055-
Required: true,
3055+
Required: false,
30563056
Deprecated: false,
30573057
Positional: false,
30583058
},
30593059
{
30603060
Name: "webhook-config.uri",
30613061
Short: `URI to receive POST requests`,
3062-
Required: true,
3062+
Required: false,
30633063
Deprecated: false,
30643064
Positional: false,
30653065
},

0 commit comments

Comments
 (0)