Skip to content

Commit

Permalink
Add VirtualBlockDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
summerwind committed Oct 31, 2024
1 parent 9464fad commit 374a4df
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions entity/volume_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ package entity

// VolumeGroup represents the MAAS VolumeGroup endpoint.
type VolumeGroup struct {
Devices interface{} `json:"devices,omitempty"`
ResourceURI string `json:"resource_uri,omitempty"`
HumanSize string `json:"human_size,omitempty"`
UUID string `json:"uuid,omitempty"`
HumanAvailableSize string `json:"human_available_size,omitempty"`
SystemID string `json:"system_id,omitempty"`
HumanUsedSize string `json:"human_used_size,omitempty"`
Name string `json:"name,omitempty"`
LogicalVolumes []BlockDevice `json:"logical_volumes,omitempty"`
Size int64 `json:"size,omitempty"`
UsedSize int64 `json:"used_size,omitempty"`
AvailableSize int64 `json:"available_size,omitempty"`
ID int `json:"id,omitempty"`
Devices interface{} `json:"devices,omitempty"`
ResourceURI string `json:"resource_uri,omitempty"`
HumanSize string `json:"human_size,omitempty"`
UUID string `json:"uuid,omitempty"`
HumanAvailableSize string `json:"human_available_size,omitempty"`
SystemID string `json:"system_id,omitempty"`
HumanUsedSize string `json:"human_used_size,omitempty"`
Name string `json:"name,omitempty"`
LogicalVolumes []VirtualBlockDevice `json:"logical_volumes,omitempty"`
Size int64 `json:"size,omitempty"`
UsedSize int64 `json:"used_size,omitempty"`
AvailableSize int64 `json:"available_size,omitempty"`
ID int `json:"id,omitempty"`
}

// VolumeGroupCreateParams enumerates the parameters for the volume group create operation.
Expand All @@ -35,9 +35,14 @@ type VolumeGroupUpdateParams struct {
RemovePartitions []string `url:"remove_partitions,omitempty"`
}

// LogicalVolumeParams enumerates the parameters for the logical volume operation
// LogicalVolumeParams enumerates the parameters for the logical volume operation.
type LogicalVolumeParams struct {
Name string `url:"name,omitempty"`
UUID string `url:"uuid,omitempty"`
Size int64 `json:"size,omitempty"`
}

// VirtualBlockDevice represents a logical volume and extends BlockDevice.
type VirtualBlockDevice struct {
BlockDevice
}

0 comments on commit 374a4df

Please sign in to comment.