From 3c3e0efc3f77448c53aaf26d308955ae75b2fdae Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 25 Aug 2026 13:11:24 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../scaleway_async/k8s/v1/__init__.py | 2 ++ .../scaleway_async/k8s/v1/marshalling.py | 28 +++++++++++++++++++ scaleway-async/scaleway_async/k8s/v1/types.py | 14 +++++++--- .../scaleway_async/mongodb/v1/api.py | 2 +- .../scaleway_async/mongodb/v1/types.py | 4 +++ scaleway/scaleway/k8s/v1/__init__.py | 2 ++ scaleway/scaleway/k8s/v1/marshalling.py | 28 +++++++++++++++++++ scaleway/scaleway/k8s/v1/types.py | 14 +++++++--- scaleway/scaleway/mongodb/v1/api.py | 2 +- scaleway/scaleway/mongodb/v1/types.py | 4 +++ 10 files changed, 90 insertions(+), 10 deletions(-) diff --git a/scaleway-async/scaleway_async/k8s/v1/__init__.py b/scaleway-async/scaleway_async/k8s/v1/__init__.py index c62adde16..b3e69abe7 100644 --- a/scaleway-async/scaleway_async/k8s/v1/__init__.py +++ b/scaleway-async/scaleway_async/k8s/v1/__init__.py @@ -21,6 +21,7 @@ from .types import MaintenanceWindow from .types import CoreV1Taint from .types import CreateClusterRequestPoolConfigUpgradePolicy +from .types import ComponentInfo from .types import ClusterAutoUpgrade from .types import ClusterAutoscalerConfig from .types import ClusterOpenIDConnectConfig @@ -113,6 +114,7 @@ "MaintenanceWindow", "CoreV1Taint", "CreateClusterRequestPoolConfigUpgradePolicy", + "ComponentInfo", "ClusterAutoUpgrade", "ClusterAutoscalerConfig", "ClusterOpenIDConnectConfig", diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index e39e13480..5587b459e 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -22,6 +22,7 @@ PoolStatus, PoolVolumeType, Runtime, + ComponentInfo, Version, MaintenanceWindow, ClusterAutoUpgrade, @@ -73,6 +74,23 @@ ) +def unmarshal_ComponentInfo(data: Any) -> ComponentInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ComponentInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("version", None) + if field is not None: + args["version"] = field + else: + args["version"] = None + + return ComponentInfo(**args) + + def unmarshal_Version(data: Any) -> Version: if not isinstance(data, dict): raise TypeError( @@ -131,6 +149,16 @@ def unmarshal_Version(data: Any) -> Version: else: args["available_kubelet_args"] = {} + field = data.get("additional_components", None) + if field is not None: + args["additional_components"] = ( + {key: unmarshal_ComponentInfo(value) for key, value in field.items()} + if field is not None + else None + ) + else: + args["additional_components"] = {} + field = data.get("deprecated_at", None) if field is not None: args["deprecated_at"] = ( diff --git a/scaleway-async/scaleway_async/k8s/v1/types.py b/scaleway-async/scaleway_async/k8s/v1/types.py index 177043f22..6bb6affd0 100644 --- a/scaleway-async/scaleway_async/k8s/v1/types.py +++ b/scaleway-async/scaleway_async/k8s/v1/types.py @@ -40,8 +40,6 @@ class CNI(str, Enum, metaclass=StrEnumMeta): UNKNOWN_CNI = "unknown_cni" CILIUM = "cilium" CALICO = "calico" - WEAVE = "weave" - FLANNEL = "flannel" KILO = "kilo" NONE = "none" CILIUM_NATIVE = "cilium_native" @@ -198,9 +196,7 @@ def __str__(self) -> str: class Runtime(str, Enum, metaclass=StrEnumMeta): UNKNOWN_RUNTIME = "unknown_runtime" - DOCKER = "docker" CONTAINERD = "containerd" - CRIO = "crio" def __str__(self) -> str: return str(self.value) @@ -254,6 +250,11 @@ class CreateClusterRequestPoolConfigUpgradePolicy: """ +@dataclass +class ComponentInfo: + version: str + + @dataclass class ClusterAutoUpgrade: enabled: bool @@ -753,6 +754,11 @@ class Version: Supported kubelet arguments for this version. """ + additional_components: dict[str, ComponentInfo] + """ + Map containing every sub-component version shipped with this Kapsule version. + """ + deprecated_at: Optional[datetime] = None """ Date from which this version will no longer be available for provisioning. diff --git a/scaleway-async/scaleway_async/mongodb/v1/api.py b/scaleway-async/scaleway_async/mongodb/v1/api.py index b8413dbf8..2555c5f59 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/api.py +++ b/scaleway-async/scaleway_async/mongodb/v1/api.py @@ -1612,7 +1612,7 @@ async def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: + :param maintenance_id: ID of the maintenance. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway-async/scaleway_async/mongodb/v1/types.py b/scaleway-async/scaleway_async/mongodb/v1/types.py index 13f1094d6..6064b29b7 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/types.py +++ b/scaleway-async/scaleway_async/mongodb/v1/types.py @@ -589,6 +589,10 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str + """ + ID of the maintenance. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. diff --git a/scaleway/scaleway/k8s/v1/__init__.py b/scaleway/scaleway/k8s/v1/__init__.py index c62adde16..b3e69abe7 100644 --- a/scaleway/scaleway/k8s/v1/__init__.py +++ b/scaleway/scaleway/k8s/v1/__init__.py @@ -21,6 +21,7 @@ from .types import MaintenanceWindow from .types import CoreV1Taint from .types import CreateClusterRequestPoolConfigUpgradePolicy +from .types import ComponentInfo from .types import ClusterAutoUpgrade from .types import ClusterAutoscalerConfig from .types import ClusterOpenIDConnectConfig @@ -113,6 +114,7 @@ "MaintenanceWindow", "CoreV1Taint", "CreateClusterRequestPoolConfigUpgradePolicy", + "ComponentInfo", "ClusterAutoUpgrade", "ClusterAutoscalerConfig", "ClusterOpenIDConnectConfig", diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index e39e13480..5587b459e 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -22,6 +22,7 @@ PoolStatus, PoolVolumeType, Runtime, + ComponentInfo, Version, MaintenanceWindow, ClusterAutoUpgrade, @@ -73,6 +74,23 @@ ) +def unmarshal_ComponentInfo(data: Any) -> ComponentInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ComponentInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("version", None) + if field is not None: + args["version"] = field + else: + args["version"] = None + + return ComponentInfo(**args) + + def unmarshal_Version(data: Any) -> Version: if not isinstance(data, dict): raise TypeError( @@ -131,6 +149,16 @@ def unmarshal_Version(data: Any) -> Version: else: args["available_kubelet_args"] = {} + field = data.get("additional_components", None) + if field is not None: + args["additional_components"] = ( + {key: unmarshal_ComponentInfo(value) for key, value in field.items()} + if field is not None + else None + ) + else: + args["additional_components"] = {} + field = data.get("deprecated_at", None) if field is not None: args["deprecated_at"] = ( diff --git a/scaleway/scaleway/k8s/v1/types.py b/scaleway/scaleway/k8s/v1/types.py index 177043f22..6bb6affd0 100644 --- a/scaleway/scaleway/k8s/v1/types.py +++ b/scaleway/scaleway/k8s/v1/types.py @@ -40,8 +40,6 @@ class CNI(str, Enum, metaclass=StrEnumMeta): UNKNOWN_CNI = "unknown_cni" CILIUM = "cilium" CALICO = "calico" - WEAVE = "weave" - FLANNEL = "flannel" KILO = "kilo" NONE = "none" CILIUM_NATIVE = "cilium_native" @@ -198,9 +196,7 @@ def __str__(self) -> str: class Runtime(str, Enum, metaclass=StrEnumMeta): UNKNOWN_RUNTIME = "unknown_runtime" - DOCKER = "docker" CONTAINERD = "containerd" - CRIO = "crio" def __str__(self) -> str: return str(self.value) @@ -254,6 +250,11 @@ class CreateClusterRequestPoolConfigUpgradePolicy: """ +@dataclass +class ComponentInfo: + version: str + + @dataclass class ClusterAutoUpgrade: enabled: bool @@ -753,6 +754,11 @@ class Version: Supported kubelet arguments for this version. """ + additional_components: dict[str, ComponentInfo] + """ + Map containing every sub-component version shipped with this Kapsule version. + """ + deprecated_at: Optional[datetime] = None """ Date from which this version will no longer be available for provisioning. diff --git a/scaleway/scaleway/mongodb/v1/api.py b/scaleway/scaleway/mongodb/v1/api.py index 787aa332e..e57170e4d 100644 --- a/scaleway/scaleway/mongodb/v1/api.py +++ b/scaleway/scaleway/mongodb/v1/api.py @@ -1606,7 +1606,7 @@ def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: + :param maintenance_id: ID of the maintenance. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway/scaleway/mongodb/v1/types.py b/scaleway/scaleway/mongodb/v1/types.py index 13f1094d6..6064b29b7 100644 --- a/scaleway/scaleway/mongodb/v1/types.py +++ b/scaleway/scaleway/mongodb/v1/types.py @@ -589,6 +589,10 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str + """ + ID of the maintenance. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. From 2738b187fd0f4c86319036739e795dabea7640d5 Mon Sep 17 00:00:00 2001 From: Geoffrey JOUNT Date: Tue, 25 Aug 2026 15:30:26 +0200 Subject: [PATCH 2/2] revert mongo changes --- scaleway-async/scaleway_async/mongodb/v1/api.py | 2 +- scaleway-async/scaleway_async/mongodb/v1/types.py | 4 ---- scaleway/scaleway/mongodb/v1/api.py | 2 +- scaleway/scaleway/mongodb/v1/types.py | 4 ---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/scaleway-async/scaleway_async/mongodb/v1/api.py b/scaleway-async/scaleway_async/mongodb/v1/api.py index 2555c5f59..b8413dbf8 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/api.py +++ b/scaleway-async/scaleway_async/mongodb/v1/api.py @@ -1612,7 +1612,7 @@ async def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: ID of the maintenance. + :param maintenance_id: :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway-async/scaleway_async/mongodb/v1/types.py b/scaleway-async/scaleway_async/mongodb/v1/types.py index 6064b29b7..13f1094d6 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/types.py +++ b/scaleway-async/scaleway_async/mongodb/v1/types.py @@ -589,10 +589,6 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str - """ - ID of the maintenance. - """ - region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. diff --git a/scaleway/scaleway/mongodb/v1/api.py b/scaleway/scaleway/mongodb/v1/api.py index e57170e4d..787aa332e 100644 --- a/scaleway/scaleway/mongodb/v1/api.py +++ b/scaleway/scaleway/mongodb/v1/api.py @@ -1606,7 +1606,7 @@ def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: ID of the maintenance. + :param maintenance_id: :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway/scaleway/mongodb/v1/types.py b/scaleway/scaleway/mongodb/v1/types.py index 6064b29b7..13f1094d6 100644 --- a/scaleway/scaleway/mongodb/v1/types.py +++ b/scaleway/scaleway/mongodb/v1/types.py @@ -589,10 +589,6 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str - """ - ID of the maintenance. - """ - region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config.