refactor(host_network): extract NetworkManager as a reusable component (#183)
The NetworkManager logic was implemented directly into the `HaClusterTopology`, which wasn't directly its concern and prevented us from being able to reuse that NetworkManaager implementations in the future for a different Topology. * Extract a `NetworkManager` trait * Implement a `OpenShiftNmStateNetworkManager` for `NetworkManager` * Dynamically instantiate the NetworkManager in the Topology to delegate calls to it Reviewed-on: #183 Reviewed-by: johnride <jg@nationtech.io>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
net::{IpAddr, Ipv4Addr},
|
||||
sync::Arc,
|
||||
sync::{Arc, OnceLock},
|
||||
};
|
||||
|
||||
use brocade::BrocadeOptions;
|
||||
@@ -79,6 +79,7 @@ async fn main() {
|
||||
},
|
||||
workers: vec![],
|
||||
switch_client: switch_client.clone(),
|
||||
network_manager: OnceLock::new(),
|
||||
};
|
||||
|
||||
let inventory = Inventory {
|
||||
|
||||
Reference in New Issue
Block a user