diff --git a/harmony/src/modules/okd/bootstrap_01_prepare.rs b/harmony/src/modules/okd/bootstrap_01_prepare.rs index 988dcf63..6b24ccce 100644 --- a/harmony/src/modules/okd/bootstrap_01_prepare.rs +++ b/harmony/src/modules/okd/bootstrap_01_prepare.rs @@ -4,7 +4,10 @@ use crate::{ infra::inventory::InventoryRepositoryFactory, interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome}, inventory::{HostRole, Inventory}, - modules::inventory::{DiscoverHostForRoleScore, HarmonyDiscoveryStrategy}, + modules::{ + inventory::{DiscoverHostForRoleScore, HarmonyDiscoveryStrategy}, + okd::bootstrap_okd_node::OKDNodeInterpret, + }, score::Score, topology::HAClusterTopology, }; @@ -21,11 +24,16 @@ use serde::Serialize; // ------------------------------------------------------------------------------------------------- #[derive(Debug, Clone, Serialize, new)] -pub struct OKDSetup01InventoryScore {} +pub struct OKDSetup01InventoryScore { + pub discovery_strategy: HarmonyDiscoveryStrategy, +} impl Score for OKDSetup01InventoryScore { fn create_interpret(&self) -> Box> { - Box::new(OKDSetup01InventoryInterpret::new(self.clone())) + Box::new(OKDNodeInterpret::new( + HostRole::Bootstrap, + self.discovery_strategy.clone(), + )) } fn name(&self) -> String { diff --git a/harmony/src/modules/okd/installation.rs b/harmony/src/modules/okd/installation.rs index dce24576..9b16788a 100644 --- a/harmony/src/modules/okd/installation.rs +++ b/harmony/src/modules/okd/installation.rs @@ -67,7 +67,9 @@ impl OKDInstallationPipeline { discovery_strategy: HarmonyDiscoveryStrategy, ) -> Vec>> { vec![ - Box::new(OKDSetup01InventoryScore::new()), + Box::new(OKDSetup01InventoryScore { + discovery_strategy: discovery_strategy.clone(), + }), Box::new(OKDSetup02BootstrapScore::new()), Box::new(OKDSetup03ControlPlaneScore { discovery_strategy: discovery_strategy.clone(),