From 58c1fd4a963db39cfaea556b94da99f197fb4bc4 Mon Sep 17 00:00:00 2001 From: Ian Letourneau Date: Thu, 25 Sep 2025 17:17:23 -0400 Subject: [PATCH] remove unused code --- .../modules/okd/bootstrap_03_control_plane.rs | 7 +-- harmony/src/modules/okd/crd/machineconfig.rs | 43 ------------------- harmony/src/modules/okd/crd/mod.rs | 1 - 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 harmony/src/modules/okd/crd/machineconfig.rs diff --git a/harmony/src/modules/okd/bootstrap_03_control_plane.rs b/harmony/src/modules/okd/bootstrap_03_control_plane.rs index a3fe4c2..5efb983 100644 --- a/harmony/src/modules/okd/bootstrap_03_control_plane.rs +++ b/harmony/src/modules/okd/bootstrap_03_control_plane.rs @@ -206,10 +206,6 @@ impl OKDSetup03ControlPlaneInterpret { Ok(()) } - // TODO: Apply host network configuration. - // Delegate to a score: HostNetworkConfigurationScore { host: physical_host } qui manipule Switch dans Topology - // Use-case Affilium: remplacement carte reseau, pas juste installation clean - // /// Placeholder for automating network bonding configuration. async fn persist_network_bond( &self, @@ -217,8 +213,7 @@ impl OKDSetup03ControlPlaneInterpret { topology: &HAClusterTopology, hosts: &Vec, ) -> Result<(), InterpretError> { - // Generate MC or NNCP from inventory NIC data; apply via ignition or post-join. - info!("[ControlPlane] Ensuring persistent bonding via MachineConfig/NNCP"); + info!("[ControlPlane] Ensuring persistent bonding"); let score = HostNetworkConfigurationScore { hosts: hosts.clone(), // FIXME: Avoid clone if possible }; diff --git a/harmony/src/modules/okd/crd/machineconfig.rs b/harmony/src/modules/okd/crd/machineconfig.rs deleted file mode 100644 index df710e2..0000000 --- a/harmony/src/modules/okd/crd/machineconfig.rs +++ /dev/null @@ -1,43 +0,0 @@ -use kube::CustomResource; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -#[derive(CustomResource, Deserialize, Serialize, Clone, Debug, JsonSchema)] -#[kube( - group = "machineconfiguration.openshift.io", - version = "v1", - kind = "MachineConfig", - namespaced -)] -#[serde(rename_all = "camelCase")] -pub struct MachineConfigSpec { - pub config: Config, -} - -#[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] -#[serde(rename_all = "camelCase")] -pub struct Config { - pub ignition: Ignition, - pub storage: Option, -} - -#[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] -pub struct Ignition { - pub version: String, -} - -#[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] -pub struct Storage { - pub files: Vec, -} - -#[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] -pub struct File { - pub path: String, - pub contents: FileContents, -} - -#[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] -pub struct FileContents { - pub source: String, -} diff --git a/harmony/src/modules/okd/crd/mod.rs b/harmony/src/modules/okd/crd/mod.rs index aa35190..c1a68ce 100644 --- a/harmony/src/modules/okd/crd/mod.rs +++ b/harmony/src/modules/okd/crd/mod.rs @@ -2,7 +2,6 @@ use kube::CustomResource; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -pub mod machineconfig; pub mod nmstate; #[derive(CustomResource, Deserialize, Serialize, Clone, Debug, JsonSchema)]