@@ -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-
8768const 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-
11882const 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-
179128const 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-
936873const 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-
956882const 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-
995912const 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
0 commit comments