Skip to content

Commit 3f8771f

Browse files
authored
Merge branch 'main' into v1.5903.0
2 parents 153c66f + 2bdbb0d commit 3f8771f

File tree

20 files changed

+5156
-0
lines changed

20 files changed

+5156
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from .types import ConnectivityDiagnosticActionType
44
from .types import ConnectivityDiagnosticDiagnosticStatus
55
from .types import ListServersRequestOrderBy
6+
from .types import ServerPrivateNetworkStatus
7+
from .content import SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES
68
from .types import ServerStatus
79
from .content import SERVER_TRANSIENT_STATUSES
810
from .types import ServerTypeStock
@@ -39,6 +41,8 @@
3941
"ConnectivityDiagnosticActionType",
4042
"ConnectivityDiagnosticDiagnosticStatus",
4143
"ListServersRequestOrderBy",
44+
"ServerPrivateNetworkStatus",
45+
"SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES",
4246
"ServerStatus",
4347
"SERVER_TRANSIENT_STATUSES",
4448
"ServerTypeStock",

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ async def create_server(
116116
self,
117117
*,
118118
type_: str,
119+
enable_vpc: bool,
119120
zone: Optional[Zone] = None,
120121
name: Optional[str] = None,
121122
project_id: Optional[str] = None,
@@ -125,6 +126,7 @@ async def create_server(
125126
Create a server.
126127
Create a new server in the targeted zone, specifying its configuration including name and type.
127128
:param type_: Create a server of the given type.
129+
:param enable_vpc: Activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
128130
:param zone: Zone to target. If none is passed will use default zone from the config.
129131
:param name: Create a server with this given name.
130132
:param project_id: Create a server in the given project ID.
@@ -136,6 +138,7 @@ async def create_server(
136138
137139
result = await api.create_server(
138140
type="example",
141+
enable_vpc=False,
139142
)
140143
"""
141144

@@ -147,6 +150,7 @@ async def create_server(
147150
body=marshal_CreateServerRequest(
148151
CreateServerRequest(
149152
type_=type_,
153+
enable_vpc=enable_vpc,
150154
zone=zone,
151155
name=name or random_name(prefix="as"),
152156
project_id=project_id,
@@ -432,6 +436,7 @@ async def update_server(
432436
zone: Optional[Zone] = None,
433437
name: Optional[str] = None,
434438
schedule_deletion: Optional[bool] = None,
439+
enable_vpc: Optional[bool] = None,
435440
) -> Server:
436441
"""
437442
Update a server.
@@ -440,6 +445,7 @@ async def update_server(
440445
:param zone: Zone to target. If none is passed will use default zone from the config.
441446
:param name: Updated name for your server.
442447
:param schedule_deletion: Specify whether the server should be flagged for automatic deletion.
448+
:param enable_vpc: Activate or deactivate Private Network support for this server.
443449
:return: :class:`Server <Server>`
444450
445451
Usage:
@@ -462,6 +468,7 @@ async def update_server(
462468
zone=zone,
463469
name=name,
464470
schedule_deletion=schedule_deletion,
471+
enable_vpc=enable_vpc,
465472
),
466473
self.client,
467474
),

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
from typing import List
44

55
from .types import (
6+
ServerPrivateNetworkStatus,
67
ServerStatus,
78
)
89

10+
SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: List[ServerPrivateNetworkStatus] = [
11+
ServerPrivateNetworkStatus.VPC_UPDATING,
12+
]
13+
"""
14+
Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus <ServerPrivateNetworkStatus>`.
15+
"""
916
SERVER_TRANSIENT_STATUSES: List[ServerStatus] = [
1017
ServerStatus.STARTING,
1118
ServerStatus.REBOOTING,

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ def unmarshal_Server(data: Any) -> Server:
291291
if field is not None:
292292
args["delivered"] = field
293293

294+
field = data.get("vpc_status", None)
295+
if field is not None:
296+
args["vpc_status"] = field
297+
294298
field = data.get("os", None)
295299
if field is not None:
296300
args["os"] = unmarshal_OS(field)
@@ -485,6 +489,9 @@ def marshal_CreateServerRequest(
485489
if request.type_ is not None:
486490
output["type"] = request.type_
487491

492+
if request.enable_vpc is not None:
493+
output["enable_vpc"] = request.enable_vpc
494+
488495
if request.name is not None:
489496
output["name"] = request.name
490497

@@ -533,4 +540,7 @@ def marshal_UpdateServerRequest(
533540
if request.schedule_deletion is not None:
534541
output["schedule_deletion"] = request.schedule_deletion
535542

543+
if request.enable_vpc is not None:
544+
output["enable_vpc"] = request.enable_vpc
545+
536546
return output

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ def __str__(self) -> str:
4141
return str(self.value)
4242

4343

44+
class ServerPrivateNetworkStatus(str, Enum, metaclass=StrEnumMeta):
45+
VPC_UNKNOWN_STATUS = "vpc_unknown_status"
46+
VPC_ENABLED = "vpc_enabled"
47+
VPC_UPDATING = "vpc_updating"
48+
VPC_DISABLED = "vpc_disabled"
49+
50+
def __str__(self) -> str:
51+
return str(self.value)
52+
53+
4454
class ServerStatus(str, Enum, metaclass=StrEnumMeta):
4555
UNKNOWN_STATUS = "unknown_status"
4656
STARTING = "starting"
@@ -284,6 +294,11 @@ class Server:
284294
Set to true once the server has completed its provisioning steps and is ready to use. Some OS configurations might require a reinstallation of the server before delivery depending on the available stock. A reinstallation after the initial delivery will not change this flag and can be tracked using the server status.
285295
"""
286296

297+
vpc_status: ServerPrivateNetworkStatus
298+
"""
299+
Activation status of optional Private Network feature support for this server.
300+
"""
301+
287302
os: Optional[OS]
288303
"""
289304
Initially installed OS, this does not necessarily reflect the current OS version.
@@ -327,6 +342,11 @@ class CreateServerRequest:
327342
Create a server of the given type.
328343
"""
329344

345+
enable_vpc: bool
346+
"""
347+
Activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
348+
"""
349+
330350
zone: Optional[Zone]
331351
"""
332352
Zone to target. If none is passed will use default zone from the config.
@@ -580,3 +600,8 @@ class UpdateServerRequest:
580600
"""
581601
Specify whether the server should be flagged for automatic deletion.
582602
"""
603+
604+
enable_vpc: Optional[bool]
605+
"""
606+
Activate or deactivate Private Network support for this server.
607+
"""
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was automatically generated. DO NOT EDIT.
2+
# If you have any remark or suggestion do not hesitate to open an issue.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This file was automatically generated. DO NOT EDIT.
2+
# If you have any remark or suggestion do not hesitate to open an issue.
3+
from .types import BgpStatus
4+
from .types import LinkStatus
5+
from .types import ListLinksRequestOrderBy
6+
from .types import ListPartnersRequestOrderBy
7+
from .types import ListPopsRequestOrderBy
8+
from .types import ListRoutingPoliciesRequestOrderBy
9+
from .types import Link
10+
from .types import Partner
11+
from .types import Pop
12+
from .types import RoutingPolicy
13+
from .types import AttachRoutingPolicyRequest
14+
from .types import AttachVpcRequest
15+
from .types import CreateLinkRequest
16+
from .types import CreateRoutingPolicyRequest
17+
from .types import DeleteLinkRequest
18+
from .types import DeleteRoutingPolicyRequest
19+
from .types import DetachRoutingPolicyRequest
20+
from .types import DetachVpcRequest
21+
from .types import DisableRoutePropagationRequest
22+
from .types import EnableRoutePropagationRequest
23+
from .types import GetLinkRequest
24+
from .types import GetPartnerRequest
25+
from .types import GetPopRequest
26+
from .types import GetRoutingPolicyRequest
27+
from .types import ListLinksRequest
28+
from .types import ListLinksResponse
29+
from .types import ListPartnersRequest
30+
from .types import ListPartnersResponse
31+
from .types import ListPopsRequest
32+
from .types import ListPopsResponse
33+
from .types import ListRoutingPoliciesRequest
34+
from .types import ListRoutingPoliciesResponse
35+
from .types import UpdateLinkRequest
36+
from .types import UpdateRoutingPolicyRequest
37+
from .api import InterlinkV1Beta1API
38+
39+
__all__ = [
40+
"BgpStatus",
41+
"LinkStatus",
42+
"ListLinksRequestOrderBy",
43+
"ListPartnersRequestOrderBy",
44+
"ListPopsRequestOrderBy",
45+
"ListRoutingPoliciesRequestOrderBy",
46+
"Link",
47+
"Partner",
48+
"Pop",
49+
"RoutingPolicy",
50+
"AttachRoutingPolicyRequest",
51+
"AttachVpcRequest",
52+
"CreateLinkRequest",
53+
"CreateRoutingPolicyRequest",
54+
"DeleteLinkRequest",
55+
"DeleteRoutingPolicyRequest",
56+
"DetachRoutingPolicyRequest",
57+
"DetachVpcRequest",
58+
"DisableRoutePropagationRequest",
59+
"EnableRoutePropagationRequest",
60+
"GetLinkRequest",
61+
"GetPartnerRequest",
62+
"GetPopRequest",
63+
"GetRoutingPolicyRequest",
64+
"ListLinksRequest",
65+
"ListLinksResponse",
66+
"ListPartnersRequest",
67+
"ListPartnersResponse",
68+
"ListPopsRequest",
69+
"ListPopsResponse",
70+
"ListRoutingPoliciesRequest",
71+
"ListRoutingPoliciesResponse",
72+
"UpdateLinkRequest",
73+
"UpdateRoutingPolicyRequest",
74+
"InterlinkV1Beta1API",
75+
]

0 commit comments

Comments
 (0)