From 6f1c8b93f5b8c2cf647ed353c74acc57f1e2e835 Mon Sep 17 00:00:00 2001 From: Estelle Soulard Date: Fri, 27 Mar 2026 09:52:08 +0100 Subject: [PATCH] chore(k8s): handle deprecated_optional fields --- scaleway-async/scaleway_async/k8s/v1/marshalling.py | 12 ++++++------ scaleway-async/scaleway_async/k8s/v1/types.py | 10 +++++----- scaleway/scaleway/k8s/v1/marshalling.py | 12 ++++++------ scaleway/scaleway/k8s/v1/types.py | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index c7ba7bf54..0830dc7a4 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -470,12 +470,6 @@ def unmarshal_Cluster(data: Any) -> Cluster: else: args["apiserver_cert_sans"] = [] - field = data.get("acl_available", None) - if field is not None: - args["acl_available"] = field - else: - args["acl_available"] = False - field = data.get("iam_nodes_group_id", None) if field is not None: args["iam_nodes_group_id"] = field @@ -514,6 +508,12 @@ def unmarshal_Cluster(data: Any) -> Cluster: else: args["commitment_ends_at"] = None + field = data.get("acl_available", None) + if field is not None: + args["acl_available"] = field + else: + args["acl_available"] = None + return Cluster(**args) diff --git a/scaleway-async/scaleway_async/k8s/v1/types.py b/scaleway-async/scaleway_async/k8s/v1/types.py index ef2d2a05d..1e040124f 100644 --- a/scaleway-async/scaleway_async/k8s/v1/types.py +++ b/scaleway-async/scaleway_async/k8s/v1/types.py @@ -814,11 +814,6 @@ class Cluster: Additional Subject Alternative Names for the Kubernetes API server certificate. """ - acl_available: bool - """ - Defines whether ACL is available on the cluster. - """ - iam_nodes_group_id: str """ IAM group that nodes are members of (this field might be empty during early stage of cluster creation). @@ -874,6 +869,11 @@ class Cluster: Date on which it will be possible to switch to a smaller offer. """ + acl_available: Optional[bool] = None + """ + Defines whether ACL is available on the cluster. + """ + @dataclass class Node: diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index c7ba7bf54..0830dc7a4 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -470,12 +470,6 @@ def unmarshal_Cluster(data: Any) -> Cluster: else: args["apiserver_cert_sans"] = [] - field = data.get("acl_available", None) - if field is not None: - args["acl_available"] = field - else: - args["acl_available"] = False - field = data.get("iam_nodes_group_id", None) if field is not None: args["iam_nodes_group_id"] = field @@ -514,6 +508,12 @@ def unmarshal_Cluster(data: Any) -> Cluster: else: args["commitment_ends_at"] = None + field = data.get("acl_available", None) + if field is not None: + args["acl_available"] = field + else: + args["acl_available"] = None + return Cluster(**args) diff --git a/scaleway/scaleway/k8s/v1/types.py b/scaleway/scaleway/k8s/v1/types.py index ef2d2a05d..1e040124f 100644 --- a/scaleway/scaleway/k8s/v1/types.py +++ b/scaleway/scaleway/k8s/v1/types.py @@ -814,11 +814,6 @@ class Cluster: Additional Subject Alternative Names for the Kubernetes API server certificate. """ - acl_available: bool - """ - Defines whether ACL is available on the cluster. - """ - iam_nodes_group_id: str """ IAM group that nodes are members of (this field might be empty during early stage of cluster creation). @@ -874,6 +869,11 @@ class Cluster: Date on which it will be possible to switch to a smaller offer. """ + acl_available: Optional[bool] = None + """ + Defines whether ACL is available on the cluster. + """ + @dataclass class Node: