File tree 6 files changed +100
-0
lines changed
scaleway-async/scaleway_async/k8s/v1 6 files changed +100
-0
lines changed Original file line number Diff line number Diff line change 69
69
from .types import ListVersionsRequest
70
70
from .types import ListVersionsResponse
71
71
from .types import MigrateClusterToRoutedIPsRequest
72
+ from .types import MigrateClusterToSBSCSIRequest
72
73
from .types import NodeMetadata
73
74
from .types import RebootNodeRequest
74
75
from .types import ReplaceNodeRequest
150
151
"ListVersionsRequest" ,
151
152
"ListVersionsResponse" ,
152
153
"MigrateClusterToRoutedIPsRequest" ,
154
+ "MigrateClusterToSBSCSIRequest" ,
153
155
"NodeMetadata" ,
154
156
"RebootNodeRequest" ,
155
157
"ReplaceNodeRequest" ,
Original file line number Diff line number Diff line change @@ -749,6 +749,41 @@ async def migrate_cluster_to_routed_i_ps(
749
749
self ._throw_on_error (res )
750
750
return unmarshal_Cluster (res .json ())
751
751
752
+ async def migrate_cluster_to_sbscsi (
753
+ self ,
754
+ * ,
755
+ cluster_id : str ,
756
+ region : Optional [Region ] = None ,
757
+ ) -> Cluster :
758
+ """
759
+ Migrate a cluster to SBS CSI.
760
+ Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
761
+ :param cluster_id: Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
762
+ :param region: Region to target. If none is passed will use default region from the config.
763
+ :return: :class:`Cluster <Cluster>`
764
+
765
+ Usage:
766
+ ::
767
+
768
+ result = await api.migrate_cluster_to_sbscsi(
769
+ cluster_id="example",
770
+ )
771
+ """
772
+
773
+ param_region = validate_path_param (
774
+ "region" , region or self .client .default_region
775
+ )
776
+ param_cluster_id = validate_path_param ("cluster_id" , cluster_id )
777
+
778
+ res = self ._request (
779
+ "POST" ,
780
+ f"/k8s/v1/regions/{ param_region } /clusters/{ param_cluster_id } /migrate-to-sbs-csi" ,
781
+ body = {},
782
+ )
783
+
784
+ self ._throw_on_error (res )
785
+ return unmarshal_Cluster (res .json ())
786
+
752
787
async def list_pools (
753
788
self ,
754
789
* ,
Original file line number Diff line number Diff line change @@ -1707,6 +1707,19 @@ class MigrateClusterToRoutedIPsRequest:
1707
1707
"""
1708
1708
1709
1709
1710
+ @dataclass
1711
+ class MigrateClusterToSBSCSIRequest :
1712
+ cluster_id : str
1713
+ """
1714
+ Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
1715
+ """
1716
+
1717
+ region : Optional [Region ]
1718
+ """
1719
+ Region to target. If none is passed will use default region from the config.
1720
+ """
1721
+
1722
+
1710
1723
@dataclass
1711
1724
class NodeMetadata :
1712
1725
id : str
Original file line number Diff line number Diff line change 69
69
from .types import ListVersionsRequest
70
70
from .types import ListVersionsResponse
71
71
from .types import MigrateClusterToRoutedIPsRequest
72
+ from .types import MigrateClusterToSBSCSIRequest
72
73
from .types import NodeMetadata
73
74
from .types import RebootNodeRequest
74
75
from .types import ReplaceNodeRequest
150
151
"ListVersionsRequest" ,
151
152
"ListVersionsResponse" ,
152
153
"MigrateClusterToRoutedIPsRequest" ,
154
+ "MigrateClusterToSBSCSIRequest" ,
153
155
"NodeMetadata" ,
154
156
"RebootNodeRequest" ,
155
157
"ReplaceNodeRequest" ,
Original file line number Diff line number Diff line change @@ -749,6 +749,41 @@ def migrate_cluster_to_routed_i_ps(
749
749
self ._throw_on_error (res )
750
750
return unmarshal_Cluster (res .json ())
751
751
752
+ def migrate_cluster_to_sbscsi (
753
+ self ,
754
+ * ,
755
+ cluster_id : str ,
756
+ region : Optional [Region ] = None ,
757
+ ) -> Cluster :
758
+ """
759
+ Migrate a cluster to SBS CSI.
760
+ Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS.
761
+ :param cluster_id: Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
762
+ :param region: Region to target. If none is passed will use default region from the config.
763
+ :return: :class:`Cluster <Cluster>`
764
+
765
+ Usage:
766
+ ::
767
+
768
+ result = api.migrate_cluster_to_sbscsi(
769
+ cluster_id="example",
770
+ )
771
+ """
772
+
773
+ param_region = validate_path_param (
774
+ "region" , region or self .client .default_region
775
+ )
776
+ param_cluster_id = validate_path_param ("cluster_id" , cluster_id )
777
+
778
+ res = self ._request (
779
+ "POST" ,
780
+ f"/k8s/v1/regions/{ param_region } /clusters/{ param_cluster_id } /migrate-to-sbs-csi" ,
781
+ body = {},
782
+ )
783
+
784
+ self ._throw_on_error (res )
785
+ return unmarshal_Cluster (res .json ())
786
+
752
787
def list_pools (
753
788
self ,
754
789
* ,
Original file line number Diff line number Diff line change @@ -1707,6 +1707,19 @@ class MigrateClusterToRoutedIPsRequest:
1707
1707
"""
1708
1708
1709
1709
1710
+ @dataclass
1711
+ class MigrateClusterToSBSCSIRequest :
1712
+ cluster_id : str
1713
+ """
1714
+ Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.
1715
+ """
1716
+
1717
+ region : Optional [Region ]
1718
+ """
1719
+ Region to target. If none is passed will use default region from the config.
1720
+ """
1721
+
1722
+
1710
1723
@dataclass
1711
1724
class NodeMetadata :
1712
1725
id : str
You can’t perform that action at this time.
0 commit comments