From 734c9704abf383f56e89295286fd4db445459af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Viau-Trudel?= Date: Tue, 11 Nov 2025 13:30:03 -0500 Subject: [PATCH] feat: provide an unmanaged switch --- harmony/src/infra/brocade.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/harmony/src/infra/brocade.rs b/harmony/src/infra/brocade.rs index 774c8f8..ee87ea4 100644 --- a/harmony/src/infra/brocade.rs +++ b/harmony/src/infra/brocade.rs @@ -113,6 +113,37 @@ impl SwitchClient for BrocadeSwitchClient { } } +#[derive(Debug)] +pub struct UnmanagedSwitch; + +impl UnmanagedSwitch { + pub async fn init( ) -> Result { + Ok(Self) + } +} + +#[async_trait] +impl SwitchClient for UnmanagedSwitch { + async fn setup(&self) -> Result<(), SwitchError> { + todo!("unmanaged switch. Nothing to do.") + } + + async fn find_port( + &self, + mac_address: &MacAddress, + ) -> Result, SwitchError> { + todo!("unmanaged switch. Nothing to do.") + } + + async fn configure_port_channel( + &self, + channel_name: &str, + switch_ports: Vec, + ) -> Result { + todo!("unmanaged switch. Nothing to do.") + } +} + #[cfg(test)] mod tests { use std::sync::{Arc, Mutex};