Skip to content

Commit 6543139

Browse files
authored
feat(instance): return block_bandwidth in bytes per seconds as part of the public ServerType info (#655)
1 parent addb963 commit 6543139

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,12 @@ def unmarshal_ServerType(data: Any) -> ServerType:
22202220
else:
22212221
args["scratch_storage_max_size"] = None
22222222

2223+
field = data.get("block_bandwidth", None)
2224+
if field is not None:
2225+
args["block_bandwidth"] = field
2226+
else:
2227+
args["block_bandwidth"] = None
2228+
22232229
return ServerType(**args)
22242230

22252231

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,11 @@ class ServerType:
14101410
Maximum available scratch storage.
14111411
"""
14121412

1413+
block_bandwidth: Optional[int]
1414+
"""
1415+
The maximum bandwidth allocated to block storage access (in bytes per second).
1416+
"""
1417+
14131418

14141419
@dataclass
14151420
class VolumeType:

scaleway/scaleway/instance/v1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,12 @@ def unmarshal_ServerType(data: Any) -> ServerType:
22202220
else:
22212221
args["scratch_storage_max_size"] = None
22222222

2223+
field = data.get("block_bandwidth", None)
2224+
if field is not None:
2225+
args["block_bandwidth"] = field
2226+
else:
2227+
args["block_bandwidth"] = None
2228+
22232229
return ServerType(**args)
22242230

22252231

scaleway/scaleway/instance/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,11 @@ class ServerType:
14101410
Maximum available scratch storage.
14111411
"""
14121412

1413+
block_bandwidth: Optional[int]
1414+
"""
1415+
The maximum bandwidth allocated to block storage access (in bytes per second).
1416+
"""
1417+
14131418

14141419
@dataclass
14151420
class VolumeType:

0 commit comments

Comments
 (0)