diff --git a/harmony-rs/README.md b/harmony-rs/README.md new file mode 100644 index 0000000..83bab1a --- /dev/null +++ b/harmony-rs/README.md @@ -0,0 +1,7 @@ +Due to the current setup being a mix of separate repositories with gitignore and rust workspace, a few options are required for cargo-watch to have the desired behavior : + +```sh +RUST_LOG=info cargo watch --ignore-nothing -w harmony -w private_repos/ -x 'run --bin nationtech' +``` + +This will run the nationtech bin (likely `private_repos/nationtech/src/main.rs`) on any change in the harmony or private_repos folders. diff --git a/harmony-rs/harmony/src/domain/executors/mod.rs b/harmony-rs/harmony/src/domain/executors/mod.rs index 9e991cb..e7ca378 100644 --- a/harmony-rs/harmony/src/domain/executors/mod.rs +++ b/harmony-rs/harmony/src/domain/executors/mod.rs @@ -31,5 +31,10 @@ impl std::error::Error for ExecutorError {} #[async_trait] pub trait SshClient { - async fn test_connection(&self, address: IpAddress, username: &str, password: &str) -> Result<(), ExecutorError>; + async fn test_connection( + &self, + address: IpAddress, + username: &str, + password: &str, + ) -> Result<(), ExecutorError>; } diff --git a/harmony-rs/harmony/src/domain/hardware/mod.rs b/harmony-rs/harmony/src/domain/hardware/mod.rs index 2a1fdb4..985e16e 100644 --- a/harmony-rs/harmony/src/domain/hardware/mod.rs +++ b/harmony-rs/harmony/src/domain/hardware/mod.rs @@ -1,25 +1,68 @@ +use std::sync::Arc; + use derive_new::new; -pub type HostGroup = Vec; +use crate::topology::MacAddress; + +pub type HostGroup = Vec; pub type SwitchGroup = Vec; -pub type FirewallGroup = Vec; +pub type FirewallGroup = Vec; #[derive(Debug, Clone)] -pub struct Host { +pub struct PhysicalHost { pub category: HostCategory, pub network: Vec, + pub management: Arc, pub storage: Vec, pub labels: Vec