feat: introduce topology readiness and initialization #10

Merged
johnride merged 12 commits from feat/topologyDependencies into master 2025-04-23 15:58:32 +00:00
19 changed files with 1322 additions and 44 deletions
Showing only changes of commit 452ebc2614 - Show all commits

View File

@@ -19,6 +19,7 @@ pub enum InterpretName {
Dummy,
Panic,
OPNSense,
K3dInstallation,
}
impl std::fmt::Display for InterpretName {
@@ -32,6 +33,7 @@ impl std::fmt::Display for InterpretName {
InterpretName::Dummy => f.write_str("Dummy"),
InterpretName::Panic => f.write_str("Panic"),
InterpretName::OPNSense => f.write_str("OPNSense"),
InterpretName::K3dInstallation => f.write_str("K3dInstallation"),
}
}
}

View File

@@ -1,6 +1,13 @@
use async_trait::async_trait;
use serde::Serialize;
use crate::{score::Score, topology::Topology};
use crate::{
data::{Id, Version},
interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome},
inventory::Inventory,
score::Score,
topology::Topology,
};
#[derive(Debug, Clone, Serialize)]
pub struct K3DInstallationScore {}
@@ -29,3 +36,29 @@ impl<T: Topology> Score<T> for K3DInstallationScore {
todo!()
}
}
#[derive(Debug)]
struct K3dInstallationInterpret {}
#[async_trait]
impl<T: Topology> Interpret<T> for K3dInstallationInterpret {
async fn execute(
&self,
inventory: &Inventory,
topology: &T,
) -> Result<Outcome, InterpretError> {
todo!()
}
fn get_name(&self) -> InterpretName {
InterpretName::K3dInstallation
}
fn get_version(&self) -> Version {
todo!()
}
fn get_status(&self) -> InterpretStatus {
todo!()
}
fn get_children(&self) -> Vec<Id> {
todo!()
}
}