feat/ceph_validate_health #121

Merged
wjro merged 3 commits from feat/ceph_validate_health into master 2025-08-25 19:32:43 +00:00
2 changed files with 14 additions and 4 deletions
Showing only changes of commit a9fe4ab267 - Show all commits

View File

@ -1,4 +1,8 @@
use harmony::{inventory::Inventory, modules::storage::ceph::ceph_validate_health_score::CephVerifyClusterHealth, topology::K8sAnywhereTopology}; use harmony::{
inventory::Inventory,
modules::storage::ceph::ceph_validate_health_score::CephVerifyClusterHealth,
topology::K8sAnywhereTopology,
};
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {

View File

@ -49,7 +49,7 @@ impl<T: Topology + K8sclient> Interpret<T> for CephVerifyClusterHealthInterpret
} }
fn get_name(&self) -> InterpretName { fn get_name(&self) -> InterpretName {
InterpretName::CephClusterHealth InterpretName::CephClusterHealth
} }
fn get_version(&self) -> Version { fn get_version(&self) -> Version {
@ -123,8 +123,14 @@ impl CephVerifyClusterHealthInterpret {
.await?; .await?;
if health.contains("HEALTH_OK") { if health.contains("HEALTH_OK") {
return Ok(Outcome::success("Ceph Cluster in healthy state".to_string())) return Ok(Outcome::success(
"Ceph Cluster in healthy state".to_string(),
));
} else { } else {
Err(InterpretError::new(format!("Ceph cluster unhealthy {}", health)))} Err(InterpretError::new(format!(
"Ceph cluster unhealthy {}",
health
)))
}
} }
} }