diff --git a/OMICRON_VERSION b/OMICRON_VERSION index 5d15d27be..e91b1c476 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -254a0c51bc0beecb79c8a9dfccce8e7bc35b5ca4 +985304a607b16191bdc35e0ea87fa522d925b514 diff --git a/app/api/__generated__/Api.ts b/app/api/__generated__/Api.ts index 5edbefb34..7e88135aa 100644 --- a/app/api/__generated__/Api.ts +++ b/app/api/__generated__/Api.ts @@ -945,6 +945,23 @@ export type BgpImported = { switch: SwitchSlot } +/** + * Router lifetime in seconds for unnumbered BGP peers + */ +export type RouterLifetimeConfig = number + +export type RouterPeerType = + | { + /** Router lifetime in seconds for unnumbered BGP peers. */ + routerLifetime: RouterLifetimeConfig + type: 'unnumbered' + } + | { + /** IP address for numbered BGP peers. */ + ip: string + type: 'numbered' + } + /** * Define policy relating to the import and export of prefixes from a BGP peer. */ @@ -952,11 +969,11 @@ export type ImportExportPolicy = /** Do not perform any filtering. */ { type: 'no_filtering' } | { type: 'allow'; value: IpNet[] } /** - * A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer identified by `addr`. The `bgp_config` parameter is a reference to global BGP parameters. The `interface_name` indicates what interface the peer should be contacted on. + * A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer. The `bgp_config` parameter is a reference to global BGP parameters. */ export type BgpPeer = { - /** The address of the host to peer with. If not provided, this is an unnumbered BGP session that will be established over the interface specified by `interface_name`. */ - addr?: string | null + /** The address of the host to peer with, or specifying the configuration of an unnumbered BGP session. */ + addr: RouterPeerType /** Define export policy for a peer. */ allowedExport: ImportExportPolicy /** Define import policy for a peer. */ @@ -965,7 +982,7 @@ export type BgpPeer = { bgpConfig: NameOrId /** Include the provided communities in updates sent to the peer. */ communities: number[] - /** How long to to wait between TCP connection retries (seconds). */ + /** How long to wait between TCP connection retries (seconds). */ connectRetry: number /** How long to delay sending an open request after establishing a TCP session (seconds). */ delayOpen: number @@ -975,8 +992,6 @@ export type BgpPeer = { holdTime: number /** How long to hold a peer in idle before attempting a new session (seconds). */ idleHoldTime: number - /** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */ - interfaceName: Name /** How often to send keepalive requests (seconds). */ keepalive: number /** Apply a local preference to routes received from this peer. */ @@ -989,8 +1004,6 @@ export type BgpPeer = { multiExitDiscriminator?: number | null /** Require that a peer has a specified ASN. */ remoteAsn?: number | null - /** Router lifetime in seconds for unnumbered BGP peers. */ - routerLifetime: number /** Associate a VLAN ID with a peer. */ vlanId?: number | null } @@ -3625,6 +3638,36 @@ export type PhysicalDisk = { vendor: string } +/** + * The unique identity of a physical disk provided by the manufacturer + */ +export type PhysicalDiskManufacturerIdentity = { + model: string + serial: string + vendor: string +} + +export type PhysicalDiskAdoptionRequestUuid = string + +/** + * A request to adopt a physical disk into the control plane + */ +export type PhysicalDiskAdoptionRequest = { + diskId: PhysicalDiskManufacturerIdentity + id: PhysicalDiskAdoptionRequestUuid + timeCreated: Date +} + +/** + * A single page of results + */ +export type PhysicalDiskAdoptionRequestResultsPage = { + /** list of items on this page of results */ + items: PhysicalDiskAdoptionRequest[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + /** * A single page of results */ @@ -3643,7 +3686,7 @@ export type Ping = { } /** - * Identity-related metadata that's included in nearly all public API objects + * A networking probe */ export type Probe = { /** Human-readable free-form text about a resource */ @@ -3944,7 +3987,7 @@ export type RouterRouteUpdate = { } /** - * Identity-related metadata that's included in nearly all public API objects + * A SAML identity provider */ export type SamlIdentityProvider = { /** Service provider endpoint where the response will be sent */ @@ -4411,6 +4454,8 @@ export type SledResultsPage = { nextPage?: string | null } +export type SledUuid = string + export type SnapshotState = 'creating' | 'ready' | 'faulted' | 'destroyed' /** @@ -4702,17 +4747,19 @@ export type Switch = { } /** - * Describes the kind of an switch interface. + * Indicates the kind for a switch interface. */ -export type SwitchInterfaceKind2 = +export type SwitchInterfaceKind = /** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ - | 'primary' - + | { type: 'primary' } /** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ - | 'vlan' - + | { + type: 'vlan' + /** The virtual network id (VID) that distinguishes this interface and is used for producing and consuming 802.1Q Ethernet tags. This field has a maximum value of 4095 as 802.1Q tags are twelve bits. */ + vid: number + } /** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ - | 'loopback' + | { type: 'loopback' } /** * A switch port interface configuration for a port settings object. @@ -4723,28 +4770,13 @@ export type SwitchInterfaceConfig = { /** The name of this switch interface. */ interfaceName: Name /** The switch interface kind. */ - kind: SwitchInterfaceKind2 + kind: SwitchInterfaceKind /** The port settings object this switch interface configuration belongs to. */ portSettingsId: string /** Whether or not IPv6 is enabled on this interface. */ v6Enabled: boolean } -/** - * Indicates the kind for a switch interface. - */ -export type SwitchInterfaceKind = - /** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ - | { type: 'primary' } - /** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ - | { - type: 'vlan' - /** The virtual network id (VID) that distinguishes this interface and is used for producing and consuming 802.1Q Ethernet tags. This field has a maximum value of 4095 as 802.1Q tags are twelve bits. */ - vid: number - } - /** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ - | { type: 'loopback' } - /** * A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. */ @@ -4806,7 +4838,7 @@ export type SwitchPortApplySettings = { /** * The link geometry associated with a switch port. */ -export type SwitchPortGeometry2 = +export type SwitchPortGeometry = /** The port contains a single QSFP28 link with four lanes. */ | 'qsfp28x1' @@ -4821,24 +4853,11 @@ export type SwitchPortGeometry2 = */ export type SwitchPortConfig = { /** The physical link geometry of the port. */ - geometry: SwitchPortGeometry2 + geometry: SwitchPortGeometry /** The id of the port settings object this configuration belongs to. */ portSettingsId: string } -/** - * The link geometry associated with a switch port. - */ -export type SwitchPortGeometry = - /** The port contains a single QSFP28 link with four lanes. */ - | 'qsfp28x1' - - /** The port contains two QSFP28 links each with two lanes. */ - | 'qsfp28x2' - - /** The port contains four SFP28 links each with one lane. */ - | 'sfp28x4' - /** * Physical switch port configuration. */ @@ -4847,22 +4866,6 @@ export type SwitchPortConfigCreate = { geometry: SwitchPortGeometry } -/** - * Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. - */ -export type TxEqConfig2 = { - /** Main tap */ - main?: number | null - /** Post-cursor tap1 */ - post1?: number | null - /** Post-cursor tap2 */ - post2?: number | null - /** Pre-cursor tap1 */ - pre1?: number | null - /** Pre-cursor tap2 */ - pre2?: number | null -} - /** * A link configuration for a port settings object. */ @@ -4882,7 +4885,7 @@ export type SwitchPortLinkConfig = { /** The configured speed of the link. */ speed: LinkSpeed /** The tx_eq configuration for this link. */ - txEqConfig?: TxEqConfig2 | null + txEqConfig?: TxEqConfig | null } /** @@ -4923,16 +4926,6 @@ export type SwitchPortSettingsGroups = { portSettingsId: string } -/** - * A switch port VLAN interface configuration for a port settings object. - */ -export type SwitchVlanInterfaceConfig = { - /** The switch interface configuration this VLAN interface configuration belongs to. */ - interfaceConfigId: string - /** The virtual network id for this interface that is used for producing and consuming 802.1Q Ethernet tags. This field has a maximum value of 4095 as 802.1Q tags are twelve bits. */ - vlanId: number -} - /** * This structure contains all port settings information in one place. It's a convenience data structure for getting a complete view of a particular port's settings. */ @@ -4961,8 +4954,6 @@ export type SwitchPortSettings = { timeCreated: Date /** Timestamp when this resource was last modified */ timeModified: Date - /** Vlan interface settings. */ - vlanInterfaces: SwitchVlanInterfaceConfig[] } /** @@ -5063,6 +5054,7 @@ export type Units = | 'amps' | 'watts' | 'degrees_celsius' + | 'joules' /** No meaningful units, e.g. a dimensionless quanity. */ | 'none' @@ -5135,6 +5127,26 @@ export type TufRepoUploadStatus = /** The repository already existed in the data export type TufRepoUpload = { repo: TufRepo; status: TufRepoUploadStatus } +/** + * A physical disk that has not yet been adopted by the control plane + */ +export type UnadoptedPhysicalDisk = { + diskId: PhysicalDiskManufacturerIdentity + sledId: SledUuid + slot: number + variant: PhysicalDiskKind +} + +/** + * A single page of results + */ +export type UnadoptedPhysicalDiskResultsPage = { + /** list of items on this page of results */ + items: UnadoptedPhysicalDisk[] + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null +} + /** * A sled that has not been added to an initialized rack yet */ @@ -5157,6 +5169,10 @@ Keys will be either: * Semver-like release version strings * "install dataset", representing the initial rack software before any updates * "unknown", which means there is no TUF repo uploaded that matches the software running on the component) */ componentsByReleaseVersion: Record + /** If true, the system has detected one or more known conditions that require Oxide support to resolve + +You should contact support to resolve these issues before proceeding with an update, or after one has completed. The checks underlying this field are not exhaustive, so this being `false` does not mean the entire system is completely healthy. */ + contactSupport: boolean /** Whether automatic update is suspended due to manual update activity After a manual support procedure that changes the system software, automatic update activity is suspended to avoid undoing the change. To resume automatic update, first upload the TUF repository matching the manually applied update, then set that as the target release. */ @@ -6662,6 +6678,16 @@ export interface AuditLogListQueryParams { startTime?: Date } +export interface PhysicalDiskDisableAdoptionPathParams { + physicalDiskAdoptionReqId: string +} + +export interface PhysicalDiskListAdoptionRequestsQueryParams { + limit?: number | null + pageToken?: string | null + sortBy?: IdSortMode +} + export interface PhysicalDiskListQueryParams { limit?: number | null pageToken?: string | null @@ -6672,6 +6698,11 @@ export interface PhysicalDiskViewPathParams { diskId: string } +export interface PhysicalDiskListUnadoptedQueryParams { + limit?: number | null + pageToken?: string | null +} + export interface NetworkingSwitchPortLldpNeighborsPathParams { port: Name rackId: string @@ -7482,7 +7513,7 @@ export class Api { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = '2026032500.0.0' + apiVersion = '2026052000.0.0' constructor({ host = '', baseParams = {}, token }: ApiConfig = {}) { this.host = host @@ -9950,6 +9981,47 @@ export class Api { ...params, }) }, + /** + * Enable adoption of a physical disk for general use + */ + physicalDiskEnableAdoption: ( + { body }: { body: PhysicalDiskManufacturerIdentity }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/hardware/disk-adoption-request`, + method: 'PUT', + body, + ...params, + }) + }, + /** + * Disable adoption of a physical disk for general use + */ + physicalDiskDisableAdoption: ( + { path }: { path: PhysicalDiskDisableAdoptionPathParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/hardware/disk-adoption-request/${path.physicalDiskAdoptionReqId}`, + method: 'DELETE', + ...params, + }) + }, + /** + * List physical disk adoption requests + */ + physicalDiskListAdoptionRequests: ( + { query = {} }: { query?: PhysicalDiskListAdoptionRequestsQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/hardware/disk-adoption-requests`, + method: 'GET', + query, + ...params, + }) + }, /** * List physical disks */ @@ -9977,6 +10049,20 @@ export class Api { ...params, }) }, + /** + * List physical disks that have not yet been adopted for use + */ + physicalDiskListUnadopted: ( + { query = {} }: { query?: PhysicalDiskListUnadoptedQueryParams }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/hardware/disks-unadopted`, + method: 'GET', + query, + ...params, + }) + }, /** * Fetch LLDP neighbors for switch port */ diff --git a/app/api/__generated__/OMICRON_VERSION b/app/api/__generated__/OMICRON_VERSION index b8bd5a888..3648028c0 100644 --- a/app/api/__generated__/OMICRON_VERSION +++ b/app/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -254a0c51bc0beecb79c8a9dfccce8e7bc35b5ca4 +985304a607b16191bdc35e0ea87fa522d925b514 diff --git a/app/api/__generated__/msw-handlers.ts b/app/api/__generated__/msw-handlers.ts index df98e9e1a..d888fea05 100644 --- a/app/api/__generated__/msw-handlers.ts +++ b/app/api/__generated__/msw-handlers.ts @@ -1053,6 +1053,24 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> + /** `PUT /v1/system/hardware/disk-adoption-request` */ + physicalDiskEnableAdoption: (params: { + body: Json + req: Request + cookies: Record + }) => Promisable> + /** `DELETE /v1/system/hardware/disk-adoption-request/:physicalDiskAdoptionReqId` */ + physicalDiskDisableAdoption: (params: { + path: Api.PhysicalDiskDisableAdoptionPathParams + req: Request + cookies: Record + }) => Promisable + /** `GET /v1/system/hardware/disk-adoption-requests` */ + physicalDiskListAdoptionRequests: (params: { + query: Api.PhysicalDiskListAdoptionRequestsQueryParams + req: Request + cookies: Record + }) => Promisable> /** `GET /v1/system/hardware/disks` */ physicalDiskList: (params: { query: Api.PhysicalDiskListQueryParams @@ -1065,6 +1083,12 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> + /** `GET /v1/system/hardware/disks-unadopted` */ + physicalDiskListUnadopted: (params: { + query: Api.PhysicalDiskListUnadoptedQueryParams + req: Request + cookies: Record + }) => Promisable> /** `GET /v1/system/hardware/rack-switch-port/:rackId/:switchSlot/:port/lldp/neighbors` */ networkingSwitchPortLldpNeighbors: (params: { path: Api.NetworkingSwitchPortLldpNeighborsPathParams @@ -2984,6 +3008,30 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { '/v1/system/audit-log', handler(handlers['auditLogList'], schema.AuditLogListParams, null) ), + http.put( + '/v1/system/hardware/disk-adoption-request', + handler( + handlers['physicalDiskEnableAdoption'], + null, + schema.PhysicalDiskManufacturerIdentity + ) + ), + http.delete( + '/v1/system/hardware/disk-adoption-request/:physicalDiskAdoptionReqId', + handler( + handlers['physicalDiskDisableAdoption'], + schema.PhysicalDiskDisableAdoptionParams, + null + ) + ), + http.get( + '/v1/system/hardware/disk-adoption-requests', + handler( + handlers['physicalDiskListAdoptionRequests'], + schema.PhysicalDiskListAdoptionRequestsParams, + null + ) + ), http.get( '/v1/system/hardware/disks', handler(handlers['physicalDiskList'], schema.PhysicalDiskListParams, null) @@ -2992,6 +3040,14 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { '/v1/system/hardware/disks/:diskId', handler(handlers['physicalDiskView'], schema.PhysicalDiskViewParams, null) ), + http.get( + '/v1/system/hardware/disks-unadopted', + handler( + handlers['physicalDiskListUnadopted'], + schema.PhysicalDiskListUnadoptedParams, + null + ) + ), http.get( '/v1/system/hardware/rack-switch-port/:rackId/:switchSlot/:port/lldp/neighbors', handler( diff --git a/app/api/__generated__/validate.ts b/app/api/__generated__/validate.ts index 0c46dc8e5..1985c8d2a 100644 --- a/app/api/__generated__/validate.ts +++ b/app/api/__generated__/validate.ts @@ -878,6 +878,22 @@ export const BgpImported = z.preprocess( }) ) +/** + * Router lifetime in seconds for unnumbered BGP peers + */ +export const RouterLifetimeConfig = z.preprocess( + processResponseBody, + z.number().min(0).max(9000) +) + +export const RouterPeerType = z.preprocess( + processResponseBody, + z.union([ + z.object({ routerLifetime: RouterLifetimeConfig, type: z.enum(['unnumbered']) }), + z.object({ ip: z.union([z.ipv4(), z.ipv6()]), type: z.enum(['numbered']) }), + ]) +) + /** * Define policy relating to the import and export of prefixes from a BGP peer. */ @@ -890,12 +906,12 @@ export const ImportExportPolicy = z.preprocess( ) /** - * A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer identified by `addr`. The `bgp_config` parameter is a reference to global BGP parameters. The `interface_name` indicates what interface the peer should be contacted on. + * A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer. The `bgp_config` parameter is a reference to global BGP parameters. */ export const BgpPeer = z.preprocess( processResponseBody, z.object({ - addr: z.union([z.ipv4(), z.ipv6()]).nullable().optional(), + addr: RouterPeerType, allowedExport: ImportExportPolicy, allowedImport: ImportExportPolicy, bgpConfig: NameOrId, @@ -905,14 +921,12 @@ export const BgpPeer = z.preprocess( enforceFirstAs: SafeBoolean, holdTime: z.number().min(0).max(4294967295), idleHoldTime: z.number().min(0).max(4294967295), - interfaceName: Name, keepalive: z.number().min(0).max(4294967295), localPref: z.number().min(0).max(4294967295).nullable().optional(), md5AuthKey: z.string().nullable().optional(), minTtl: z.number().min(0).max(255).nullable().optional(), multiExitDiscriminator: z.number().min(0).max(4294967295).nullable().optional(), remoteAsn: z.number().min(0).max(4294967295).nullable().optional(), - routerLifetime: z.number().min(0).max(65535), vlanId: z.number().min(0).max(65535).nullable().optional(), }) ) @@ -3331,6 +3345,39 @@ export const PhysicalDisk = z.preprocess( }) ) +/** + * The unique identity of a physical disk provided by the manufacturer + */ +export const PhysicalDiskManufacturerIdentity = z.preprocess( + processResponseBody, + z.object({ model: z.string(), serial: z.string(), vendor: z.string() }) +) + +export const PhysicalDiskAdoptionRequestUuid = z.preprocess(processResponseBody, z.uuid()) + +/** + * A request to adopt a physical disk into the control plane + */ +export const PhysicalDiskAdoptionRequest = z.preprocess( + processResponseBody, + z.object({ + diskId: PhysicalDiskManufacturerIdentity, + id: PhysicalDiskAdoptionRequestUuid, + timeCreated: z.coerce.date(), + }) +) + +/** + * A single page of results + */ +export const PhysicalDiskAdoptionRequestResultsPage = z.preprocess( + processResponseBody, + z.object({ + items: PhysicalDiskAdoptionRequest.array(), + nextPage: z.string().nullable().optional(), + }) +) + /** * A single page of results */ @@ -3344,7 +3391,7 @@ export const PingStatus = z.preprocess(processResponseBody, z.enum(['ok'])) export const Ping = z.preprocess(processResponseBody, z.object({ status: PingStatus })) /** - * Identity-related metadata that's included in nearly all public API objects + * A networking probe */ export const Probe = z.preprocess( processResponseBody, @@ -3633,7 +3680,7 @@ export const RouterRouteUpdate = z.preprocess( ) /** - * Identity-related metadata that's included in nearly all public API objects + * A SAML identity provider */ export const SamlIdentityProvider = z.preprocess( processResponseBody, @@ -4026,6 +4073,8 @@ export const SledResultsPage = z.preprocess( z.object({ items: Sled.array(), nextPage: z.string().nullable().optional() }) ) +export const SledUuid = z.preprocess(processResponseBody, z.uuid()) + export const SnapshotState = z.preprocess( processResponseBody, z.enum(['creating', 'ready', 'faulted', 'destroyed']) @@ -4277,11 +4326,15 @@ export const Switch = z.preprocess( ) /** - * Describes the kind of an switch interface. + * Indicates the kind for a switch interface. */ -export const SwitchInterfaceKind2 = z.preprocess( +export const SwitchInterfaceKind = z.preprocess( processResponseBody, - z.enum(['primary', 'vlan', 'loopback']) + z.union([ + z.object({ type: z.enum(['primary']) }), + z.object({ type: z.enum(['vlan']), vid: z.number().min(0).max(65535) }), + z.object({ type: z.enum(['loopback']) }), + ]) ) /** @@ -4292,24 +4345,12 @@ export const SwitchInterfaceConfig = z.preprocess( z.object({ id: z.uuid(), interfaceName: Name, - kind: SwitchInterfaceKind2, + kind: SwitchInterfaceKind, portSettingsId: z.uuid(), v6Enabled: SafeBoolean, }) ) -/** - * Indicates the kind for a switch interface. - */ -export const SwitchInterfaceKind = z.preprocess( - processResponseBody, - z.union([ - z.object({ type: z.enum(['primary']) }), - z.object({ type: z.enum(['vlan']), vid: z.number().min(0).max(65535) }), - z.object({ type: z.enum(['loopback']) }), - ]) -) - /** * A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. */ @@ -4364,7 +4405,7 @@ export const SwitchPortApplySettings = z.preprocess( /** * The link geometry associated with a switch port. */ -export const SwitchPortGeometry2 = z.preprocess( +export const SwitchPortGeometry = z.preprocess( processResponseBody, z.enum(['qsfp28x1', 'qsfp28x2', 'sfp28x4']) ) @@ -4374,15 +4415,7 @@ export const SwitchPortGeometry2 = z.preprocess( */ export const SwitchPortConfig = z.preprocess( processResponseBody, - z.object({ geometry: SwitchPortGeometry2, portSettingsId: z.uuid() }) -) - -/** - * The link geometry associated with a switch port. - */ -export const SwitchPortGeometry = z.preprocess( - processResponseBody, - z.enum(['qsfp28x1', 'qsfp28x2', 'sfp28x4']) + z.object({ geometry: SwitchPortGeometry, portSettingsId: z.uuid() }) ) /** @@ -4393,20 +4426,6 @@ export const SwitchPortConfigCreate = z.preprocess( z.object({ geometry: SwitchPortGeometry }) ) -/** - * Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. - */ -export const TxEqConfig2 = z.preprocess( - processResponseBody, - z.object({ - main: z.number().min(-2147483647).max(2147483647).nullable().optional(), - post1: z.number().min(-2147483647).max(2147483647).nullable().optional(), - post2: z.number().min(-2147483647).max(2147483647).nullable().optional(), - pre1: z.number().min(-2147483647).max(2147483647).nullable().optional(), - pre2: z.number().min(-2147483647).max(2147483647).nullable().optional(), - }) -) - /** * A link configuration for a port settings object. */ @@ -4420,7 +4439,7 @@ export const SwitchPortLinkConfig = z.preprocess( mtu: z.number().min(0).max(65535), portSettingsId: z.uuid(), speed: LinkSpeed, - txEqConfig: TxEqConfig2.nullable().optional(), + txEqConfig: TxEqConfig.nullable().optional(), }) ) @@ -4455,14 +4474,6 @@ export const SwitchPortSettingsGroups = z.preprocess( z.object({ portSettingsGroupId: z.uuid(), portSettingsId: z.uuid() }) ) -/** - * A switch port VLAN interface configuration for a port settings object. - */ -export const SwitchVlanInterfaceConfig = z.preprocess( - processResponseBody, - z.object({ interfaceConfigId: z.uuid(), vlanId: z.number().min(0).max(65535) }) -) - /** * This structure contains all port settings information in one place. It's a convenience data structure for getting a complete view of a particular port's settings. */ @@ -4481,7 +4492,6 @@ export const SwitchPortSettings = z.preprocess( routes: SwitchPortRouteConfig.array(), timeCreated: z.coerce.date(), timeModified: z.coerce.date(), - vlanInterfaces: SwitchVlanInterfaceConfig.array(), }) ) @@ -4594,6 +4604,7 @@ export const Units = z.preprocess( 'amps', 'watts', 'degrees_celsius', + 'joules', ]), z.enum(['none']), z.enum(['rpm']), @@ -4665,6 +4676,30 @@ export const TufRepoUpload = z.preprocess( z.object({ repo: TufRepo, status: TufRepoUploadStatus }) ) +/** + * A physical disk that has not yet been adopted by the control plane + */ +export const UnadoptedPhysicalDisk = z.preprocess( + processResponseBody, + z.object({ + diskId: PhysicalDiskManufacturerIdentity, + sledId: SledUuid, + slot: z.number(), + variant: PhysicalDiskKind, + }) +) + +/** + * A single page of results + */ +export const UnadoptedPhysicalDiskResultsPage = z.preprocess( + processResponseBody, + z.object({ + items: UnadoptedPhysicalDisk.array(), + nextPage: z.string().nullable().optional(), + }) +) + /** * A sled that has not been added to an initialized rack yet */ @@ -4685,6 +4720,7 @@ export const UpdateStatus = z.preprocess( processResponseBody, z.object({ componentsByReleaseVersion: z.record(z.string(), z.number().min(0)), + contactSupport: SafeBoolean, suspended: SafeBoolean, targetRelease: TargetRelease.nullable(), timeLastStepPlanned: z.coerce.date(), @@ -6968,6 +7004,36 @@ export const AuditLogListParams = z.preprocess( }) ) +export const PhysicalDiskEnableAdoptionParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({}), + query: z.object({}), + }) +) + +export const PhysicalDiskDisableAdoptionParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({ + physicalDiskAdoptionReqId: z.uuid(), + }), + query: z.object({}), + }) +) + +export const PhysicalDiskListAdoptionRequestsParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({}), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), + }), + }) +) + export const PhysicalDiskListParams = z.preprocess( processResponseBody, z.object({ @@ -6990,6 +7056,17 @@ export const PhysicalDiskViewParams = z.preprocess( }) ) +export const PhysicalDiskListUnadoptedParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({}), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + }), + }) +) + export const NetworkingSwitchPortLldpNeighborsParams = z.preprocess( processResponseBody, z.object({ diff --git a/mock-api/msw/handlers.ts b/mock-api/msw/handlers.ts index 9f00f10ca..96a0dd31e 100644 --- a/mock-api/msw/handlers.ts +++ b/mock-api/msw/handlers.ts @@ -2631,6 +2631,10 @@ export const handlers = makeHandlers({ networkingSwitchPortSettingsList: NotImplemented, networkingSwitchPortSettingsView: NotImplemented, networkingSwitchPortStatus: NotImplemented, + physicalDiskDisableAdoption: NotImplemented, + physicalDiskEnableAdoption: NotImplemented, + physicalDiskListAdoptionRequests: NotImplemented, + physicalDiskListUnadopted: NotImplemented, physicalDiskView: NotImplemented, probeCreate: NotImplemented, probeDelete: NotImplemented, diff --git a/mock-api/system-update.ts b/mock-api/system-update.ts index bed256a4f..5285352ef 100644 --- a/mock-api/system-update.ts +++ b/mock-api/system-update.ts @@ -36,6 +36,7 @@ export const updateStatus: Json = { '17.0.0': 12, '16.0.0': 5, }, + contact_support: false, suspended: false, target_release: { version: '17.0.0',