diff --git a/packages/clients/src/api/baremetal/v1/index.gen.ts b/packages/clients/src/api/baremetal/v1/index.gen.ts index 5e662b1a3..9f3447ec4 100644 --- a/packages/clients/src/api/baremetal/v1/index.gen.ts +++ b/packages/clients/src/api/baremetal/v1/index.gen.ts @@ -64,16 +64,12 @@ export type { SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, - SchemaLVM, - SchemaLogicalVolume, - SchemaLogicalVolumeType, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, - SchemaVolumeGroup, SchemaZFS, Server, ServerBootType, diff --git a/packages/clients/src/api/baremetal/v1/marshalling.gen.ts b/packages/clients/src/api/baremetal/v1/marshalling.gen.ts index 2de126439..c38547e24 100644 --- a/packages/clients/src/api/baremetal/v1/marshalling.gen.ts +++ b/packages/clients/src/api/baremetal/v1/marshalling.gen.ts @@ -45,12 +45,9 @@ import type { Schema, SchemaDisk, SchemaFilesystem, - SchemaLVM, - SchemaLogicalVolume, SchemaPartition, SchemaPool, SchemaRAID, - SchemaVolumeGroup, SchemaZFS, Server, ServerEvent, @@ -68,22 +65,6 @@ import type { ValidatePartitioningSchemaRequest, } from './types.gen' -const unmarshalSchemaLogicalVolume = (data: unknown): SchemaLogicalVolume => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'SchemaLogicalVolume' failed as data isn't a dictionary.`, - ) - } - - return { - mirrorNumber: data.mirror_number, - name: data.name, - size: data.size, - stripedNumber: data.striped_number, - type: data.type, - } as SchemaLogicalVolume -} - const unmarshalSchemaPartition = (data: unknown): SchemaPartition => { if (!isJSONObject(data)) { throw new TypeError( @@ -98,23 +79,6 @@ const unmarshalSchemaPartition = (data: unknown): SchemaPartition => { } as SchemaPartition } -const unmarshalSchemaVolumeGroup = (data: unknown): SchemaVolumeGroup => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'SchemaVolumeGroup' failed as data isn't a dictionary.`, - ) - } - - return { - logicalVolumes: unmarshalArrayOfObject( - data.logical_volumes, - unmarshalSchemaLogicalVolume, - ), - physicalVolumes: data.physical_volumes, - volumeGroupName: data.volume_group_name, - } as SchemaVolumeGroup -} - const unmarshalSchemaPool = (data: unknown): SchemaPool => { if (!isJSONObject(data)) { throw new TypeError( @@ -161,21 +125,6 @@ const unmarshalSchemaFilesystem = (data: unknown): SchemaFilesystem => { } as SchemaFilesystem } -const unmarshalSchemaLVM = (data: unknown): SchemaLVM => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'SchemaLVM' failed as data isn't a dictionary.`, - ) - } - - return { - volumeGroups: unmarshalArrayOfObject( - data.volume_groups, - unmarshalSchemaVolumeGroup, - ), - } as SchemaLVM -} - const unmarshalSchemaRAID = (data: unknown): SchemaRAID => { if (!isJSONObject(data)) { throw new TypeError( @@ -215,7 +164,6 @@ export const unmarshalSchema = (data: unknown): Schema => { data.filesystems, unmarshalSchemaFilesystem, ), - lvm: data.lvm ? unmarshalSchemaLVM(data.lvm) : undefined, raids: unmarshalArrayOfObject(data.raids, unmarshalSchemaRAID), zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : undefined, } as Schema @@ -922,17 +870,6 @@ export const marshalUpdateSettingRequest = ( enabled: request.enabled, }) -const marshalSchemaLogicalVolume = ( - request: SchemaLogicalVolume, - defaults: DefaultValues, -): Record => ({ - mirror_number: request.mirrorNumber, - name: request.name, - size: request.size, - striped_number: request.stripedNumber, - type: request.type, -}) - const marshalSchemaPartition = ( request: SchemaPartition, defaults: DefaultValues, @@ -942,17 +879,6 @@ const marshalSchemaPartition = ( size: request.size, }) -const marshalSchemaVolumeGroup = ( - request: SchemaVolumeGroup, - defaults: DefaultValues, -): Record => ({ - logical_volumes: request.logicalVolumes.map(elt => - marshalSchemaLogicalVolume(elt, defaults), - ), - physical_volumes: request.physicalVolumes, - volume_group_name: request.volumeGroupName, -}) - const marshalSchemaPool = ( request: SchemaPool, defaults: DefaultValues, @@ -983,15 +909,6 @@ const marshalSchemaFilesystem = ( mountpoint: request.mountpoint, }) -const marshalSchemaLVM = ( - request: SchemaLVM, - defaults: DefaultValues, -): Record => ({ - volume_groups: request.volumeGroups.map(elt => - marshalSchemaVolumeGroup(elt, defaults), - ), -}) - const marshalSchemaRAID = ( request: SchemaRAID, defaults: DefaultValues, @@ -1016,10 +933,6 @@ export const marshalSchema = ( filesystems: request.filesystems.map(elt => marshalSchemaFilesystem(elt, defaults), ), - lvm: - request.lvm !== undefined - ? marshalSchemaLVM(request.lvm, defaults) - : undefined, raids: request.raids.map(elt => marshalSchemaRAID(elt, defaults)), zfs: request.zfs !== undefined diff --git a/packages/clients/src/api/baremetal/v1/types.gen.ts b/packages/clients/src/api/baremetal/v1/types.gen.ts index 64a31c821..95d35f138 100644 --- a/packages/clients/src/api/baremetal/v1/types.gen.ts +++ b/packages/clients/src/api/baremetal/v1/types.gen.ts @@ -33,16 +33,7 @@ export type SchemaFilesystemFormat = | 'ext4' | 'swap' | 'zfs' - -export type SchemaLogicalVolumeType = - | 'unknown_raid_type' - | 'striped' - | 'mirror' - | 'raid0' - | 'raid1' - | 'raid5' - | 'raid6' - | 'raid10' + | 'xfs' export type SchemaPartitionLabel = | 'unknown_partition_label' @@ -54,7 +45,6 @@ export type SchemaPartitionLabel = | 'data' | 'home' | 'raid' - | 'lvm' | 'zfs' export type SchemaPoolType = @@ -117,26 +107,12 @@ export type ServerStatus = export type SettingType = 'unknown' | 'smtp' -export interface SchemaLogicalVolume { - name: string - type: SchemaLogicalVolumeType - size: number - stripedNumber: number - mirrorNumber: number -} - export interface SchemaPartition { label: SchemaPartitionLabel number: number size: number } -export interface SchemaVolumeGroup { - volumeGroupName: string - physicalVolumes: string[] - logicalVolumes: SchemaLogicalVolume[] -} - export interface SchemaPool { name: string type: SchemaPoolType @@ -156,10 +132,6 @@ export interface SchemaFilesystem { mountpoint: string } -export interface SchemaLVM { - volumeGroups: SchemaVolumeGroup[] -} - export interface SchemaRAID { name: string level: SchemaRAIDLevel @@ -188,7 +160,6 @@ export interface Schema { disks: SchemaDisk[] raids: SchemaRAID[] filesystems: SchemaFilesystem[] - lvm?: SchemaLVM zfs?: SchemaZFS }