Automatically generate cloud disk image when updating domains configuration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -250,6 +250,19 @@ impl AppConfig {
|
||||
self.storage_path().join("iso")
|
||||
}
|
||||
|
||||
/// Get the path where generated cloud init disk image are stored
|
||||
pub fn cloud_init_disk_storage_path(&self) -> PathBuf {
|
||||
self.storage_path().join("cloud_init_disks")
|
||||
}
|
||||
|
||||
/// Get the path where the disk image of a VM is stored
|
||||
pub fn cloud_init_disk_path_for_vm(&self, name: &str) -> PathBuf {
|
||||
self.cloud_init_disk_storage_path().join(format!(
|
||||
"{}-{name}.iso",
|
||||
constants::CLOUD_INIT_IMAGE_PREFIX_NAME
|
||||
))
|
||||
}
|
||||
|
||||
/// Get disk images storage directory
|
||||
pub fn disk_images_storage_path(&self) -> PathBuf {
|
||||
self.storage_path().join("disk_images")
|
||||
|
Reference in New Issue
Block a user