diff --git a/OMICRON_VERSION b/OMICRON_VERSION index cd31bdf3f6..aa6f4999ad 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -c45136595220c8566aabd77cf6f12d29b1ca5a91 \ No newline at end of file +c458fddcb8660eeb78d4a0ffe34c9d21c2ebd3dc diff --git a/libs/api/__generated__/Api.ts b/libs/api/__generated__/Api.ts index 12f60eae43..bf503c895c 100644 --- a/libs/api/__generated__/Api.ts +++ b/libs/api/__generated__/Api.ts @@ -134,12 +134,18 @@ export type DiskState = | { state: 'faulted' } /** - * Distribution must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. + * OS image distribution */ -export type Distribution = string - -/** Regex pattern for validating Distribution */ -export const distributionPattern = '[a-z](|[a-zA-Z0-9-]*[a-zA-Z0-9])' +export type Distribution = { + /** + * The name of the distribution (e.g. "alpine" or "ubuntu") + */ + name: Name + /** + * The version of the distribution (e.g. "3.10" or "18.04") + */ + version: string +} /** * Error information from a response. @@ -262,10 +268,6 @@ export type GlobalImageCreate = { * The source of the image's contents. */ source: ImageSource - /** - * image version - */ - version: string } /** @@ -551,6 +553,20 @@ export type InstanceResultsPage = { nextPage?: string | null } +/** + * Contents of an Instance's serial console buffer. + */ +export type InstanceSerialConsoleData = { + /** + * The bytes starting from the requested offset up to either the end of the buffer or the request's `max_bytes`. Provided as a u8 array rather than a string, as it may not be UTF-8. + */ + data: number[] + /** + * The absolute offset since boot (suitable for use as `byte_offset` in a subsequent request) of the last byte returned in `data`. + */ + lastByteOffset: number +} + /** * Running state of an Instance (primarily: booted or stopped) * @@ -696,6 +712,24 @@ export type NetworkInterfaceResultsPage = { nextPage?: string | null } +/** + * Parameters for updating a {@link NetworkInterface}. + * + * Note that modifying IP addresses for an interface is not yet supported, a new interface must be created instead. + */ +export type NetworkInterfaceUpdate = { + description?: string | null + /** + * Make a secondary interface the instance's primary interface. + * + * If applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface. + * + * Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error. + */ + makePrimary?: boolean | null + name?: Name | null +} + /** * Client view of an {@link Organization} */ @@ -2153,6 +2187,16 @@ export interface InstanceNetworkInterfacesGetInterfaceParams { projectName: Name } +export interface InstanceNetworkInterfacesPutInterfaceParams { + instanceName: Name + + interfaceName: Name + + orgName: Name + + projectName: Name +} + export interface InstanceNetworkInterfacesDeleteInterfaceParams { instanceName: Name @@ -2171,6 +2215,20 @@ export interface ProjectInstancesInstanceRebootParams { projectName: Name } +export interface ProjectInstancesInstanceSerialGetParams { + instanceName: Name + + orgName: Name + + projectName: Name + + fromStart?: number | null + + maxBytes?: number | null + + mostRecent?: number | null +} + export interface ProjectInstancesInstanceStartParams { instanceName: Name @@ -3362,6 +3420,26 @@ export class Api extends HttpClient { ...params, }), + /** + * Update information about an instance's network interface + */ + instanceNetworkInterfacesPutInterface: ( + { + instanceName, + interfaceName, + orgName, + projectName, + }: InstanceNetworkInterfacesPutInterfaceParams, + body: NetworkInterfaceUpdate, + params: RequestParams = {} + ) => + this.request({ + path: `/organizations/${orgName}/projects/${projectName}/instances/${instanceName}/network-interfaces/${interfaceName}`, + method: 'PUT', + body, + ...params, + }), + /** * Detach a network interface from an instance. */ @@ -3393,6 +3471,25 @@ export class Api extends HttpClient { ...params, }), + /** + * Get contents of an instance's serial console. + */ + projectInstancesInstanceSerialGet: ( + { + instanceName, + orgName, + projectName, + ...query + }: ProjectInstancesInstanceSerialGetParams, + params: RequestParams = {} + ) => + this.request({ + path: `/organizations/${orgName}/projects/${projectName}/instances/${instanceName}/serial`, + method: 'GET', + query, + ...params, + }), + /** * Boot an instance. */ diff --git a/libs/api/__generated__/OMICRON_VERSION b/libs/api/__generated__/OMICRON_VERSION index 45f25d83d7..d80d6d2206 100644 --- a/libs/api/__generated__/OMICRON_VERSION +++ b/libs/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -c45136595220c8566aabd77cf6f12d29b1ca5a91 +c458fddcb8660eeb78d4a0ffe34c9d21c2ebd3dc