Skip to content

Commit 1abc7da

Browse files
authored
feat(apple_silicon): enabled kext (#1468)
1 parent e83b4a0 commit 1abc7da

File tree

6 files changed

+72
-0
lines changed

6 files changed

+72
-0
lines changed

scaleway-async/scaleway_async/applesilicon/v1alpha1/api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ async def create_server(
149149
type_: str,
150150
enable_vpc: bool,
151151
public_bandwidth_bps: int,
152+
enable_kext: bool,
152153
zone: Optional[ScwZone] = None,
153154
name: Optional[str] = None,
154155
project_id: Optional[str] = None,
@@ -163,6 +164,7 @@ async def create_server(
163164
:param type_: Create a server of the given type.
164165
:param enable_vpc: Activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
165166
:param public_bandwidth_bps: Public bandwidth to configure for this server. This defaults to the minimum bandwidth for this server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
167+
:param enable_kext: Enable kernel extensions in this install of mac OS.
166168
:param zone: Zone to target. If none is passed will use default zone from the config.
167169
:param name: Create a server with this given name.
168170
:param project_id: Create a server in the given project ID.
@@ -179,6 +181,7 @@ async def create_server(
179181
type="example",
180182
enable_vpc=False,
181183
public_bandwidth_bps=1,
184+
enable_kext=False,
182185
)
183186
"""
184187

@@ -192,6 +195,7 @@ async def create_server(
192195
type_=type_,
193196
enable_vpc=enable_vpc,
194197
public_bandwidth_bps=public_bandwidth_bps,
198+
enable_kext=enable_kext,
195199
zone=zone,
196200
name=name or random_name(prefix="as"),
197201
project_id=project_id,
@@ -213,6 +217,7 @@ async def batch_create_servers(
213217
type_: str,
214218
enable_vpc: bool,
215219
public_bandwidth_bps: int,
220+
enable_kext: bool,
216221
zone: Optional[ScwZone] = None,
217222
project_id: Optional[str] = None,
218223
os_id: Optional[str] = None,
@@ -227,6 +232,7 @@ async def batch_create_servers(
227232
:param type_: Create servers of the given type.
228233
:param enable_vpc: Activate the Private Network feature for these servers. This feature is configured through the Apple Silicon - Private Networks API.
229234
:param public_bandwidth_bps: Public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
235+
:param enable_kext: Enable kernel extensions in this install of mac OS.
230236
:param zone: Zone to target. If none is passed will use default zone from the config.
231237
:param project_id: Create servers in the given project ID.
232238
:param os_id: Create servers & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
@@ -241,6 +247,7 @@ async def batch_create_servers(
241247
type="example",
242248
enable_vpc=False,
243249
public_bandwidth_bps=1,
250+
enable_kext=False,
244251
)
245252
"""
246253

@@ -254,6 +261,7 @@ async def batch_create_servers(
254261
type_=type_,
255262
enable_vpc=enable_vpc,
256263
public_bandwidth_bps=public_bandwidth_bps,
264+
enable_kext=enable_kext,
257265
zone=zone,
258266
project_id=project_id,
259267
os_id=os_id,
@@ -657,13 +665,15 @@ async def reinstall_server(
657665
self,
658666
*,
659667
server_id: str,
668+
enable_kext: bool,
660669
zone: Optional[ScwZone] = None,
661670
os_id: Optional[str] = None,
662671
) -> Server:
663672
"""
664673
Reinstall a server.
665674
Reinstall an existing Apple silicon server (specified by its server ID) from a new image (OS). All the data on the disk is deleted and all configuration is reset to the default configuration values of the image (OS).
666675
:param server_id: UUID of the server you want to reinstall.
676+
:param enable_kext: Enable kernel extensions in this install of mac OS.
667677
:param zone: Zone to target. If none is passed will use default zone from the config.
668678
:param os_id: Reinstall the server with the target OS, when no os_id provided the default OS for the server type is used.
669679
:return: :class:`Server <Server>`
@@ -673,6 +683,7 @@ async def reinstall_server(
673683
674684
result = await api.reinstall_server(
675685
server_id="example",
686+
enable_kext=False,
676687
)
677688
"""
678689

@@ -685,6 +696,7 @@ async def reinstall_server(
685696
body=marshal_ReinstallServerRequest(
686697
ReinstallServerRequest(
687698
server_id=server_id,
699+
enable_kext=enable_kext,
688700
zone=zone,
689701
os_id=os_id,
690702
),

scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,9 @@ def marshal_BatchCreateServersRequest(
11071107
if request.public_bandwidth_bps is not None:
11081108
output["public_bandwidth_bps"] = request.public_bandwidth_bps
11091109

1110+
if request.enable_kext is not None:
1111+
output["enable_kext"] = request.enable_kext
1112+
11101113
if request.project_id is not None:
11111114
output["project_id"] = request.project_id
11121115
else:
@@ -1260,6 +1263,9 @@ def marshal_CreateServerRequest(
12601263
if request.public_bandwidth_bps is not None:
12611264
output["public_bandwidth_bps"] = request.public_bandwidth_bps
12621265

1266+
if request.enable_kext is not None:
1267+
output["enable_kext"] = request.enable_kext
1268+
12631269
if request.name is not None:
12641270
output["name"] = request.name
12651271

@@ -1322,6 +1328,9 @@ def marshal_ReinstallServerRequest(
13221328
) -> dict[str, Any]:
13231329
output: dict[str, Any] = {}
13241330

1331+
if request.enable_kext is not None:
1332+
output["enable_kext"] = request.enable_kext
1333+
13251334
if request.os_id is not None:
13261335
output["os_id"] = request.os_id
13271336

scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,11 @@ class BatchCreateServersRequest:
560560
Public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
561561
"""
562562

563+
enable_kext: bool
564+
"""
565+
Enable kernel extensions in this install of mac OS.
566+
"""
567+
563568
zone: Optional[ScwZone] = None
564569
"""
565570
Zone to target. If none is passed will use default zone from the config.
@@ -641,6 +646,11 @@ class CreateServerRequest:
641646
Public bandwidth to configure for this server. This defaults to the minimum bandwidth for this server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
642647
"""
643648

649+
enable_kext: bool
650+
"""
651+
Enable kernel extensions in this install of mac OS.
652+
"""
653+
644654
zone: Optional[ScwZone] = None
645655
"""
646656
Zone to target. If none is passed will use default zone from the config.
@@ -1053,6 +1063,11 @@ class ReinstallServerRequest:
10531063
UUID of the server you want to reinstall.
10541064
"""
10551065

1066+
enable_kext: bool
1067+
"""
1068+
Enable kernel extensions in this install of mac OS.
1069+
"""
1070+
10561071
zone: Optional[ScwZone] = None
10571072
"""
10581073
Zone to target. If none is passed will use default zone from the config.

scaleway/scaleway/applesilicon/v1alpha1/api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def create_server(
149149
type_: str,
150150
enable_vpc: bool,
151151
public_bandwidth_bps: int,
152+
enable_kext: bool,
152153
zone: Optional[ScwZone] = None,
153154
name: Optional[str] = None,
154155
project_id: Optional[str] = None,
@@ -163,6 +164,7 @@ def create_server(
163164
:param type_: Create a server of the given type.
164165
:param enable_vpc: Activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
165166
:param public_bandwidth_bps: Public bandwidth to configure for this server. This defaults to the minimum bandwidth for this server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
167+
:param enable_kext: Enable kernel extensions in this install of mac OS.
166168
:param zone: Zone to target. If none is passed will use default zone from the config.
167169
:param name: Create a server with this given name.
168170
:param project_id: Create a server in the given project ID.
@@ -179,6 +181,7 @@ def create_server(
179181
type="example",
180182
enable_vpc=False,
181183
public_bandwidth_bps=1,
184+
enable_kext=False,
182185
)
183186
"""
184187

@@ -192,6 +195,7 @@ def create_server(
192195
type_=type_,
193196
enable_vpc=enable_vpc,
194197
public_bandwidth_bps=public_bandwidth_bps,
198+
enable_kext=enable_kext,
195199
zone=zone,
196200
name=name or random_name(prefix="as"),
197201
project_id=project_id,
@@ -213,6 +217,7 @@ def batch_create_servers(
213217
type_: str,
214218
enable_vpc: bool,
215219
public_bandwidth_bps: int,
220+
enable_kext: bool,
216221
zone: Optional[ScwZone] = None,
217222
project_id: Optional[str] = None,
218223
os_id: Optional[str] = None,
@@ -227,6 +232,7 @@ def batch_create_servers(
227232
:param type_: Create servers of the given type.
228233
:param enable_vpc: Activate the Private Network feature for these servers. This feature is configured through the Apple Silicon - Private Networks API.
229234
:param public_bandwidth_bps: Public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
235+
:param enable_kext: Enable kernel extensions in this install of mac OS.
230236
:param zone: Zone to target. If none is passed will use default zone from the config.
231237
:param project_id: Create servers in the given project ID.
232238
:param os_id: Create servers & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
@@ -241,6 +247,7 @@ def batch_create_servers(
241247
type="example",
242248
enable_vpc=False,
243249
public_bandwidth_bps=1,
250+
enable_kext=False,
244251
)
245252
"""
246253

@@ -254,6 +261,7 @@ def batch_create_servers(
254261
type_=type_,
255262
enable_vpc=enable_vpc,
256263
public_bandwidth_bps=public_bandwidth_bps,
264+
enable_kext=enable_kext,
257265
zone=zone,
258266
project_id=project_id,
259267
os_id=os_id,
@@ -657,13 +665,15 @@ def reinstall_server(
657665
self,
658666
*,
659667
server_id: str,
668+
enable_kext: bool,
660669
zone: Optional[ScwZone] = None,
661670
os_id: Optional[str] = None,
662671
) -> Server:
663672
"""
664673
Reinstall a server.
665674
Reinstall an existing Apple silicon server (specified by its server ID) from a new image (OS). All the data on the disk is deleted and all configuration is reset to the default configuration values of the image (OS).
666675
:param server_id: UUID of the server you want to reinstall.
676+
:param enable_kext: Enable kernel extensions in this install of mac OS.
667677
:param zone: Zone to target. If none is passed will use default zone from the config.
668678
:param os_id: Reinstall the server with the target OS, when no os_id provided the default OS for the server type is used.
669679
:return: :class:`Server <Server>`
@@ -673,6 +683,7 @@ def reinstall_server(
673683
674684
result = api.reinstall_server(
675685
server_id="example",
686+
enable_kext=False,
676687
)
677688
"""
678689

@@ -685,6 +696,7 @@ def reinstall_server(
685696
body=marshal_ReinstallServerRequest(
686697
ReinstallServerRequest(
687698
server_id=server_id,
699+
enable_kext=enable_kext,
688700
zone=zone,
689701
os_id=os_id,
690702
),

scaleway/scaleway/applesilicon/v1alpha1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,9 @@ def marshal_BatchCreateServersRequest(
11071107
if request.public_bandwidth_bps is not None:
11081108
output["public_bandwidth_bps"] = request.public_bandwidth_bps
11091109

1110+
if request.enable_kext is not None:
1111+
output["enable_kext"] = request.enable_kext
1112+
11101113
if request.project_id is not None:
11111114
output["project_id"] = request.project_id
11121115
else:
@@ -1260,6 +1263,9 @@ def marshal_CreateServerRequest(
12601263
if request.public_bandwidth_bps is not None:
12611264
output["public_bandwidth_bps"] = request.public_bandwidth_bps
12621265

1266+
if request.enable_kext is not None:
1267+
output["enable_kext"] = request.enable_kext
1268+
12631269
if request.name is not None:
12641270
output["name"] = request.name
12651271

@@ -1322,6 +1328,9 @@ def marshal_ReinstallServerRequest(
13221328
) -> dict[str, Any]:
13231329
output: dict[str, Any] = {}
13241330

1331+
if request.enable_kext is not None:
1332+
output["enable_kext"] = request.enable_kext
1333+
13251334
if request.os_id is not None:
13261335
output["os_id"] = request.os_id
13271336

scaleway/scaleway/applesilicon/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,11 @@ class BatchCreateServersRequest:
560560
Public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
561561
"""
562562

563+
enable_kext: bool
564+
"""
565+
Enable kernel extensions in this install of mac OS.
566+
"""
567+
563568
zone: Optional[ScwZone] = None
564569
"""
565570
Zone to target. If none is passed will use default zone from the config.
@@ -641,6 +646,11 @@ class CreateServerRequest:
641646
Public bandwidth to configure for this server. This defaults to the minimum bandwidth for this server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
642647
"""
643648

649+
enable_kext: bool
650+
"""
651+
Enable kernel extensions in this install of mac OS.
652+
"""
653+
644654
zone: Optional[ScwZone] = None
645655
"""
646656
Zone to target. If none is passed will use default zone from the config.
@@ -1053,6 +1063,11 @@ class ReinstallServerRequest:
10531063
UUID of the server you want to reinstall.
10541064
"""
10551065

1066+
enable_kext: bool
1067+
"""
1068+
Enable kernel extensions in this install of mac OS.
1069+
"""
1070+
10561071
zone: Optional[ScwZone] = None
10571072
"""
10581073
Zone to target. If none is passed will use default zone from the config.

0 commit comments

Comments
 (0)