Skip to content

Commit 85b2d92

Browse files
authored
feat(baremetal): add tags and private/shared bandwidth (#59)
1 parent 6fe0d98 commit 85b2d92

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ def unmarshal_Offer(data: Any) -> Offer:
416416
field = data.get("price_per_month")
417417
args["price_per_month"] = unmarshal_Money(field) if field is not None else None
418418

419+
field = data.get("private_bandwidth")
420+
args["private_bandwidth"] = field
421+
419422
field = data.get("quota_name")
420423
args["quota_name"] = field
421424

@@ -424,12 +427,18 @@ def unmarshal_Offer(data: Any) -> Offer:
424427
unmarshal_RaidController(v) for v in data["raid_controllers"]
425428
]
426429

430+
field = data.get("shared_bandwidth")
431+
args["shared_bandwidth"] = field
432+
427433
field = data.get("stock")
428434
args["stock"] = field
429435

430436
field = data.get("subscription_period")
431437
args["subscription_period"] = field
432438

439+
field = data.get("tags")
440+
args["tags"] = field
441+
433442
return Offer(**args)
434443

435444

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class Offer:
559559

560560
bandwidth: int
561561
"""
562-
Bandwidth available in bits/s with the offer
562+
Public Bandwidth available in bits/s with the offer
563563
"""
564564

565565
commercial_range: str
@@ -637,6 +637,21 @@ class Offer:
637637
Options available on offer
638638
"""
639639

640+
private_bandwidth: int
641+
"""
642+
Private bandwidth available in bits/s with the offer
643+
"""
644+
645+
shared_bandwidth: bool
646+
"""
647+
The offer is shared or not
648+
"""
649+
650+
tags: List[str]
651+
"""
652+
Array of tags attached to the offer
653+
"""
654+
640655

641656
@dataclass
642657
class OfferOptionOffer:

scaleway/scaleway/baremetal/v1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ def unmarshal_Offer(data: Any) -> Offer:
416416
field = data.get("price_per_month")
417417
args["price_per_month"] = unmarshal_Money(field) if field is not None else None
418418

419+
field = data.get("private_bandwidth")
420+
args["private_bandwidth"] = field
421+
419422
field = data.get("quota_name")
420423
args["quota_name"] = field
421424

@@ -424,12 +427,18 @@ def unmarshal_Offer(data: Any) -> Offer:
424427
unmarshal_RaidController(v) for v in data["raid_controllers"]
425428
]
426429

430+
field = data.get("shared_bandwidth")
431+
args["shared_bandwidth"] = field
432+
427433
field = data.get("stock")
428434
args["stock"] = field
429435

430436
field = data.get("subscription_period")
431437
args["subscription_period"] = field
432438

439+
field = data.get("tags")
440+
args["tags"] = field
441+
433442
return Offer(**args)
434443

435444

scaleway/scaleway/baremetal/v1/types.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ class Offer:
559559

560560
bandwidth: int
561561
"""
562-
Bandwidth available in bits/s with the offer
562+
Public Bandwidth available in bits/s with the offer
563563
"""
564564

565565
commercial_range: str
@@ -637,6 +637,21 @@ class Offer:
637637
Options available on offer
638638
"""
639639

640+
private_bandwidth: int
641+
"""
642+
Private bandwidth available in bits/s with the offer
643+
"""
644+
645+
shared_bandwidth: bool
646+
"""
647+
The offer is shared or not
648+
"""
649+
650+
tags: List[str]
651+
"""
652+
Array of tags attached to the offer
653+
"""
654+
640655

641656
@dataclass
642657
class OfferOptionOffer:

0 commit comments

Comments
 (0)