Skip to content

Commit efcdd3d

Browse files
authored
feat(lb): add support for is-ipv6 (#3543)
1 parent 905be70 commit efcdd3d

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

cmd/scw/testdata/test-all-usage-lbip-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
ARGS:
99
[project-id] Project ID to use. If none is passed the default project ID will be used
1010
[reverse] Reverse DNS (domain name) for the IP address
11+
[is-ipv6] If true, creates a Flexible IP with an ipv6 address
1112
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
1213
[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)
1314

cmd/scw/testdata/test-all-usage-lbip-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
ARGS:
99
ip-id IP address ID
1010
[reverse] Reverse DNS (domain name) for the IP address
11+
[lb-id] ID of the server on which to attach the flexible IP
1112
[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)
1213

1314
FLAGS:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ARGS:
1010
name=<generated> Name for the Load Balancer
1111
[description] Description for the Load Balancer
1212
[assign-flexible-ip] Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
13+
[assign-flexible-ipv6] Defines whether to automatically assign a flexible public IPv6 to the Load Balancer. Default value is `false` (do not assign).
14+
[ip-ids.{index}] List of IP IDs to attach to the Load Balancer
1315
[tags.{index}] List of tags for the Load Balancer
1416
[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)
1517
[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)

docs/commands/lb.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ scw lb ip create [arg=value ...]
791791
|------|---|-------------|
792792
| project-id | | Project ID to use. If none is passed the default project ID will be used |
793793
| reverse | | Reverse DNS (domain name) for the IP address |
794+
| is-ipv6 | | If true, creates a Flexible IP with an ipv6 address |
794795
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
795796
| 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 |
796797

@@ -875,6 +876,7 @@ scw lb ip update <ip-id ...> [arg=value ...]
875876
|------|---|-------------|
876877
| ip-id | Required | IP address ID |
877878
| reverse | | Reverse DNS (domain name) for the IP address |
879+
| lb-id | | ID of the server on which to attach the flexible IP |
878880
| 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 |
879881

880882

@@ -904,6 +906,8 @@ scw lb lb create [arg=value ...]
904906
| description | | Description for the Load Balancer |
905907
| ~~ip-id~~ | Deprecated | ID of an existing flexible IP address to attach to the Load Balancer |
906908
| assign-flexible-ip | | Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign). |
909+
| assign-flexible-ipv6 | | Defines whether to automatically assign a flexible public IPv6 to the Load Balancer. Default value is `false` (do not assign). |
910+
| ip-ids.{index} | | List of IP IDs to attach to the Load Balancer |
907911
| tags.{index} | | List of tags for the Load Balancer |
908912
| type | Default: `LB-S`<br />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 |
909913
| 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 |

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,20 @@ func lbLBCreate() *core.Command {
285285
Deprecated: false,
286286
Positional: false,
287287
},
288+
{
289+
Name: "assign-flexible-ipv6",
290+
Short: `Defines whether to automatically assign a flexible public IPv6 to the Load Balancer. Default value is ` + "`" + `false` + "`" + ` (do not assign).`,
291+
Required: false,
292+
Deprecated: false,
293+
Positional: false,
294+
},
295+
{
296+
Name: "ip-ids.{index}",
297+
Short: `List of IP IDs to attach to the Load Balancer`,
298+
Required: false,
299+
Deprecated: false,
300+
Positional: false,
301+
},
288302
{
289303
Name: "tags.{index}",
290304
Short: `List of tags for the Load Balancer`,
@@ -561,6 +575,13 @@ func lbIPCreate() *core.Command {
561575
Deprecated: false,
562576
Positional: false,
563577
},
578+
{
579+
Name: "is-ipv6",
580+
Short: `If true, creates a Flexible IP with an ipv6 address`,
581+
Required: false,
582+
Deprecated: false,
583+
Positional: false,
584+
},
564585
core.OrganizationIDArgSpec(),
565586
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
566587
},
@@ -665,6 +686,13 @@ func lbIPUpdate() *core.Command {
665686
Deprecated: false,
666687
Positional: false,
667688
},
689+
{
690+
Name: "lb-id",
691+
Short: `ID of the server on which to attach the flexible IP`,
692+
Required: false,
693+
Deprecated: false,
694+
Positional: false,
695+
},
668696
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
669697
},
670698
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)