diff --git a/examples/opnsense_node_exporter/src/main.rs b/examples/opnsense_node_exporter/src/main.rs index 15664ab..4b16841 100644 --- a/examples/opnsense_node_exporter/src/main.rs +++ b/examples/opnsense_node_exporter/src/main.rs @@ -25,7 +25,9 @@ struct OpnSenseTopology { #[async_trait] impl Topology for OpnSenseTopology { async fn ensure_ready(&self) -> Result { - Ok(PreparationOutcome::Success{ details: "Success".to_string() }) + Ok(PreparationOutcome::Success { + details: "Success".to_string(), + }) } fn name(&self) -> &str { "OpnsenseTopology" diff --git a/harmony/src/infra/opnsense/node_exporter.rs b/harmony/src/infra/opnsense/node_exporter.rs index 3a16ffc..97d2a09 100644 --- a/harmony/src/infra/opnsense/node_exporter.rs +++ b/harmony/src/infra/opnsense/node_exporter.rs @@ -25,7 +25,10 @@ impl NodeExporter for OPNSenseFirewall { })?; } - config.node_exporter().enable(true).map_err(|e|ExecutorError::UnexpectedError(e.to_string()))?; + config + .node_exporter() + .enable(true) + .map_err(|e| ExecutorError::UnexpectedError(e.to_string()))?; Ok(()) } async fn commit_config(&self) -> Result<(), ExecutorError> { diff --git a/opnsense-config/src/config/config.rs b/opnsense-config/src/config/config.rs index 30240e4..236a89e 100644 --- a/opnsense-config/src/config/config.rs +++ b/opnsense-config/src/config/config.rs @@ -14,6 +14,7 @@ use opnsense_config_xml::OPNsense; use russh::client; use serde::Serialize; use sha2::Digest; +use tokio::time::{sleep, Duration}; use super::{ConfigManager, OPNsenseShell};