wip: refactoring

This commit is contained in:
Willem 2025-04-02 16:52:24 -04:00
parent fc718f11cf
commit 8a1627e728
2 changed files with 29 additions and 4 deletions

4
Cargo.lock generated
View File

@ -866,10 +866,6 @@ dependencies = [
"rand",
]
[[package]]
name = "example-topology2"
version = "0.1.0"
[[package]]
name = "example-tui"
version = "0.1.0"

View File

@ -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<DnsRecord>) -> 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<DnsRecord> {
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;