Skip to content

Commit 191aadc

Browse files
feat(dedibox): add a is_hds flag for ddx2elts servers (#990)
Co-authored-by: Laure-di <62625835+Laure-di@users.noreply.github.com>
1 parent 6438ce4 commit 191aadc

File tree

4 files changed

+34
-16
lines changed

4 files changed

+34
-16
lines changed

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ def unmarshal_Server(data: Any) -> Server:
10891089
if field is not None:
10901090
args["hostname"] = field
10911091

1092+
field = data.get("status", None)
1093+
if field is not None:
1094+
args["status"] = field
1095+
10921096
field = data.get("rebooted_at", None)
10931097
if field is not None:
10941098
args["rebooted_at"] = (
@@ -1097,10 +1101,6 @@ def unmarshal_Server(data: Any) -> Server:
10971101
else:
10981102
args["rebooted_at"] = None
10991103

1100-
field = data.get("status", None)
1101-
if field is not None:
1102-
args["status"] = field
1103-
11041104
field = data.get("abuse_contact", None)
11051105
if field is not None:
11061106
args["abuse_contact"] = field
@@ -1147,6 +1147,10 @@ def unmarshal_Server(data: Any) -> Server:
11471147
if field is not None:
11481148
args["is_rpnv2_member"] = field
11491149

1150+
field = data.get("is_hds", None)
1151+
if field is not None:
1152+
args["is_hds"] = field
1153+
11501154
field = data.get("created_at", None)
11511155
if field is not None:
11521156
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

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

+9-4
Original file line numberDiff line numberDiff line change
@@ -1146,14 +1146,14 @@ class Server:
11461146
Hostname of the server.
11471147
"""
11481148

1149-
rebooted_at: Optional[datetime]
1149+
status: ServerStatus
11501150
"""
1151-
Date of last reboot of the server.
1151+
Status of the server.
11521152
"""
11531153

1154-
status: ServerStatus
1154+
rebooted_at: Optional[datetime]
11551155
"""
1156-
Status of the server.
1156+
Date of last reboot of the server.
11571157
"""
11581158

11591159
abuse_contact: str
@@ -1206,6 +1206,11 @@ class Server:
12061206
Whether or not the server is already part of an rpnv2 group.
12071207
"""
12081208

1209+
is_hds: bool
1210+
"""
1211+
Whether or not the server is HDS.
1212+
"""
1213+
12091214
created_at: Optional[datetime]
12101215
"""
12111216
Date of creation of the server.

scaleway/scaleway/dedibox/v1/marshalling.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ def unmarshal_Server(data: Any) -> Server:
10891089
if field is not None:
10901090
args["hostname"] = field
10911091

1092+
field = data.get("status", None)
1093+
if field is not None:
1094+
args["status"] = field
1095+
10921096
field = data.get("rebooted_at", None)
10931097
if field is not None:
10941098
args["rebooted_at"] = (
@@ -1097,10 +1101,6 @@ def unmarshal_Server(data: Any) -> Server:
10971101
else:
10981102
args["rebooted_at"] = None
10991103

1100-
field = data.get("status", None)
1101-
if field is not None:
1102-
args["status"] = field
1103-
11041104
field = data.get("abuse_contact", None)
11051105
if field is not None:
11061106
args["abuse_contact"] = field
@@ -1147,6 +1147,10 @@ def unmarshal_Server(data: Any) -> Server:
11471147
if field is not None:
11481148
args["is_rpnv2_member"] = field
11491149

1150+
field = data.get("is_hds", None)
1151+
if field is not None:
1152+
args["is_hds"] = field
1153+
11501154
field = data.get("created_at", None)
11511155
if field is not None:
11521156
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field

scaleway/scaleway/dedibox/v1/types.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -1146,14 +1146,14 @@ class Server:
11461146
Hostname of the server.
11471147
"""
11481148

1149-
rebooted_at: Optional[datetime]
1149+
status: ServerStatus
11501150
"""
1151-
Date of last reboot of the server.
1151+
Status of the server.
11521152
"""
11531153

1154-
status: ServerStatus
1154+
rebooted_at: Optional[datetime]
11551155
"""
1156-
Status of the server.
1156+
Date of last reboot of the server.
11571157
"""
11581158

11591159
abuse_contact: str
@@ -1206,6 +1206,11 @@ class Server:
12061206
Whether or not the server is already part of an rpnv2 group.
12071207
"""
12081208

1209+
is_hds: bool
1210+
"""
1211+
Whether or not the server is HDS.
1212+
"""
1213+
12091214
created_at: Optional[datetime]
12101215
"""
12111216
Date of creation of the server.

0 commit comments

Comments
 (0)