Skip to content

Commit cfedaab

Browse files
authored
feat(lb): add flexible ip auto assign flag (#203)
1 parent 2df9bfe commit cfedaab

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

scaleway-async/scaleway_async/lb/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ async def create_lb(
310310
project_id: Optional[str] = None,
311311
name: Optional[str] = None,
312312
ip_id: Optional[str] = None,
313+
assign_flexible_ip: Optional[bool] = None,
313314
tags: Optional[List[str]] = None,
314315
) -> Lb:
315316
"""
@@ -324,6 +325,7 @@ async def create_lb(
324325
:param name: Name for the Load Balancer.
325326
:param description: Description for the Load Balancer.
326327
:param ip_id: ID of an existing flexible IP address to attach to the Load Balancer.
328+
:param assign_flexible_ip: Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
327329
:param tags: List of tags for the Load Balancer.
328330
:param type_: Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
329331
:param 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.
@@ -356,6 +358,7 @@ async def create_lb(
356358
project_id=project_id,
357359
name=name or random_name(prefix="lb"),
358360
ip_id=ip_id,
361+
assign_flexible_ip=assign_flexible_ip,
359362
tags=tags,
360363
),
361364
self.client,
@@ -3235,6 +3238,7 @@ async def create_lb(
32353238
project_id: Optional[str] = None,
32363239
name: Optional[str] = None,
32373240
ip_id: Optional[str] = None,
3241+
assign_flexible_ip: Optional[bool] = None,
32383242
tags: Optional[List[str]] = None,
32393243
) -> Lb:
32403244
"""
@@ -3250,6 +3254,7 @@ async def create_lb(
32503254
:param name: Name for the Load Balancer.
32513255
:param description: Description for the Load Balancer.
32523256
:param ip_id: ID of an existing flexible IP address to attach to the Load Balancer.
3257+
:param assign_flexible_ip: Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
32533258
:param tags: List of tags for the Load Balancer.
32543259
:param type_: Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
32553260
:param 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.
@@ -3280,6 +3285,7 @@ async def create_lb(
32803285
project_id=project_id,
32813286
name=name or random_name(prefix="lb"),
32823287
ip_id=ip_id,
3288+
assign_flexible_ip=assign_flexible_ip,
32833289
tags=tags,
32843290
),
32853291
self.client,

scaleway-async/scaleway_async/lb/v1/marshalling.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ def marshal_CreateLbRequest(
16031603
),
16041604
]
16051605
),
1606+
"assign_flexible_ip": request.assign_flexible_ip,
16061607
"description": request.description,
16071608
"ip_id": request.ip_id,
16081609
"name": request.name,
@@ -2081,6 +2082,7 @@ def marshal_ZonedApiCreateLbRequest(
20812082
),
20822083
]
20832084
),
2085+
"assign_flexible_ip": request.assign_flexible_ip,
20842086
"description": request.description,
20852087
"ip_id": request.ip_id,
20862088
"name": request.name,

scaleway-async/scaleway_async/lb/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,11 @@ class CreateLbRequest:
16621662
ID of an existing flexible IP address to attach to the Load Balancer.
16631663
"""
16641664

1665+
assign_flexible_ip: Optional[bool]
1666+
"""
1667+
Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
1668+
"""
1669+
16651670
tags: Optional[List[str]]
16661671
"""
16671672
List of tags for the Load Balancer.
@@ -3187,6 +3192,11 @@ class ZonedApiCreateLbRequest:
31873192
ID of an existing flexible IP address to attach to the Load Balancer.
31883193
"""
31893194

3195+
assign_flexible_ip: Optional[bool]
3196+
"""
3197+
Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
3198+
"""
3199+
31903200
tags: Optional[List[str]]
31913201
"""
31923202
List of tags for the Load Balancer.

scaleway/scaleway/lb/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ def create_lb(
310310
project_id: Optional[str] = None,
311311
name: Optional[str] = None,
312312
ip_id: Optional[str] = None,
313+
assign_flexible_ip: Optional[bool] = None,
313314
tags: Optional[List[str]] = None,
314315
) -> Lb:
315316
"""
@@ -324,6 +325,7 @@ def create_lb(
324325
:param name: Name for the Load Balancer.
325326
:param description: Description for the Load Balancer.
326327
:param ip_id: ID of an existing flexible IP address to attach to the Load Balancer.
328+
:param assign_flexible_ip: Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
327329
:param tags: List of tags for the Load Balancer.
328330
:param type_: Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
329331
:param 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.
@@ -356,6 +358,7 @@ def create_lb(
356358
project_id=project_id,
357359
name=name or random_name(prefix="lb"),
358360
ip_id=ip_id,
361+
assign_flexible_ip=assign_flexible_ip,
359362
tags=tags,
360363
),
361364
self.client,
@@ -3233,6 +3236,7 @@ def create_lb(
32333236
project_id: Optional[str] = None,
32343237
name: Optional[str] = None,
32353238
ip_id: Optional[str] = None,
3239+
assign_flexible_ip: Optional[bool] = None,
32363240
tags: Optional[List[str]] = None,
32373241
) -> Lb:
32383242
"""
@@ -3248,6 +3252,7 @@ def create_lb(
32483252
:param name: Name for the Load Balancer.
32493253
:param description: Description for the Load Balancer.
32503254
:param ip_id: ID of an existing flexible IP address to attach to the Load Balancer.
3255+
:param assign_flexible_ip: Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
32513256
:param tags: List of tags for the Load Balancer.
32523257
:param type_: Load Balancer commercial offer type. Use the Load Balancer types endpoint to retrieve a list of available offer types.
32533258
:param 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.
@@ -3278,6 +3283,7 @@ def create_lb(
32783283
project_id=project_id,
32793284
name=name or random_name(prefix="lb"),
32803285
ip_id=ip_id,
3286+
assign_flexible_ip=assign_flexible_ip,
32813287
tags=tags,
32823288
),
32833289
self.client,

scaleway/scaleway/lb/v1/marshalling.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ def marshal_CreateLbRequest(
16031603
),
16041604
]
16051605
),
1606+
"assign_flexible_ip": request.assign_flexible_ip,
16061607
"description": request.description,
16071608
"ip_id": request.ip_id,
16081609
"name": request.name,
@@ -2081,6 +2082,7 @@ def marshal_ZonedApiCreateLbRequest(
20812082
),
20822083
]
20832084
),
2085+
"assign_flexible_ip": request.assign_flexible_ip,
20842086
"description": request.description,
20852087
"ip_id": request.ip_id,
20862088
"name": request.name,

scaleway/scaleway/lb/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,11 @@ class CreateLbRequest:
16621662
ID of an existing flexible IP address to attach to the Load Balancer.
16631663
"""
16641664

1665+
assign_flexible_ip: Optional[bool]
1666+
"""
1667+
Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
1668+
"""
1669+
16651670
tags: Optional[List[str]]
16661671
"""
16671672
List of tags for the Load Balancer.
@@ -3187,6 +3192,11 @@ class ZonedApiCreateLbRequest:
31873192
ID of an existing flexible IP address to attach to the Load Balancer.
31883193
"""
31893194

3195+
assign_flexible_ip: Optional[bool]
3196+
"""
3197+
Defines whether to automatically assign a flexible public IP to lb. Default value is `false` (do not assign).
3198+
"""
3199+
31903200
tags: Optional[List[str]]
31913201
"""
31923202
List of tags for the Load Balancer.

0 commit comments

Comments
 (0)