feat: provide an unmanaged switch
Some checks failed
Run Check Script / check (pull_request) Failing after 40s
Some checks failed
Run Check Script / check (pull_request) Failing after 40s
This commit is contained in:
parent
83c1cc82b6
commit
734c9704ab
@ -113,6 +113,37 @@ impl SwitchClient for BrocadeSwitchClient {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UnmanagedSwitch;
|
||||
|
||||
impl UnmanagedSwitch {
|
||||
pub async fn init( ) -> Result<Self, ()> {
|
||||
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<Option<PortLocation>, SwitchError> {
|
||||
todo!("unmanaged switch. Nothing to do.")
|
||||
}
|
||||
|
||||
async fn configure_port_channel(
|
||||
&self,
|
||||
channel_name: &str,
|
||||
switch_ports: Vec<PortLocation>,
|
||||
) -> Result<u8, SwitchError> {
|
||||
todo!("unmanaged switch. Nothing to do.")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user