Skip to content

Commit 08b7046

Browse files
scaleway-botjremy42
andcommitted
feat(edge_services): add plan backend limit (#5312)
Co-authored-by: Jonathan Remy <jremy@scaleway.com>
1 parent 9d9dc70 commit 08b7046

File tree

4 files changed

+21
-85
lines changed

4 files changed

+21
-85
lines changed

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-create-usage.golden

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@ USAGE:
66
scw edge-services backend-stage create [arg=value ...]
77

88
ARGS:
9-
[scaleway-s3.bucket-name] Name of the Bucket
10-
[scaleway-s3.bucket-region] Region of the Bucket
11-
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
12-
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
13-
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
14-
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
15-
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
16-
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
17-
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
18-
pipeline-id Pipeline ID the Backend stage belongs to
19-
[scaleway-serverless-container.region]
20-
[scaleway-serverless-container.container-id]
21-
[scaleway-serverless-function.region]
22-
[scaleway-serverless-function.function-id]
9+
[scaleway-s3.bucket-name] Name of the Bucket
10+
[scaleway-s3.bucket-region] Region of the Bucket
11+
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
12+
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
13+
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
14+
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
15+
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
16+
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
17+
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
18+
pipeline-id Pipeline ID the Backend stage belongs to
2319

2420
FLAGS:
2521
-h, --help help for create

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-update-usage.golden

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ USAGE:
66
scw edge-services backend-stage update <backend-stage-id ...> [arg=value ...]
77

88
ARGS:
9-
backend-stage-id ID of the backend stage to update
10-
[scaleway-s3.bucket-name] Name of the Bucket
11-
[scaleway-s3.bucket-region] Region of the Bucket
12-
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
13-
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
14-
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
15-
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
16-
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
17-
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
18-
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
19-
[pipeline-id] Pipeline ID the Backend stage belongs to
20-
[scaleway-serverless-container.region]
21-
[scaleway-serverless-container.container-id]
22-
[scaleway-serverless-function.region]
23-
[scaleway-serverless-function.function-id]
9+
backend-stage-id ID of the backend stage to update
10+
[scaleway-s3.bucket-name] Name of the Bucket
11+
[scaleway-s3.bucket-region] Region of the Bucket
12+
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
13+
[scaleway-lb.lbs.{index}.id] ID of the Load Balancer
14+
[scaleway-lb.lbs.{index}.zone] Zone of the Load Balancer
15+
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
16+
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
17+
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
18+
[scaleway-lb.lbs.{index}.has-websocket] Defines whether to forward websocket requests to the load balancer
19+
[pipeline-id] Pipeline ID the Backend stage belongs to
2420

2521
FLAGS:
2622
-h, --help help for update

docs/commands/edge-services.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ scw edge-services backend-stage create [arg=value ...]
8686
| scaleway-lb.lbs.{index}.domain-name | | Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer |
8787
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
8888
| pipeline-id | Required | Pipeline ID the Backend stage belongs to |
89-
| scaleway-serverless-container.region | | |
90-
| scaleway-serverless-container.container-id | | |
91-
| scaleway-serverless-function.region | | |
92-
| scaleway-serverless-function.function-id | | |
9389

9490

9591

@@ -180,10 +176,6 @@ scw edge-services backend-stage update <backend-stage-id ...> [arg=value ...]
180176
| scaleway-lb.lbs.{index}.domain-name | | Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer |
181177
| scaleway-lb.lbs.{index}.has-websocket | | Defines whether to forward websocket requests to the load balancer |
182178
| pipeline-id | | Pipeline ID the Backend stage belongs to |
183-
| scaleway-serverless-container.region | | |
184-
| scaleway-serverless-container.container-id | | |
185-
| scaleway-serverless-function.region | | |
186-
| scaleway-serverless-function.function-id | | |
187179

188180

189181

internal/namespaces/edge_services/v1beta1/edge_services_cli.go

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,30 +1352,6 @@ func edgeServicesBackendStageCreate() *core.Command {
13521352
Deprecated: false,
13531353
Positional: false,
13541354
},
1355-
{
1356-
Name: "scaleway-serverless-container.region",
1357-
Required: false,
1358-
Deprecated: false,
1359-
Positional: false,
1360-
},
1361-
{
1362-
Name: "scaleway-serverless-container.container-id",
1363-
Required: false,
1364-
Deprecated: false,
1365-
Positional: false,
1366-
},
1367-
{
1368-
Name: "scaleway-serverless-function.region",
1369-
Required: false,
1370-
Deprecated: false,
1371-
Positional: false,
1372-
},
1373-
{
1374-
Name: "scaleway-serverless-function.function-id",
1375-
Required: false,
1376-
Deprecated: false,
1377-
Positional: false,
1378-
},
13791355
},
13801356
Run: func(ctx context.Context, args any) (i any, e error) {
13811357
request := args.(*edge_services.CreateBackendStageRequest)
@@ -1504,30 +1480,6 @@ func edgeServicesBackendStageUpdate() *core.Command {
15041480
Deprecated: false,
15051481
Positional: false,
15061482
},
1507-
{
1508-
Name: "scaleway-serverless-container.region",
1509-
Required: false,
1510-
Deprecated: false,
1511-
Positional: false,
1512-
},
1513-
{
1514-
Name: "scaleway-serverless-container.container-id",
1515-
Required: false,
1516-
Deprecated: false,
1517-
Positional: false,
1518-
},
1519-
{
1520-
Name: "scaleway-serverless-function.region",
1521-
Required: false,
1522-
Deprecated: false,
1523-
Positional: false,
1524-
},
1525-
{
1526-
Name: "scaleway-serverless-function.function-id",
1527-
Required: false,
1528-
Deprecated: false,
1529-
Positional: false,
1530-
},
15311483
},
15321484
Run: func(ctx context.Context, args any) (i any, e error) {
15331485
request := args.(*edge_services.UpdateBackendStageRequest)

0 commit comments

Comments
 (0)