Skip to content

Commit 74b3a82

Browse files
authored
feat(lb): display ipam_id for pn attachment in doc (#579)
1 parent 52421c5 commit 74b3a82

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-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
@@ -3128,6 +3128,7 @@ async def attach_private_network(
31283128
static_config: Optional[PrivateNetworkStaticConfig] = None,
31293129
dhcp_config: Optional[PrivateNetworkDHCPConfig] = None,
31303130
ipam_config: Optional[PrivateNetworkIpamConfig] = None,
3131+
ipam_ids: Optional[List[str]] = None,
31313132
) -> PrivateNetwork:
31323133
"""
31333134
Attach a Load Balancer to a Private Network.
@@ -3141,6 +3142,7 @@ async def attach_private_network(
31413142
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
31423143
:param ipam_config: For internal use only.
31433144
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
3145+
:param ipam_ids: IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
31443146
:return: :class:`PrivateNetwork <PrivateNetwork>`
31453147
31463148
Usage:
@@ -3166,6 +3168,7 @@ async def attach_private_network(
31663168
lb_id=lb_id,
31673169
private_network_id=private_network_id,
31683170
zone=zone,
3171+
ipam_ids=ipam_ids,
31693172
static_config=static_config,
31703173
dhcp_config=dhcp_config,
31713174
ipam_config=ipam_config,
@@ -6140,6 +6143,7 @@ async def attach_private_network(
61406143
static_config: Optional[PrivateNetworkStaticConfig] = None,
61416144
dhcp_config: Optional[PrivateNetworkDHCPConfig] = None,
61426145
ipam_config: Optional[PrivateNetworkIpamConfig] = None,
6146+
ipam_ids: Optional[List[str]] = None,
61436147
) -> PrivateNetwork:
61446148
"""
61456149
Add load balancer on instance private network.
@@ -6152,6 +6156,7 @@ async def attach_private_network(
61526156
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
61536157
:param ipam_config: For internal use only.
61546158
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
6159+
:param ipam_ids: IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
61556160
:return: :class:`PrivateNetwork <PrivateNetwork>`
61566161
61576162
Usage:
@@ -6179,6 +6184,7 @@ async def attach_private_network(
61796184
lb_id=lb_id,
61806185
private_network_id=private_network_id,
61816186
region=region,
6187+
ipam_ids=ipam_ids,
61826188
static_config=static_config,
61836189
dhcp_config=dhcp_config,
61846190
ipam_config=ipam_config,

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,9 @@ def marshal_AttachPrivateNetworkRequest(
15591559
),
15601560
)
15611561

1562+
if request.ipam_ids is not None:
1563+
output["ipam_ids"] = request.ipam_ids
1564+
15621565
return output
15631566

15641567

@@ -2424,6 +2427,9 @@ def marshal_ZonedApiAttachPrivateNetworkRequest(
24242427
),
24252428
)
24262429

2430+
if request.ipam_ids is not None:
2431+
output["ipam_ids"] = request.ipam_ids
2432+
24272433
return output
24282434

24292435

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,11 @@ class AttachPrivateNetworkRequest:
12351235
Region to target. If none is passed will use default region from the config.
12361236
"""
12371237

1238+
ipam_ids: Optional[List[str]]
1239+
"""
1240+
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
1241+
"""
1242+
12381243
static_config: Optional[PrivateNetworkStaticConfig]
12391244

12401245
dhcp_config: Optional[PrivateNetworkDHCPConfig]
@@ -2874,6 +2879,11 @@ class ZonedApiAttachPrivateNetworkRequest:
28742879
Zone to target. If none is passed will use default zone from the config.
28752880
"""
28762881

2882+
ipam_ids: Optional[List[str]]
2883+
"""
2884+
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
2885+
"""
2886+
28772887
static_config: Optional[PrivateNetworkStaticConfig]
28782888

28792889
dhcp_config: Optional[PrivateNetworkDHCPConfig]

scaleway/scaleway/lb/v1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,6 +3126,7 @@ def attach_private_network(
31263126
static_config: Optional[PrivateNetworkStaticConfig] = None,
31273127
dhcp_config: Optional[PrivateNetworkDHCPConfig] = None,
31283128
ipam_config: Optional[PrivateNetworkIpamConfig] = None,
3129+
ipam_ids: Optional[List[str]] = None,
31293130
) -> PrivateNetwork:
31303131
"""
31313132
Attach a Load Balancer to a Private Network.
@@ -3139,6 +3140,7 @@ def attach_private_network(
31393140
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
31403141
:param ipam_config: For internal use only.
31413142
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
3143+
:param ipam_ids: IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
31423144
:return: :class:`PrivateNetwork <PrivateNetwork>`
31433145
31443146
Usage:
@@ -3164,6 +3166,7 @@ def attach_private_network(
31643166
lb_id=lb_id,
31653167
private_network_id=private_network_id,
31663168
zone=zone,
3169+
ipam_ids=ipam_ids,
31673170
static_config=static_config,
31683171
dhcp_config=dhcp_config,
31693172
ipam_config=ipam_config,
@@ -6136,6 +6139,7 @@ def attach_private_network(
61366139
static_config: Optional[PrivateNetworkStaticConfig] = None,
61376140
dhcp_config: Optional[PrivateNetworkDHCPConfig] = None,
61386141
ipam_config: Optional[PrivateNetworkIpamConfig] = None,
6142+
ipam_ids: Optional[List[str]] = None,
61396143
) -> PrivateNetwork:
61406144
"""
61416145
Add load balancer on instance private network.
@@ -6148,6 +6152,7 @@ def attach_private_network(
61486152
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
61496153
:param ipam_config: For internal use only.
61506154
One-Of ('config'): at most one of 'static_config', 'dhcp_config', 'ipam_config' could be set.
6155+
:param ipam_ids: IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
61516156
:return: :class:`PrivateNetwork <PrivateNetwork>`
61526157
61536158
Usage:
@@ -6175,6 +6180,7 @@ def attach_private_network(
61756180
lb_id=lb_id,
61766181
private_network_id=private_network_id,
61776182
region=region,
6183+
ipam_ids=ipam_ids,
61786184
static_config=static_config,
61796185
dhcp_config=dhcp_config,
61806186
ipam_config=ipam_config,

scaleway/scaleway/lb/v1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,9 @@ def marshal_AttachPrivateNetworkRequest(
15591559
),
15601560
)
15611561

1562+
if request.ipam_ids is not None:
1563+
output["ipam_ids"] = request.ipam_ids
1564+
15621565
return output
15631566

15641567

@@ -2424,6 +2427,9 @@ def marshal_ZonedApiAttachPrivateNetworkRequest(
24242427
),
24252428
)
24262429

2430+
if request.ipam_ids is not None:
2431+
output["ipam_ids"] = request.ipam_ids
2432+
24272433
return output
24282434

24292435

scaleway/scaleway/lb/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,11 @@ class AttachPrivateNetworkRequest:
12351235
Region to target. If none is passed will use default region from the config.
12361236
"""
12371237

1238+
ipam_ids: Optional[List[str]]
1239+
"""
1240+
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
1241+
"""
1242+
12381243
static_config: Optional[PrivateNetworkStaticConfig]
12391244

12401245
dhcp_config: Optional[PrivateNetworkDHCPConfig]
@@ -2874,6 +2879,11 @@ class ZonedApiAttachPrivateNetworkRequest:
28742879
Zone to target. If none is passed will use default zone from the config.
28752880
"""
28762881

2882+
ipam_ids: Optional[List[str]]
2883+
"""
2884+
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network. In the future, it will be possible to specify multiple IPs in this field (IPv4 and IPv6), for now only one ID of an IPv4 address is expected. When null, a new private IP address is created for the Load Balancer on this Private Network.
2885+
"""
2886+
28772887
static_config: Optional[PrivateNetworkStaticConfig]
28782888

28792889
dhcp_config: Optional[PrivateNetworkDHCPConfig]

0 commit comments

Comments
 (0)