Skip to content

Commit be3dfa6

Browse files
feat(instance): add option to disable IPv6 during the migration to routed IPs (#702)
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
1 parent 475f56c commit be3dfa6

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ async def server_action(
907907
action: Optional[ServerAction] = None,
908908
name: Optional[str] = None,
909909
volumes: Optional[Dict[str, ServerActionRequestVolumeBackupTemplate]] = None,
910+
disable_ipv6: Optional[bool] = None,
910911
) -> ServerActionResponse:
911912
"""
912913
Perform action.
@@ -929,6 +930,8 @@ async def server_action(
929930
This field should only be specified when performing a backup action.
930931
:param volumes: For each volume UUID, the snapshot parameters of the volume.
931932
This field should only be specified when performing a backup action.
933+
:param disable_ipv6: Disable IPv6 on the Instance while performing migration to routed IPs.
934+
This field should only be specified when performing a enable_routed_ip action.
932935
:return: :class:`ServerActionResponse <ServerActionResponse>`
933936
934937
Usage:
@@ -952,6 +955,7 @@ async def server_action(
952955
action=action,
953956
name=name,
954957
volumes=volumes,
958+
disable_ipv6=disable_ipv6,
955959
),
956960
self.client,
957961
),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3228,6 +3228,9 @@ def marshal_ServerActionRequest(
32283228
for key, value in request.volumes.items()
32293229
}
32303230

3231+
if request.disable_ipv6 is not None:
3232+
output["disable_ipv6"] = request.disable_ipv6
3233+
32313234
return output
32323235

32333236

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,12 @@ class ServerActionRequest:
29832983
This field should only be specified when performing a backup action.
29842984
"""
29852985

2986+
disable_ipv6: Optional[bool]
2987+
"""
2988+
Disable IPv6 on the Instance while performing migration to routed IPs.
2989+
This field should only be specified when performing a enable_routed_ip action.
2990+
"""
2991+
29862992

29872993
@dataclass
29882994
class ServerActionResponse:

scaleway/scaleway/instance/v1/api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ def server_action(
907907
action: Optional[ServerAction] = None,
908908
name: Optional[str] = None,
909909
volumes: Optional[Dict[str, ServerActionRequestVolumeBackupTemplate]] = None,
910+
disable_ipv6: Optional[bool] = None,
910911
) -> ServerActionResponse:
911912
"""
912913
Perform action.
@@ -929,6 +930,8 @@ def server_action(
929930
This field should only be specified when performing a backup action.
930931
:param volumes: For each volume UUID, the snapshot parameters of the volume.
931932
This field should only be specified when performing a backup action.
933+
:param disable_ipv6: Disable IPv6 on the Instance while performing migration to routed IPs.
934+
This field should only be specified when performing a enable_routed_ip action.
932935
:return: :class:`ServerActionResponse <ServerActionResponse>`
933936
934937
Usage:
@@ -952,6 +955,7 @@ def server_action(
952955
action=action,
953956
name=name,
954957
volumes=volumes,
958+
disable_ipv6=disable_ipv6,
955959
),
956960
self.client,
957961
),

scaleway/scaleway/instance/v1/marshalling.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3228,6 +3228,9 @@ def marshal_ServerActionRequest(
32283228
for key, value in request.volumes.items()
32293229
}
32303230

3231+
if request.disable_ipv6 is not None:
3232+
output["disable_ipv6"] = request.disable_ipv6
3233+
32313234
return output
32323235

32333236

scaleway/scaleway/instance/v1/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,12 @@ class ServerActionRequest:
29832983
This field should only be specified when performing a backup action.
29842984
"""
29852985

2986+
disable_ipv6: Optional[bool]
2987+
"""
2988+
Disable IPv6 on the Instance while performing migration to routed IPs.
2989+
This field should only be specified when performing a enable_routed_ip action.
2990+
"""
2991+
29862992

29872993
@dataclass
29882994
class ServerActionResponse:

0 commit comments

Comments
 (0)