feat/ceph_validate_health #121
@ -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]
|
||||
async fn main() {
|
||||
|
@ -49,7 +49,7 @@ impl<T: Topology + K8sclient> Interpret<T> for CephVerifyClusterHealthInterpret
|
||||
}
|
||||
|
||||
fn get_name(&self) -> InterpretName {
|
||||
InterpretName::CephClusterHealth
|
||||
InterpretName::CephClusterHealth
|
||||
}
|
||||
|
||||
fn get_version(&self) -> Version {
|
||||
@ -123,8 +123,14 @@ impl CephVerifyClusterHealthInterpret {
|
||||
.await?;
|
||||
|
||||
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 {
|
||||
Err(InterpretError::new(format!("Ceph cluster unhealthy {}", health)))}
|
||||
Err(InterpretError::new(format!(
|
||||
"Ceph cluster unhealthy {}",
|
||||
health
|
||||
)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user