Refactorize disks list
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-05-31 09:05:10 +02:00
parent c7cc15d8d0
commit 5fe481ffed
6 changed files with 31 additions and 36 deletions

View File

@ -315,7 +315,7 @@ impl VMInfo {
),
bus: match disk.bus {
VMDiskBus::Virtio => "virtio",
VMDiskBus::Sata => "sata",
VMDiskBus::SATA => "sata",
}
.to_string(),
},

View File

@ -16,7 +16,7 @@ enum VMDisksError {
#[derive(serde::Serialize, serde::Deserialize)]
pub enum VMDiskBus {
Virtio,
Sata,
SATA,
}
/// Disk allocation type
@ -72,7 +72,7 @@ impl VMFileDisk {
bus: match bus {
"virtio" => VMDiskBus::Virtio,
"sata" => VMDiskBus::Sata,
"sata" => VMDiskBus::SATA,
_ => anyhow::bail!("Unsupported disk bus type: {bus}"),
},