Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions packages/clients/src/api/instance/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import {
unmarshalCreateVolumeResponse,
unmarshalDetachServerVolumeResponse,
unmarshalExportSnapshotResponse,
unmarshalGetBootscriptResponse,
unmarshalGetDashboardResponse,
unmarshalGetImageResponse,
unmarshalGetIpResponse,
Expand All @@ -66,7 +65,6 @@ import {
unmarshalGetServerTypesAvailabilityResponse,
unmarshalGetSnapshotResponse,
unmarshalGetVolumeResponse,
unmarshalListBootscriptsResponse,
unmarshalListImagesResponse,
unmarshalListIpsResponse,
unmarshalListPlacementGroupsResponse,
Expand Down Expand Up @@ -137,8 +135,6 @@ import type {
DetachServerVolumeResponse,
ExportSnapshotRequest,
ExportSnapshotResponse,
GetBootscriptRequest,
GetBootscriptResponse,
GetDashboardRequest,
GetDashboardResponse,
GetImageRequest,
Expand All @@ -163,8 +159,6 @@ import type {
GetSnapshotResponse,
GetVolumeRequest,
GetVolumeResponse,
ListBootscriptsRequest,
ListBootscriptsResponse,
ListDefaultSecurityGroupRulesRequest,
ListImagesRequest,
ListImagesResponse,
Expand Down Expand Up @@ -1520,51 +1514,6 @@ export class API extends ParentAPI {
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`,
})

protected pageOfListBootscripts = (
request: Readonly<ListBootscriptsRequest> = {},
) =>
this.client.fetch<ListBootscriptsResponse>(
{
method: 'GET',
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts`,
urlParams: urlParams(
['arch', request.arch],
['default', request.default],
['page', request.page],
['per_page', request.perPage ?? this.client.settings.defaultPageSize],
['public', request.public],
['title', request.title],
),
},
unmarshalListBootscriptsResponse,
)

/**
* List bootscripts.
*
* @deprecated
* @param request - The request {@link ListBootscriptsRequest}
* @returns A Promise of ListBootscriptsResponse
*/
listBootscripts = (request: Readonly<ListBootscriptsRequest> = {}) =>
enrichForPagination('bootscripts', this.pageOfListBootscripts, request)

/**
* Get bootscripts. Get details of a bootscript with the specified ID.
*
* @deprecated
* @param request - The request {@link GetBootscriptRequest}
* @returns A Promise of GetBootscriptResponse
*/
getBootscript = (request: Readonly<GetBootscriptRequest>) =>
this.client.fetch<GetBootscriptResponse>(
{
method: 'GET',
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`,
},
unmarshalGetBootscriptResponse,
)

getDashboard = (request: Readonly<GetDashboardRequest> = {}) =>
this.client.fetch<GetDashboardResponse>(
{
Expand Down
43 changes: 0 additions & 43 deletions packages/clients/src/api/instance/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import type {
DetachServerVolumeResponse,
ExportSnapshotRequest,
ExportSnapshotResponse,
GetBootscriptResponse,
GetDashboardResponse,
GetImageResponse,
GetIpResponse,
Expand All @@ -53,7 +52,6 @@ import type {
GetVolumeResponse,
Image,
Ip,
ListBootscriptsResponse,
ListImagesResponse,
ListIpsResponse,
ListPlacementGroupsResponse,
Expand Down Expand Up @@ -399,9 +397,6 @@ const unmarshalServer = (data: unknown): Server => {
allowedActions: data.allowed_actions,
arch: data.arch,
bootType: data.boot_type,
bootscript: data.bootscript
? unmarshalBootscript(data.bootscript)
: undefined,
commercialType: data.commercial_type,
creationDate: unmarshalDate(data.creation_date),
dynamicIpRequired: data.dynamic_ip_required,
Expand Down Expand Up @@ -746,22 +741,6 @@ export const unmarshalExportSnapshotResponse = (
} as ExportSnapshotResponse
}

export const unmarshalGetBootscriptResponse = (
data: unknown,
): GetBootscriptResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'GetBootscriptResponse' failed as data isn't a dictionary.`,
)
}

return {
bootscript: data.bootscript
? unmarshalBootscript(data.bootscript)
: undefined,
} as GetBootscriptResponse
}

const unmarshalDashboard = (data: unknown): Dashboard => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down Expand Up @@ -993,21 +972,6 @@ export const unmarshalGetVolumeResponse = (
} as GetVolumeResponse
}

export const unmarshalListBootscriptsResponse = (
data: unknown,
): ListBootscriptsResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'ListBootscriptsResponse' failed as data isn't a dictionary.`,
)
}

return {
bootscripts: unmarshalArrayOfObject(data.bootscripts, unmarshalBootscript),
totalCount: data.total_count,
} as ListBootscriptsResponse
}

export const unmarshalListImagesResponse = (
data: unknown,
): ListImagesResponse => {
Expand Down Expand Up @@ -1679,7 +1643,6 @@ export const marshalCreateImageRequest = (
defaults: DefaultValues,
): Record<string, unknown> => ({
arch: request.arch,
default_bootscript: request.defaultBootscript,
extra_volumes:
request.extraVolumes !== undefined
? Object.entries(request.extraVolumes).reduce(
Expand Down Expand Up @@ -1824,7 +1787,6 @@ export const marshalCreateServerRequest = (
): Record<string, unknown> => ({
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
boot_type: request.bootType,
bootscript: request.bootscript,
commercial_type: request.commercialType,
dynamic_ip_required: request.dynamicIpRequired,
enable_ipv6: request.enableIpv6,
Expand Down Expand Up @@ -2258,10 +2220,6 @@ export const marshalSetServerRequest = (
request.allowedActions !== undefined ? request.allowedActions : undefined,
arch: request.arch,
boot_type: request.bootType,
bootscript:
request.bootscript !== undefined
? marshalBootscript(request.bootscript, defaults)
: undefined,
commercial_type: request.commercialType,
creation_date: request.creationDate,
dynamic_ip_required: request.dynamicIpRequired,
Expand Down Expand Up @@ -2456,7 +2414,6 @@ export const marshalUpdateServerRequest = (
): Record<string, unknown> => ({
admin_password_encryption_ssh_key_id: request.adminPasswordEncryptionSshKeyId,
boot_type: request.bootType,
bootscript: request.bootscript,
commercial_type: request.commercialType,
dynamic_ip_required: request.dynamicIpRequired,
enable_ipv6: request.enableIpv6,
Expand Down
59 changes: 3 additions & 56 deletions packages/clients/src/api/instance/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,35 +137,18 @@ export interface ServerSummary {
}

export interface Bootscript {
/** Bootscript arguments. */
architecture: Arch
bootcmdargs: string
/**
* Display if the bootscript is the default bootscript (if no other boot
* option is configured).
*/
default: boolean
/**
* Provide information regarding a Device Tree Binary (DTB) for use with C1
* servers.
*/
dtb: string
/** Bootscript ID. */
id: string
/** Initrd (initial ramdisk) configuration. */
initrd: string
/** Instance kernel version. */
kernel: string
/** Bootscript Organization ID. */
organization: string
/** Bootscript Project ID. */
project: string
/** Provide information if the bootscript is public. */
public: boolean
/** Bootscript title. */
title: string
/** Bootscript architecture. */
architecture: Arch
/** Zone in which the bootscript is located. */
project: string
/** Zone to target. If none is passed will use default zone from the config. */
zone: Zone
}

Expand Down Expand Up @@ -448,8 +431,6 @@ export interface Server {
* `True`).
*/
ipv6?: ServerIpv6
/** @deprecated Instance bootscript. */
bootscript?: Bootscript
/** Instance boot type. */
bootType: BootType
/** Instance volumes. */
Expand Down Expand Up @@ -824,8 +805,6 @@ export type CreateImageRequest = {
rootVolume: string
/** Architecture of the image. */
arch: Arch
/** @deprecated Default bootscript of the image. */
defaultBootscript?: string
/** Additional volumes of the image. */
extraVolumes?: Record<string, VolumeTemplate>
/**
Expand Down Expand Up @@ -1045,8 +1024,6 @@ export type CreateServerRequest = {
publicIps?: string[]
/** Boot type to use. */
bootType?: BootType
/** @deprecated Bootscript ID to use when `boot_type` is set to `bootscript`. */
bootscript?: string
/**
* @deprecated Instance Organization ID.
*
Expand Down Expand Up @@ -1256,16 +1233,6 @@ export interface ExportSnapshotResponse {
task?: Task
}

export type GetBootscriptRequest = {
/** Zone to target. If none is passed will use default zone from the config. */
zone?: Zone
bootscriptId: string
}

export interface GetBootscriptResponse {
bootscript?: Bootscript
}

export type GetDashboardRequest = {
/** Zone to target. If none is passed will use default zone from the config. */
zone?: Zone
Expand Down Expand Up @@ -1408,24 +1375,6 @@ export interface GetVolumeResponse {
volume?: Volume
}

export type ListBootscriptsRequest = {
/** Zone to target. If none is passed will use default zone from the config. */
zone?: Zone
arch?: string
title?: string
default?: boolean
public?: boolean
perPage?: number
page?: number
}

export interface ListBootscriptsResponse {
/** Total number of bootscripts. */
totalCount: number
/** List of bootscripts. */
bootscripts: Bootscript[]
}

export type ListDefaultSecurityGroupRulesRequest = {
/** Zone to target. If none is passed will use default zone from the config. */
zone?: Zone
Expand Down Expand Up @@ -2045,8 +1994,6 @@ export type UpdateServerRequest = {
/** Tags of the Instance. */
tags?: string[]
volumes?: Record<string, VolumeServerTemplate>
/** @deprecated */
bootscript?: string
dynamicIpRequired?: boolean
/**
* @deprecated True to configure the instance so it uses the new routed IP
Expand Down
3 changes: 0 additions & 3 deletions packages/clients/src/api/instance/v1/types.private.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { Zone } from '../../../bridge'
import type {
Arch,
BootType,
Bootscript,
Image,
PlacementGroup,
PrivateNIC,
Expand Down Expand Up @@ -156,8 +155,6 @@ export type SetServerRequest = {
* `True`).
*/
ipv6?: ServerIpv6
/** @deprecated Instance bootscript. */
bootscript?: Bootscript
/** Instance boot type. */
bootType?: BootType
/** Instance volumes. */
Expand Down
Loading