Automatically backup source network and VM configuration
This commit is contained in:
@ -240,6 +240,18 @@ impl AppConfig {
|
||||
pub fn vm_storage_path(&self, id: XMLUuid) -> PathBuf {
|
||||
self.disks_storage_path().join(id.as_string())
|
||||
}
|
||||
|
||||
pub fn definitions_path(&self) -> PathBuf {
|
||||
self.storage_path().join("definitions")
|
||||
}
|
||||
|
||||
pub fn vm_definition_path(&self, name: &str) -> PathBuf {
|
||||
self.definitions_path().join(format!("vm-{name}.json"))
|
||||
}
|
||||
|
||||
pub fn net_definition_path(&self, name: &str) -> PathBuf {
|
||||
self.definitions_path().join(format!("net-{name}.json"))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize)]
|
||||
|
Reference in New Issue
Block a user