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
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/baremetal/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .types import ListServerPrivateNetworksRequestOrderBy
from .types import ListServersRequestOrderBy
from .types import ListSettingsRequestOrderBy
from .types import MemoryEccType
from .types import OfferStock
from .types import OfferSubscriptionPeriod
from .types import SchemaFilesystemFormat
Expand Down Expand Up @@ -109,6 +110,7 @@
"ListServerPrivateNetworksRequestOrderBy",
"ListServersRequestOrderBy",
"ListSettingsRequestOrderBy",
"MemoryEccType",
"OfferStock",
"OfferSubscriptionPeriod",
"SchemaFilesystemFormat",
Expand Down
7 changes: 7 additions & 0 deletions scaleway-async/scaleway_async/baremetal/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .types import (
IPReverseStatus,
IPVersion,
MemoryEccType,
OfferStock,
OfferSubscriptionPeriod,
ServerBootType,
Expand Down Expand Up @@ -974,6 +975,12 @@ def unmarshal_Memory(data: Any) -> Memory:
else:
args["is_ecc"] = False

field = data.get("ecc_type", None)
if field is not None:
args["ecc_type"] = field
else:
args["ecc_type"] = MemoryEccType.UNKNOWN_ECC_TYPE

return Memory(**args)


Expand Down
15 changes: 15 additions & 0 deletions scaleway-async/scaleway_async/baremetal/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ def __str__(self) -> str:
return str(self.value)


class MemoryEccType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ECC_TYPE = "unknown_ecc_type"
NONE = "none"
STANDARD = "standard"
ON_DIE = "on_die"

def __str__(self) -> str:
return str(self.value)


class OfferStock(str, Enum, metaclass=StrEnumMeta):
EMPTY = "empty"
LOW = "low"
Expand Down Expand Up @@ -546,6 +556,11 @@ class Memory:
True if the memory is an error-correcting code memory.
"""

ecc_type: MemoryEccType
"""
Type of ECC memory.
"""


@dataclass
class OfferOptionOffer:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/baremetal/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .types import ListServerPrivateNetworksRequestOrderBy
from .types import ListServersRequestOrderBy
from .types import ListSettingsRequestOrderBy
from .types import MemoryEccType
from .types import OfferStock
from .types import OfferSubscriptionPeriod
from .types import SchemaFilesystemFormat
Expand Down Expand Up @@ -109,6 +110,7 @@
"ListServerPrivateNetworksRequestOrderBy",
"ListServersRequestOrderBy",
"ListSettingsRequestOrderBy",
"MemoryEccType",
"OfferStock",
"OfferSubscriptionPeriod",
"SchemaFilesystemFormat",
Expand Down
7 changes: 7 additions & 0 deletions scaleway/scaleway/baremetal/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .types import (
IPReverseStatus,
IPVersion,
MemoryEccType,
OfferStock,
OfferSubscriptionPeriod,
ServerBootType,
Expand Down Expand Up @@ -974,6 +975,12 @@ def unmarshal_Memory(data: Any) -> Memory:
else:
args["is_ecc"] = False

field = data.get("ecc_type", None)
if field is not None:
args["ecc_type"] = field
else:
args["ecc_type"] = MemoryEccType.UNKNOWN_ECC_TYPE

return Memory(**args)


Expand Down
15 changes: 15 additions & 0 deletions scaleway/scaleway/baremetal/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ def __str__(self) -> str:
return str(self.value)


class MemoryEccType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ECC_TYPE = "unknown_ecc_type"
NONE = "none"
STANDARD = "standard"
ON_DIE = "on_die"

def __str__(self) -> str:
return str(self.value)


class OfferStock(str, Enum, metaclass=StrEnumMeta):
EMPTY = "empty"
LOW = "low"
Expand Down Expand Up @@ -546,6 +556,11 @@ class Memory:
True if the memory is an error-correcting code memory.
"""

ecc_type: MemoryEccType
"""
Type of ECC memory.
"""


@dataclass
class OfferOptionOffer:
Expand Down
Loading