Skip to content

feat(rdb): expose SBS IOPS to clients #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2023
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/rdb/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .types import Permission
from .types import ReadReplicaStatus
from .types import SnapshotStatus
from .types import StorageClass
from .types import VolumeType
from .types import ACLRule
from .types import ACLRuleRequest
Expand Down Expand Up @@ -104,6 +105,7 @@
"Permission",
"ReadReplicaStatus",
"SnapshotStatus",
"StorageClass",
"VolumeType",
"ACLRule",
"ACLRuleRequest",
Expand Down
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType:
field = data.get("chunk_size", None)
args["chunk_size"] = field

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

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

Expand Down Expand Up @@ -446,6 +449,9 @@ def unmarshal_Volume(data: Any) -> Volume:

args: Dict[str, Any] = {}

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

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

Expand Down
20 changes: 19 additions & 1 deletion scaleway-async/scaleway_async/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def __str__(self) -> str:
return str(self.value)


class VolumeType(str, Enum, metaclass=StrEnumMeta):
class StorageClass(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STORAGE_CLASS = "unknown_storage_class"
LSSD = "lssd"
BSSD = "bssd"
SBS = "sbs"
Expand All @@ -251,6 +252,16 @@ def __str__(self) -> str:
return str(self.value)


class VolumeType(str, Enum, metaclass=StrEnumMeta):
LSSD = "lssd"
BSSD = "bssd"
SBS_5K = "sbs_5k"
SBS_15K = "sbs_15k"

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


@dataclass
class ACLRule:
ip: str
Expand Down Expand Up @@ -1271,6 +1282,11 @@ class NodeTypeVolumeType:
Minimum increment level for a Block Storage volume size.
"""

class_: StorageClass
"""
The storage class of the volume.
"""


@dataclass
class PrepareInstanceLogsResponse:
Expand Down Expand Up @@ -1515,6 +1531,8 @@ class Volume:

size: int

class_: StorageClass


@dataclass
class ListDatabaseEnginesRequest:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/rdb/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .types import Permission
from .types import ReadReplicaStatus
from .types import SnapshotStatus
from .types import StorageClass
from .types import VolumeType
from .types import ACLRule
from .types import ACLRuleRequest
Expand Down Expand Up @@ -104,6 +105,7 @@
"Permission",
"ReadReplicaStatus",
"SnapshotStatus",
"StorageClass",
"VolumeType",
"ACLRule",
"ACLRuleRequest",
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType:
field = data.get("chunk_size", None)
args["chunk_size"] = field

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

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

Expand Down Expand Up @@ -446,6 +449,9 @@ def unmarshal_Volume(data: Any) -> Volume:

args: Dict[str, Any] = {}

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

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

Expand Down
20 changes: 19 additions & 1 deletion scaleway/scaleway/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def __str__(self) -> str:
return str(self.value)


class VolumeType(str, Enum, metaclass=StrEnumMeta):
class StorageClass(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STORAGE_CLASS = "unknown_storage_class"
LSSD = "lssd"
BSSD = "bssd"
SBS = "sbs"
Expand All @@ -251,6 +252,16 @@ def __str__(self) -> str:
return str(self.value)


class VolumeType(str, Enum, metaclass=StrEnumMeta):
LSSD = "lssd"
BSSD = "bssd"
SBS_5K = "sbs_5k"
SBS_15K = "sbs_15k"

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


@dataclass
class ACLRule:
ip: str
Expand Down Expand Up @@ -1271,6 +1282,11 @@ class NodeTypeVolumeType:
Minimum increment level for a Block Storage volume size.
"""

class_: StorageClass
"""
The storage class of the volume.
"""


@dataclass
class PrepareInstanceLogsResponse:
Expand Down Expand Up @@ -1515,6 +1531,8 @@ class Volume:

size: int

class_: StorageClass


@dataclass
class ListDatabaseEnginesRequest:
Expand Down