MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / ready_false_condition_message

Function ready_false_condition_message

crates/openshell-cli/src/run.rs:127–145  ·  view source on GitHub ↗
(
    status: Option<&openshell_core::proto::SandboxStatus>,
)

Source from the content-addressed store, hash-verified

125}
126
127fn ready_false_condition_message(
128 status: Option<&openshell_core::proto::SandboxStatus>,
129) -> Option<String> {
130 let condition = status?.conditions.iter().find(|condition| {
131 condition.r#type == "Ready" && condition.status.eq_ignore_ascii_case("false")
132 })?;
133
134 if condition.message.is_empty() {
135 if condition.reason.is_empty() {
136 None
137 } else {
138 Some(condition.reason.clone())
139 }
140 } else if condition.reason.is_empty() {
141 Some(condition.message.clone())
142 } else {
143 Some(format!("{}: {}", condition.reason, condition.message))
144 }
145}
146
147fn provisioning_timeout_message(
148 timeout_secs: u64,

Callers 1

sandbox_createFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected