Skip to content

Commit e2f15cc

Browse files
authored
chore(instance): remove field export_uri on the Instance API (#1346)
1 parent 3f01bb4 commit e2f15cc

File tree

4 files changed

+42
-70
lines changed

4 files changed

+42
-70
lines changed

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

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,23 @@ def unmarshal_Volume(data: Any) -> Volume:
377377
else:
378378
args["project"] = None
379379

380-
field = data.get("export_uri", None)
380+
field = data.get("tags", None)
381381
if field is not None:
382-
args["export_uri"] = field
382+
args["tags"] = field
383383
else:
384-
args["export_uri"] = None
384+
args["tags"] = []
385+
386+
field = data.get("state", None)
387+
if field is not None:
388+
args["state"] = field
389+
else:
390+
args["state"] = VolumeState.AVAILABLE
391+
392+
field = data.get("zone", None)
393+
if field is not None:
394+
args["zone"] = field
395+
else:
396+
args["zone"] = None
385397

386398
field = data.get("creation_date", None)
387399
if field is not None:
@@ -399,24 +411,6 @@ def unmarshal_Volume(data: Any) -> Volume:
399411
else:
400412
args["modification_date"] = None
401413

402-
field = data.get("tags", None)
403-
if field is not None:
404-
args["tags"] = field
405-
else:
406-
args["tags"] = []
407-
408-
field = data.get("state", None)
409-
if field is not None:
410-
args["state"] = field
411-
else:
412-
args["state"] = VolumeState.AVAILABLE
413-
414-
field = data.get("zone", None)
415-
if field is not None:
416-
args["zone"] = field
417-
else:
418-
args["zone"] = None
419-
420414
field = data.get("server", None)
421415
if field is not None:
422416
args["server"] = unmarshal_ServerSummary(field)
@@ -4030,15 +4024,6 @@ def marshal_Volume(
40304024
else:
40314025
output["project"] = defaults.default_project_id
40324026

4033-
if request.export_uri is not None:
4034-
output["export_uri"] = request.export_uri
4035-
4036-
if request.creation_date is not None:
4037-
output["creation_date"] = request.creation_date.isoformat()
4038-
4039-
if request.modification_date is not None:
4040-
output["modification_date"] = request.modification_date.isoformat()
4041-
40424027
if request.tags is not None:
40434028
output["tags"] = request.tags
40444029

@@ -4050,6 +4035,12 @@ def marshal_Volume(
40504035
else:
40514036
output["zone"] = defaults.default_zone
40524037

4038+
if request.creation_date is not None:
4039+
output["creation_date"] = request.creation_date.isoformat()
4040+
4041+
if request.modification_date is not None:
4042+
output["modification_date"] = request.modification_date.isoformat()
4043+
40534044
if request.server is not None:
40544045
output["server"] = marshal_ServerSummary(request.server, defaults)
40554046

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ class Volume:
382382
Zone in which the volume is located.
383383
"""
384384

385-
export_uri: Optional[str] = None
386-
"""
387-
Show the volume NBD export URI.
388-
"""
389-
390385
creation_date: Optional[datetime] = None
391386
"""
392387
Volume creation date.

scaleway/scaleway/instance/v1/marshalling.py

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,23 @@ def unmarshal_Volume(data: Any) -> Volume:
377377
else:
378378
args["project"] = None
379379

380-
field = data.get("export_uri", None)
380+
field = data.get("tags", None)
381381
if field is not None:
382-
args["export_uri"] = field
382+
args["tags"] = field
383383
else:
384-
args["export_uri"] = None
384+
args["tags"] = []
385+
386+
field = data.get("state", None)
387+
if field is not None:
388+
args["state"] = field
389+
else:
390+
args["state"] = VolumeState.AVAILABLE
391+
392+
field = data.get("zone", None)
393+
if field is not None:
394+
args["zone"] = field
395+
else:
396+
args["zone"] = None
385397

386398
field = data.get("creation_date", None)
387399
if field is not None:
@@ -399,24 +411,6 @@ def unmarshal_Volume(data: Any) -> Volume:
399411
else:
400412
args["modification_date"] = None
401413

402-
field = data.get("tags", None)
403-
if field is not None:
404-
args["tags"] = field
405-
else:
406-
args["tags"] = []
407-
408-
field = data.get("state", None)
409-
if field is not None:
410-
args["state"] = field
411-
else:
412-
args["state"] = VolumeState.AVAILABLE
413-
414-
field = data.get("zone", None)
415-
if field is not None:
416-
args["zone"] = field
417-
else:
418-
args["zone"] = None
419-
420414
field = data.get("server", None)
421415
if field is not None:
422416
args["server"] = unmarshal_ServerSummary(field)
@@ -4030,15 +4024,6 @@ def marshal_Volume(
40304024
else:
40314025
output["project"] = defaults.default_project_id
40324026

4033-
if request.export_uri is not None:
4034-
output["export_uri"] = request.export_uri
4035-
4036-
if request.creation_date is not None:
4037-
output["creation_date"] = request.creation_date.isoformat()
4038-
4039-
if request.modification_date is not None:
4040-
output["modification_date"] = request.modification_date.isoformat()
4041-
40424027
if request.tags is not None:
40434028
output["tags"] = request.tags
40444029

@@ -4050,6 +4035,12 @@ def marshal_Volume(
40504035
else:
40514036
output["zone"] = defaults.default_zone
40524037

4038+
if request.creation_date is not None:
4039+
output["creation_date"] = request.creation_date.isoformat()
4040+
4041+
if request.modification_date is not None:
4042+
output["modification_date"] = request.modification_date.isoformat()
4043+
40534044
if request.server is not None:
40544045
output["server"] = marshal_ServerSummary(request.server, defaults)
40554046

scaleway/scaleway/instance/v1/types.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ class Volume:
382382
Zone in which the volume is located.
383383
"""
384384

385-
export_uri: Optional[str] = None
386-
"""
387-
Show the volume NBD export URI.
388-
"""
389-
390385
creation_date: Optional[datetime] = None
391386
"""
392387
Volume creation date.

0 commit comments

Comments
 (0)