Skip to content

Commit 526fc67

Browse files
authored
chore(baremetal): remove lvm from partitioning (scaleway#2230)
1 parent c3abf30 commit 526fc67

File tree

1 file changed

+0
-81
lines changed

1 file changed

+0
-81
lines changed

api/baremetal/v1/baremetal_sdk.go

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -390,55 +390,6 @@ func (enum *SchemaFilesystemFormat) UnmarshalJSON(data []byte) error {
390390
return nil
391391
}
392392

393-
type SchemaLogicalVolumeType string
394-
395-
const (
396-
SchemaLogicalVolumeTypeUnknownRaidType = SchemaLogicalVolumeType("unknown_raid_type")
397-
SchemaLogicalVolumeTypeStriped = SchemaLogicalVolumeType("striped")
398-
SchemaLogicalVolumeTypeMirror = SchemaLogicalVolumeType("mirror")
399-
SchemaLogicalVolumeTypeRaid0 = SchemaLogicalVolumeType("raid0")
400-
SchemaLogicalVolumeTypeRaid1 = SchemaLogicalVolumeType("raid1")
401-
SchemaLogicalVolumeTypeRaid5 = SchemaLogicalVolumeType("raid5")
402-
SchemaLogicalVolumeTypeRaid6 = SchemaLogicalVolumeType("raid6")
403-
SchemaLogicalVolumeTypeRaid10 = SchemaLogicalVolumeType("raid10")
404-
)
405-
406-
func (enum SchemaLogicalVolumeType) String() string {
407-
if enum == "" {
408-
// return default value if empty
409-
return "unknown_raid_type"
410-
}
411-
return string(enum)
412-
}
413-
414-
func (enum SchemaLogicalVolumeType) Values() []SchemaLogicalVolumeType {
415-
return []SchemaLogicalVolumeType{
416-
"unknown_raid_type",
417-
"striped",
418-
"mirror",
419-
"raid0",
420-
"raid1",
421-
"raid5",
422-
"raid6",
423-
"raid10",
424-
}
425-
}
426-
427-
func (enum SchemaLogicalVolumeType) MarshalJSON() ([]byte, error) {
428-
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
429-
}
430-
431-
func (enum *SchemaLogicalVolumeType) UnmarshalJSON(data []byte) error {
432-
tmp := ""
433-
434-
if err := json.Unmarshal(data, &tmp); err != nil {
435-
return err
436-
}
437-
438-
*enum = SchemaLogicalVolumeType(SchemaLogicalVolumeType(tmp).String())
439-
return nil
440-
}
441-
442393
type SchemaPartitionLabel string
443394

444395
const (
@@ -451,7 +402,6 @@ const (
451402
SchemaPartitionLabelData = SchemaPartitionLabel("data")
452403
SchemaPartitionLabelHome = SchemaPartitionLabel("home")
453404
SchemaPartitionLabelRaid = SchemaPartitionLabel("raid")
454-
SchemaPartitionLabelLvm = SchemaPartitionLabel("lvm")
455405
SchemaPartitionLabelZfs = SchemaPartitionLabel("zfs")
456406
)
457407

@@ -474,7 +424,6 @@ func (enum SchemaPartitionLabel) Values() []SchemaPartitionLabel {
474424
"data",
475425
"home",
476426
"raid",
477-
"lvm",
478427
"zfs",
479428
}
480429
}
@@ -885,20 +834,6 @@ func (enum *SettingType) UnmarshalJSON(data []byte) error {
885834
return nil
886835
}
887836

888-
// SchemaLogicalVolume: schema logical volume.
889-
type SchemaLogicalVolume struct {
890-
Name string `json:"name"`
891-
892-
// Type: default value: unknown_raid_type
893-
Type SchemaLogicalVolumeType `json:"type"`
894-
895-
Size scw.Size `json:"size"`
896-
897-
StripedNumber int32 `json:"striped_number"`
898-
899-
MirrorNumber int32 `json:"mirror_number"`
900-
}
901-
902837
// SchemaPartition: schema partition.
903838
type SchemaPartition struct {
904839
// Label: default value: unknown_partition_label
@@ -909,15 +844,6 @@ type SchemaPartition struct {
909844
Size scw.Size `json:"size"`
910845
}
911846

912-
// SchemaVolumeGroup: schema volume group.
913-
type SchemaVolumeGroup struct {
914-
VolumeGroupName string `json:"volume_group_name"`
915-
916-
PhysicalVolumes []string `json:"physical_volumes"`
917-
918-
LogicalVolumes []*SchemaLogicalVolume `json:"logical_volumes"`
919-
}
920-
921847
// SchemaPool: schema pool.
922848
type SchemaPool struct {
923849
Name string `json:"name"`
@@ -949,11 +875,6 @@ type SchemaFilesystem struct {
949875
Mountpoint string `json:"mountpoint"`
950876
}
951877

952-
// SchemaLVM: schema lvm.
953-
type SchemaLVM struct {
954-
VolumeGroups []*SchemaVolumeGroup `json:"volume_groups"`
955-
}
956-
957878
// SchemaRAID: schema raid.
958879
type SchemaRAID struct {
959880
Name string `json:"name"`
@@ -999,8 +920,6 @@ type Schema struct {
999920

1000921
Filesystems []*SchemaFilesystem `json:"filesystems"`
1001922

1002-
Lvm *SchemaLVM `json:"lvm"`
1003-
1004923
Zfs *SchemaZFS `json:"zfs"`
1005924
}
1006925

0 commit comments

Comments
 (0)