From 8a1627e72860e67db5f5beb62f8be49cd5dae6d3 Mon Sep 17 00:00:00 2001 From: Willem Date: Wed, 2 Apr 2025 16:52:24 -0400 Subject: [PATCH] wip: refactoring --- Cargo.lock | 4 ---- harmony/src/domain/topology/ha_cluster.rs | 29 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d65658c..6ac2599 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -866,10 +866,6 @@ dependencies = [ "rand", ] -[[package]] -name = "example-topology2" -version = "0.1.0" - [[package]] name = "example-tui" version = "0.1.0" diff --git a/harmony/src/domain/topology/ha_cluster.rs b/harmony/src/domain/topology/ha_cluster.rs index 0750b71..6a08ef3 100644 --- a/harmony/src/domain/topology/ha_cluster.rs +++ b/harmony/src/domain/topology/ha_cluster.rs @@ -78,6 +78,35 @@ impl HAClusterTopology { } } +#[async_trait] +impl DnsServer for HAClusterTopology{ + async fn register_dhcp_leases(&self, _register: bool) -> Result<(), ExecutorError> { + self.dns_server.register_dhcp_leases(_register) + } + async fn register_hosts(&self, _hosts: Vec) -> Result<(), ExecutorError> { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } + fn remove_record( + &mut self, + _name: &str, + _record_type: DnsRecordType, + ) -> Result<(), ExecutorError> { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } + async fn list_records(&self) -> Vec { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } + fn get_ip(&self) -> IpAddress { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } + fn get_host(&self) -> LogicalHost { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } + async fn commit_config(&self) -> Result<(), ExecutorError> { + unimplemented!("{}", UNIMPLEMENTED_DUMMY_INFRA) + } +} + #[derive(Debug)] struct DummyInfra;