Skip to content

Commit f252426

Browse files
authored
feat(versions): add field upgradable_versions (#24)
1 parent 8c8ae5b commit f252426

File tree

4 files changed

+16
-52
lines changed

4 files changed

+16
-52
lines changed

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

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ def unmarshal_Cluster(data: Any) -> Cluster:
230230
field = data.get("updated_at")
231231
args["updated_at"] = parser.isoparse(field) if type(field) is str else field
232232

233+
field = data.get("upgradable_versions")
234+
args["upgradable_versions"] = field
235+
233236
field = data.get("user_name")
234237
args["user_name"] = field
235238

@@ -494,12 +497,6 @@ def marshal_EndpointSpec(
494497
OneOfPossibility("public_network", request.public_network),
495498
]
496499
),
497-
**resolve_one_of(
498-
[
499-
OneOfPossibility("private_network", request.private_network),
500-
OneOfPossibility("public_network", request.public_network),
501-
]
502-
),
503500
}
504501

505502

@@ -570,20 +567,6 @@ def marshal_MigrateClusterRequest(
570567
OneOfPossibility("cluster_size", request.cluster_size),
571568
]
572569
),
573-
**resolve_one_of(
574-
[
575-
OneOfPossibility("version", request.version),
576-
OneOfPossibility("node_type", request.node_type),
577-
OneOfPossibility("cluster_size", request.cluster_size),
578-
]
579-
),
580-
**resolve_one_of(
581-
[
582-
OneOfPossibility("version", request.version),
583-
OneOfPossibility("node_type", request.node_type),
584-
OneOfPossibility("cluster_size", request.cluster_size),
585-
]
586-
),
587570
}
588571

589572

@@ -637,10 +620,4 @@ def marshal_UpdateEndpointRequest(
637620
OneOfPossibility("public_network", request.public_network),
638621
]
639622
),
640-
**resolve_one_of(
641-
[
642-
OneOfPossibility("private_network", request.private_network),
643-
OneOfPossibility("public_network", request.public_network),
644-
]
645-
),
646623
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ class Cluster:
265265
Name of the user associated to the cluster
266266
"""
267267

268+
upgradable_versions: List[str]
269+
"""
270+
List of versions the cluster can be migrated to
271+
"""
272+
268273

269274
@dataclass
270275
class ClusterMetricsResponse:

scaleway/scaleway/redis/v1/marshalling.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ def unmarshal_Cluster(data: Any) -> Cluster:
230230
field = data.get("updated_at")
231231
args["updated_at"] = parser.isoparse(field) if type(field) is str else field
232232

233+
field = data.get("upgradable_versions")
234+
args["upgradable_versions"] = field
235+
233236
field = data.get("user_name")
234237
args["user_name"] = field
235238

@@ -494,12 +497,6 @@ def marshal_EndpointSpec(
494497
OneOfPossibility("public_network", request.public_network),
495498
]
496499
),
497-
**resolve_one_of(
498-
[
499-
OneOfPossibility("private_network", request.private_network),
500-
OneOfPossibility("public_network", request.public_network),
501-
]
502-
),
503500
}
504501

505502

@@ -570,20 +567,6 @@ def marshal_MigrateClusterRequest(
570567
OneOfPossibility("cluster_size", request.cluster_size),
571568
]
572569
),
573-
**resolve_one_of(
574-
[
575-
OneOfPossibility("version", request.version),
576-
OneOfPossibility("node_type", request.node_type),
577-
OneOfPossibility("cluster_size", request.cluster_size),
578-
]
579-
),
580-
**resolve_one_of(
581-
[
582-
OneOfPossibility("version", request.version),
583-
OneOfPossibility("node_type", request.node_type),
584-
OneOfPossibility("cluster_size", request.cluster_size),
585-
]
586-
),
587570
}
588571

589572

@@ -637,10 +620,4 @@ def marshal_UpdateEndpointRequest(
637620
OneOfPossibility("public_network", request.public_network),
638621
]
639622
),
640-
**resolve_one_of(
641-
[
642-
OneOfPossibility("private_network", request.private_network),
643-
OneOfPossibility("public_network", request.public_network),
644-
]
645-
),
646623
}

scaleway/scaleway/redis/v1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ class Cluster:
265265
Name of the user associated to the cluster
266266
"""
267267

268+
upgradable_versions: List[str]
269+
"""
270+
List of versions the cluster can be migrated to
271+
"""
272+
268273

269274
@dataclass
270275
class ClusterMetricsResponse:

0 commit comments

Comments
 (0)