Skip to content

Commit 72f5bc4

Browse files
authored
feat: list LBs by tags & upgrade public gateway to IP mobility (#3725)
1 parent 29f059d commit 72f5bc4

File tree

10 files changed

+337
-10
lines changed

10 files changed

+337
-10
lines changed

cmd/scw/testdata/test-all-usage-lblb-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
[name] Load Balancer name to filter for
1010
[order-by] Sort order of Load Balancers in the response (created_at_asc | created_at_desc | name_asc | name_desc)
1111
[project-id] Project ID to filter for, only Load Balancers from this Project will be returned
12+
[tags.{index}] Filter by tag, only Load Balancers with one or more matching tags will be returned
1213
[organization-id] Organization ID to filter for, only Load Balancers from this Organization will be returned
1314
[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 | pl-waw-3 | all)
1415

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Upgrade a Public Gateway to IP mobility (move from NAT IP to routed IP). This is idempotent: repeated calls after the first will return no error but have no effect.
4+
5+
USAGE:
6+
scw vpc-gw gateway enable-ip-mobility <gateway-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-id ID of the gateway to upgrade to IP mobility
10+
[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 | pl-waw-3)
11+
12+
FLAGS:
13+
-h, --help help for enable-ip-mobility
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-vpc-gw-gateway-usage.golden

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ USAGE:
66
scw vpc-gw gateway <command>
77

88
AVAILABLE COMMANDS:
9-
create Create a Public Gateway
10-
delete Delete a Public Gateway
11-
get Get a Public Gateway
12-
list List Public Gateways
13-
refresh-ssh-keys Refresh a Public Gateway's SSH keys
14-
update Update a Public Gateway
15-
upgrade Upgrade a Public Gateway to the latest version
9+
create Create a Public Gateway
10+
delete Delete a Public Gateway
11+
enable-ip-mobility Upgrade a Public Gateway to IP mobility
12+
get Get a Public Gateway
13+
list List Public Gateways
14+
refresh-ssh-keys Refresh a Public Gateway's SSH keys
15+
update Update a Public Gateway
16+
upgrade Upgrade a Public Gateway to the latest version
1617

1718
FLAGS:
1819
-h, --help help for gateway

docs/commands/lb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@ scw lb lb list [arg=value ...]
997997
| name | | Load Balancer name to filter for |
998998
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of Load Balancers in the response |
999999
| project-id | | Project ID to filter for, only Load Balancers from this Project will be returned |
1000+
| tags.{index} | | Filter by tag, only Load Balancers with one or more matching tags will be returned |
10001001
| organization-id | | Organization ID to filter for, only Load Balancers from this Organization will be returned |
10011002
| 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`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |
10021003

docs/commands/vpc-gw.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Public Gateways API.
1818
- [Public Gateway management](#public-gateway-management)
1919
- [Create a Public Gateway](#create-a-public-gateway)
2020
- [Delete a Public Gateway](#delete-a-public-gateway)
21+
- [Upgrade a Public Gateway to IP mobility](#upgrade-a-public-gateway-to-ip-mobility)
2122
- [Get a Public Gateway](#get-a-public-gateway)
2223
- [List Public Gateways](#list-public-gateways)
2324
- [Refresh a Public Gateway's SSH keys](#refresh-a-public-gateway's-ssh-keys)
@@ -370,6 +371,26 @@ scw vpc-gw gateway delete <gateway-id ...> [arg=value ...]
370371

371372

372373

374+
### Upgrade a Public Gateway to IP mobility
375+
376+
Upgrade a Public Gateway to IP mobility (move from NAT IP to routed IP). This is idempotent: repeated calls after the first will return no error but have no effect.
377+
378+
**Usage:**
379+
380+
```
381+
scw vpc-gw gateway enable-ip-mobility <gateway-id ...> [arg=value ...]
382+
```
383+
384+
385+
**Args:**
386+
387+
| Name | | Description |
388+
|------|---|-------------|
389+
| gateway-id | Required | ID of the gateway to upgrade to IP mobility |
390+
| 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`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |
391+
392+
393+
373394
### Get a Public Gateway
374395

375396
Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.

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.25.0.20240314074042-0b790ad4f7ce
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25.0.20240327151700-4f053a4f2844
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.8.0
3030
github.com/spf13/pflag v1.0.5

0 commit comments

Comments
 (0)