Can delete uploaded disk images

This commit is contained in:
2025-05-29 08:45:38 +02:00
parent 615dc1ed83
commit 927a51cda7
6 changed files with 89 additions and 11 deletions

View File

@ -245,7 +245,7 @@ impl AppConfig {
storage_path.canonicalize().unwrap()
}
/// Get iso storage directory
/// Get iso files storage directory
pub fn iso_storage_path(&self) -> PathBuf {
self.storage_path().join("iso")
}
@ -265,15 +265,17 @@ impl AppConfig {
self.vnc_sockets_path().join(format!("vnc-{}", name))
}
/// Get VM vnc sockets directory
pub fn disks_storage_path(&self) -> PathBuf {
/// Get VM root disks storage directory
pub fn root_vm_disks_storage_path(&self) -> PathBuf {
self.storage_path().join("disks")
}
/// Get specific VM disk storage directory
pub fn vm_storage_path(&self, id: XMLUuid) -> PathBuf {
self.disks_storage_path().join(id.as_string())
self.root_vm_disks_storage_path().join(id.as_string())
}
/// Get the path were VM definitions are backed up
pub fn definitions_path(&self) -> PathBuf {
self.storage_path().join("definitions")
}