Skip to content

Commit 121fe1f

Browse files
feat(baremetal): add max_size instead of specific size for partitioning (#908)
Co-authored-by: Laure-di <62625835+Laure-di@users.noreply.github.com>
1 parent cc42544 commit 121fe1f

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ def unmarshal_SchemaPartition(data: Any) -> SchemaPartition:
9191
if field is not None:
9292
args["size"] = field
9393

94+
field = data.get("use_all_available_space", None)
95+
if field is not None:
96+
args["use_all_available_space"] = field
97+
9498
return SchemaPartition(**args)
9599

96100

@@ -1417,6 +1421,9 @@ def marshal_SchemaPartition(
14171421
if request.size is not None:
14181422
output["size"] = request.size
14191423

1424+
if request.use_all_available_space is not None:
1425+
output["use_all_available_space"] = request.use_all_available_space
1426+
14201427
return output
14211428

14221429

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ class SchemaPartition:
225225

226226
size: int
227227

228+
use_all_available_space: bool
229+
228230

229231
@dataclass
230232
class SchemaPool:

scaleway/scaleway/baremetal/v1/marshalling.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ def unmarshal_SchemaPartition(data: Any) -> SchemaPartition:
9191
if field is not None:
9292
args["size"] = field
9393

94+
field = data.get("use_all_available_space", None)
95+
if field is not None:
96+
args["use_all_available_space"] = field
97+
9498
return SchemaPartition(**args)
9599

96100

@@ -1417,6 +1421,9 @@ def marshal_SchemaPartition(
14171421
if request.size is not None:
14181422
output["size"] = request.size
14191423

1424+
if request.use_all_available_space is not None:
1425+
output["use_all_available_space"] = request.use_all_available_space
1426+
14201427
return output
14211428

14221429

scaleway/scaleway/baremetal/v1/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ class SchemaPartition:
225225

226226
size: int
227227

228+
use_all_available_space: bool
229+
228230

229231
@dataclass
230232
class SchemaPool:

0 commit comments

Comments
 (0)