Skip to content

Commit 5b56e6a

Browse files
feat(apple_silicon): define management of server options (#1670)
Co-authored-by: Jules Castéran <[email protected]>
1 parent e9967d3 commit 5b56e6a

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

packages/clients/src/api/applesilicon/v1alpha1/content.gen.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
import type { ServerStatus } from './types.gen'
3+
import type { ServerPrivateNetworkStatus, ServerStatus } from './types.gen'
4+
5+
/** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
6+
export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] =
7+
['vpc_updating']
48

59
/** Lists transient statutes of the enum {@link ServerStatus}. */
610
export const SERVER_TRANSIENT_STATUSES: ServerStatus[] = [

packages/clients/src/api/applesilicon/v1alpha1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type {
2424
RebootServerRequest,
2525
ReinstallServerRequest,
2626
Server,
27+
ServerPrivateNetworkStatus,
2728
ServerStatus,
2829
ServerType,
2930
ServerTypeCPU,

packages/clients/src/api/applesilicon/v1alpha1/marshalling.gen.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export const unmarshalServer = (data: unknown): Server => {
159159
updatedAt: unmarshalDate(data.updated_at),
160160
vncPort: data.vnc_port,
161161
vncUrl: data.vnc_url,
162+
vpcStatus: data.vpc_status,
162163
zone: data.zone,
163164
} as Server
164165
}
@@ -263,6 +264,7 @@ export const marshalCreateServerRequest = (
263264
request: CreateServerRequest,
264265
defaults: DefaultValues,
265266
): Record<string, unknown> => ({
267+
enable_vpc: request.enableVpc,
266268
name: request.name || randomName('as'),
267269
os_id: request.osId,
268270
project_id: request.projectId ?? defaults.defaultProjectId,
@@ -287,6 +289,7 @@ export const marshalUpdateServerRequest = (
287289
request: UpdateServerRequest,
288290
defaults: DefaultValues,
289291
): Record<string, unknown> => ({
292+
enable_vpc: request.enableVpc,
290293
name: request.name,
291294
schedule_deletion: request.scheduleDeletion,
292295
})

packages/clients/src/api/applesilicon/v1alpha1/types.gen.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ export type ConnectivityDiagnosticDiagnosticStatus =
1414

1515
export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc'
1616

17+
export type ServerPrivateNetworkStatus =
18+
| 'vpc_unknown_status'
19+
| 'vpc_enabled'
20+
| 'vpc_updating'
21+
| 'vpc_disabled'
22+
1723
export type ServerStatus =
1824
| 'unknown_status'
1925
| 'starting'
@@ -158,6 +164,11 @@ export interface Server {
158164
* using the server status.
159165
*/
160166
delivered: boolean
167+
/**
168+
* Activation status of optional Private Network feature support for this
169+
* server.
170+
*/
171+
vpcStatus: ServerPrivateNetworkStatus
161172
}
162173

163174
export interface ConnectivityDiagnostic {
@@ -184,6 +195,11 @@ export type CreateServerRequest = {
184195
* induce an extended delivery time.
185196
*/
186197
osId?: string
198+
/**
199+
* Activate the Private Network feature for this server. This feature is
200+
* configured through the Apple Silicon - Private Networks API.
201+
*/
202+
enableVpc: boolean
187203
}
188204

189205
export type DeleteServerRequest = {
@@ -319,4 +335,6 @@ export type UpdateServerRequest = {
319335
name?: string
320336
/** Specify whether the server should be flagged for automatic deletion. */
321337
scheduleDeletion?: boolean
338+
/** Activate or deactivate Private Network support for this server. */
339+
enableVpc?: boolean
322340
}

0 commit comments

Comments
 (0)