Created first disk

This commit is contained in:
2023-10-26 11:43:05 +02:00
parent 081b0f7784
commit bdb2f6427d
14 changed files with 393 additions and 25 deletions

View File

@ -1,3 +1,4 @@
use crate::libvirt_lib_structures::DomainXMLUuid;
use clap::Parser;
use std::path::{Path, PathBuf};
@ -156,9 +157,18 @@ impl AppConfig {
self.storage_path().join("iso")
}
/// Get VM vnc sockets
/// Get VM vnc sockets directory
pub fn vnc_sockets_path(&self) -> PathBuf {
self.storage_path().to_path_buf()
self.storage_path().join("vnc")
}
/// Get VM vnc sockets directory
pub fn disks_storage_path(&self) -> PathBuf {
self.storage_path().join("disks")
}
pub fn vm_storage_path(&self, id: DomainXMLUuid) -> PathBuf {
self.disks_storage_path().join(id.as_string())
}
}