Skip to content

Commit 2200b86

Browse files
authored
chore(baremetal): remove lvm from partitioning (#1452)
1 parent 9e3bd41 commit 2200b86

File tree

3 files changed

+1
-121
lines changed

3 files changed

+1
-121
lines changed

packages/clients/src/api/baremetal/v1/index.gen.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ export type {
6464
SchemaDisk,
6565
SchemaFilesystem,
6666
SchemaFilesystemFormat,
67-
SchemaLVM,
68-
SchemaLogicalVolume,
69-
SchemaLogicalVolumeType,
7067
SchemaPartition,
7168
SchemaPartitionLabel,
7269
SchemaPool,
7370
SchemaPoolType,
7471
SchemaRAID,
7572
SchemaRAIDLevel,
76-
SchemaVolumeGroup,
7773
SchemaZFS,
7874
Server,
7975
ServerBootType,

packages/clients/src/api/baremetal/v1/marshalling.gen.ts

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,9 @@ import type {
4545
Schema,
4646
SchemaDisk,
4747
SchemaFilesystem,
48-
SchemaLVM,
49-
SchemaLogicalVolume,
5048
SchemaPartition,
5149
SchemaPool,
5250
SchemaRAID,
53-
SchemaVolumeGroup,
5451
SchemaZFS,
5552
Server,
5653
ServerEvent,
@@ -68,22 +65,6 @@ import type {
6865
ValidatePartitioningSchemaRequest,
6966
} from './types.gen'
7067

71-
const unmarshalSchemaLogicalVolume = (data: unknown): SchemaLogicalVolume => {
72-
if (!isJSONObject(data)) {
73-
throw new TypeError(
74-
`Unmarshalling the type 'SchemaLogicalVolume' failed as data isn't a dictionary.`,
75-
)
76-
}
77-
78-
return {
79-
mirrorNumber: data.mirror_number,
80-
name: data.name,
81-
size: data.size,
82-
stripedNumber: data.striped_number,
83-
type: data.type,
84-
} as SchemaLogicalVolume
85-
}
86-
8768
const unmarshalSchemaPartition = (data: unknown): SchemaPartition => {
8869
if (!isJSONObject(data)) {
8970
throw new TypeError(
@@ -98,23 +79,6 @@ const unmarshalSchemaPartition = (data: unknown): SchemaPartition => {
9879
} as SchemaPartition
9980
}
10081

101-
const unmarshalSchemaVolumeGroup = (data: unknown): SchemaVolumeGroup => {
102-
if (!isJSONObject(data)) {
103-
throw new TypeError(
104-
`Unmarshalling the type 'SchemaVolumeGroup' failed as data isn't a dictionary.`,
105-
)
106-
}
107-
108-
return {
109-
logicalVolumes: unmarshalArrayOfObject(
110-
data.logical_volumes,
111-
unmarshalSchemaLogicalVolume,
112-
),
113-
physicalVolumes: data.physical_volumes,
114-
volumeGroupName: data.volume_group_name,
115-
} as SchemaVolumeGroup
116-
}
117-
11882
const unmarshalSchemaPool = (data: unknown): SchemaPool => {
11983
if (!isJSONObject(data)) {
12084
throw new TypeError(
@@ -161,21 +125,6 @@ const unmarshalSchemaFilesystem = (data: unknown): SchemaFilesystem => {
161125
} as SchemaFilesystem
162126
}
163127

164-
const unmarshalSchemaLVM = (data: unknown): SchemaLVM => {
165-
if (!isJSONObject(data)) {
166-
throw new TypeError(
167-
`Unmarshalling the type 'SchemaLVM' failed as data isn't a dictionary.`,
168-
)
169-
}
170-
171-
return {
172-
volumeGroups: unmarshalArrayOfObject(
173-
data.volume_groups,
174-
unmarshalSchemaVolumeGroup,
175-
),
176-
} as SchemaLVM
177-
}
178-
179128
const unmarshalSchemaRAID = (data: unknown): SchemaRAID => {
180129
if (!isJSONObject(data)) {
181130
throw new TypeError(
@@ -215,7 +164,6 @@ export const unmarshalSchema = (data: unknown): Schema => {
215164
data.filesystems,
216165
unmarshalSchemaFilesystem,
217166
),
218-
lvm: data.lvm ? unmarshalSchemaLVM(data.lvm) : undefined,
219167
raids: unmarshalArrayOfObject(data.raids, unmarshalSchemaRAID),
220168
zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : undefined,
221169
} as Schema
@@ -922,17 +870,6 @@ export const marshalUpdateSettingRequest = (
922870
enabled: request.enabled,
923871
})
924872

925-
const marshalSchemaLogicalVolume = (
926-
request: SchemaLogicalVolume,
927-
defaults: DefaultValues,
928-
): Record<string, unknown> => ({
929-
mirror_number: request.mirrorNumber,
930-
name: request.name,
931-
size: request.size,
932-
striped_number: request.stripedNumber,
933-
type: request.type,
934-
})
935-
936873
const marshalSchemaPartition = (
937874
request: SchemaPartition,
938875
defaults: DefaultValues,
@@ -942,17 +879,6 @@ const marshalSchemaPartition = (
942879
size: request.size,
943880
})
944881

945-
const marshalSchemaVolumeGroup = (
946-
request: SchemaVolumeGroup,
947-
defaults: DefaultValues,
948-
): Record<string, unknown> => ({
949-
logical_volumes: request.logicalVolumes.map(elt =>
950-
marshalSchemaLogicalVolume(elt, defaults),
951-
),
952-
physical_volumes: request.physicalVolumes,
953-
volume_group_name: request.volumeGroupName,
954-
})
955-
956882
const marshalSchemaPool = (
957883
request: SchemaPool,
958884
defaults: DefaultValues,
@@ -983,15 +909,6 @@ const marshalSchemaFilesystem = (
983909
mountpoint: request.mountpoint,
984910
})
985911

986-
const marshalSchemaLVM = (
987-
request: SchemaLVM,
988-
defaults: DefaultValues,
989-
): Record<string, unknown> => ({
990-
volume_groups: request.volumeGroups.map(elt =>
991-
marshalSchemaVolumeGroup(elt, defaults),
992-
),
993-
})
994-
995912
const marshalSchemaRAID = (
996913
request: SchemaRAID,
997914
defaults: DefaultValues,
@@ -1016,10 +933,6 @@ export const marshalSchema = (
1016933
filesystems: request.filesystems.map(elt =>
1017934
marshalSchemaFilesystem(elt, defaults),
1018935
),
1019-
lvm:
1020-
request.lvm !== undefined
1021-
? marshalSchemaLVM(request.lvm, defaults)
1022-
: undefined,
1023936
raids: request.raids.map(elt => marshalSchemaRAID(elt, defaults)),
1024937
zfs:
1025938
request.zfs !== undefined

packages/clients/src/api/baremetal/v1/types.gen.ts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@ export type SchemaFilesystemFormat =
3333
| 'ext4'
3434
| 'swap'
3535
| 'zfs'
36-
37-
export type SchemaLogicalVolumeType =
38-
| 'unknown_raid_type'
39-
| 'striped'
40-
| 'mirror'
41-
| 'raid0'
42-
| 'raid1'
43-
| 'raid5'
44-
| 'raid6'
45-
| 'raid10'
36+
| 'xfs'
4637

4738
export type SchemaPartitionLabel =
4839
| 'unknown_partition_label'
@@ -54,7 +45,6 @@ export type SchemaPartitionLabel =
5445
| 'data'
5546
| 'home'
5647
| 'raid'
57-
| 'lvm'
5848
| 'zfs'
5949

6050
export type SchemaPoolType =
@@ -117,26 +107,12 @@ export type ServerStatus =
117107

118108
export type SettingType = 'unknown' | 'smtp'
119109

120-
export interface SchemaLogicalVolume {
121-
name: string
122-
type: SchemaLogicalVolumeType
123-
size: number
124-
stripedNumber: number
125-
mirrorNumber: number
126-
}
127-
128110
export interface SchemaPartition {
129111
label: SchemaPartitionLabel
130112
number: number
131113
size: number
132114
}
133115

134-
export interface SchemaVolumeGroup {
135-
volumeGroupName: string
136-
physicalVolumes: string[]
137-
logicalVolumes: SchemaLogicalVolume[]
138-
}
139-
140116
export interface SchemaPool {
141117
name: string
142118
type: SchemaPoolType
@@ -156,10 +132,6 @@ export interface SchemaFilesystem {
156132
mountpoint: string
157133
}
158134

159-
export interface SchemaLVM {
160-
volumeGroups: SchemaVolumeGroup[]
161-
}
162-
163135
export interface SchemaRAID {
164136
name: string
165137
level: SchemaRAIDLevel
@@ -188,7 +160,6 @@ export interface Schema {
188160
disks: SchemaDisk[]
189161
raids: SchemaRAID[]
190162
filesystems: SchemaFilesystem[]
191-
lvm?: SchemaLVM
192163
zfs?: SchemaZFS
193164
}
194165

0 commit comments

Comments
 (0)