Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scaleway-async/scaleway_async/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,12 +741,12 @@ async def _update_server(
bootscript: Optional[str] = None,
dynamic_ip_required: Optional[bool] = None,
routed_ip_enabled: Optional[bool] = None,
public_ips: Optional[List[ServerIp]] = None,
public_ips: Optional[List[str]] = None,
enable_ipv6: Optional[bool] = None,
protected: Optional[bool] = None,
security_group: Optional[SecurityGroupTemplate] = None,
placement_group: Optional[str] = None,
private_nics: Optional[List[PrivateNIC]] = None,
private_nics: Optional[List[str]] = None,
commercial_type: Optional[str] = None,
) -> UpdateServerResponse:
"""
Expand All @@ -761,7 +761,7 @@ async def _update_server(
:param bootscript:
:param dynamic_ip_required:
:param routed_ip_enabled: True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
:param public_ips:
:param public_ips: A list of reserved IP IDs to attach to the Instance.
:param enable_ipv6:
:param protected:
:param security_group:
Expand Down
14 changes: 8 additions & 6 deletions scaleway-async/scaleway_async/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ def unmarshal_ServerIp(data: Any) -> ServerIp:
field = data.get("provisioning_mode", None)
args["provisioning_mode"] = field

field = data.get("tags", None)
args["tags"] = field

return ServerIp(**args)


Expand Down Expand Up @@ -2425,6 +2428,9 @@ def marshal_ServerIp(
request.provisioning_mode
)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down Expand Up @@ -3599,17 +3605,13 @@ def marshal__UpdateServerRequest(
output["placement_group"] = request.placement_group

if request.private_nics is not None:
output["private_nics"] = [
marshal_PrivateNIC(v, defaults) for v in request.private_nics
]
output["private_nics"] = request.private_nics

if request.protected is not None:
output["protected"] = request.protected

if request.public_ips is not None:
output["public_ips"] = [
marshal_ServerIp(v, defaults) for v in request.public_ips
]
output["public_ips"] = request.public_ips

if request.routed_ip_enabled is not None:
output["routed_ip_enabled"] = request.routed_ip_enabled
Expand Down
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ class VolumeVolumeType(str, Enum, metaclass=StrEnumMeta):
UNIFIED = "unified"
SCRATCH = "scratch"
SBS_VOLUME = "sbs_volume"
SBS_SNAPSHOT = "sbs_snapshot"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -1266,6 +1267,11 @@ class ServerIp:
Information about this address provisioning mode.
"""

tags: List[str]
"""
Tags associated with the IP.
"""


@dataclass
class ServerIpv6:
Expand Down
7 changes: 5 additions & 2 deletions scaleway-async/scaleway_async/instance/v1/types_private.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,10 @@ class _UpdateServerRequest:
True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
"""

public_ips: Optional[List[ServerIp]]
public_ips: Optional[List[str]]
"""
A list of reserved IP IDs to attach to the Instance.
"""

enable_ipv6: Optional[bool]

Expand All @@ -392,7 +395,7 @@ class _UpdateServerRequest:
Placement group ID if Instance must be part of a placement group.
"""

private_nics: Optional[List[PrivateNIC]]
private_nics: Optional[List[str]]
"""
Instance private NICs.
"""
Expand Down
6 changes: 3 additions & 3 deletions scaleway/scaleway/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,12 +741,12 @@ def _update_server(
bootscript: Optional[str] = None,
dynamic_ip_required: Optional[bool] = None,
routed_ip_enabled: Optional[bool] = None,
public_ips: Optional[List[ServerIp]] = None,
public_ips: Optional[List[str]] = None,
enable_ipv6: Optional[bool] = None,
protected: Optional[bool] = None,
security_group: Optional[SecurityGroupTemplate] = None,
placement_group: Optional[str] = None,
private_nics: Optional[List[PrivateNIC]] = None,
private_nics: Optional[List[str]] = None,
commercial_type: Optional[str] = None,
) -> UpdateServerResponse:
"""
Expand All @@ -761,7 +761,7 @@ def _update_server(
:param bootscript:
:param dynamic_ip_required:
:param routed_ip_enabled: True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
:param public_ips:
:param public_ips: A list of reserved IP IDs to attach to the Instance.
:param enable_ipv6:
:param protected:
:param security_group:
Expand Down
14 changes: 8 additions & 6 deletions scaleway/scaleway/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ def unmarshal_ServerIp(data: Any) -> ServerIp:
field = data.get("provisioning_mode", None)
args["provisioning_mode"] = field

field = data.get("tags", None)
args["tags"] = field

return ServerIp(**args)


Expand Down Expand Up @@ -2425,6 +2428,9 @@ def marshal_ServerIp(
request.provisioning_mode
)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down Expand Up @@ -3599,17 +3605,13 @@ def marshal__UpdateServerRequest(
output["placement_group"] = request.placement_group

if request.private_nics is not None:
output["private_nics"] = [
marshal_PrivateNIC(v, defaults) for v in request.private_nics
]
output["private_nics"] = request.private_nics

if request.protected is not None:
output["protected"] = request.protected

if request.public_ips is not None:
output["public_ips"] = [
marshal_ServerIp(v, defaults) for v in request.public_ips
]
output["public_ips"] = request.public_ips

if request.routed_ip_enabled is not None:
output["routed_ip_enabled"] = request.routed_ip_enabled
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ class VolumeVolumeType(str, Enum, metaclass=StrEnumMeta):
UNIFIED = "unified"
SCRATCH = "scratch"
SBS_VOLUME = "sbs_volume"
SBS_SNAPSHOT = "sbs_snapshot"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -1266,6 +1267,11 @@ class ServerIp:
Information about this address provisioning mode.
"""

tags: List[str]
"""
Tags associated with the IP.
"""


@dataclass
class ServerIpv6:
Expand Down
7 changes: 5 additions & 2 deletions scaleway/scaleway/instance/v1/types_private.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,10 @@ class _UpdateServerRequest:
True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
"""

public_ips: Optional[List[ServerIp]]
public_ips: Optional[List[str]]
"""
A list of reserved IP IDs to attach to the Instance.
"""

enable_ipv6: Optional[bool]

Expand All @@ -392,7 +395,7 @@ class _UpdateServerRequest:
Placement group ID if Instance must be part of a placement group.
"""

private_nics: Optional[List[PrivateNIC]]
private_nics: Optional[List[str]]
"""
Instance private NICs.
"""
Expand Down