Add basic NAT structures
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
use crate::constants;
|
||||
use crate::libvirt_lib_structures::XMLUuid;
|
||||
use crate::libvirt_rest_structures::net::NetworkName;
|
||||
use crate::libvirt_rest_structures::nw_filter::NetworkFilterName;
|
||||
use clap::Parser;
|
||||
use std::net::IpAddr;
|
||||
@ -250,8 +252,16 @@ impl AppConfig {
|
||||
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"))
|
||||
pub fn net_definition_path(&self, name: &NetworkName) -> PathBuf {
|
||||
self.definitions_path().join(format!("net-{}.json", name.0))
|
||||
}
|
||||
|
||||
pub fn nat_path(&self) -> PathBuf {
|
||||
self.storage_path().join(constants::STORAGE_NAT_DIR)
|
||||
}
|
||||
|
||||
pub fn net_nat_path(&self, name: &NetworkName) -> PathBuf {
|
||||
self.nat_path().join(format!("nat-{}.json", name.0))
|
||||
}
|
||||
|
||||
pub fn net_filter_definition_path(&self, name: &NetworkFilterName) -> PathBuf {
|
||||
|
Reference in New Issue
Block a user