(
status: Option<&openshell_core::proto::SandboxStatus>,
)
| 125 | } |
| 126 | |
| 127 | fn 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 | |
| 147 | fn provisioning_timeout_message( |
| 148 | timeout_secs: u64, |
no test coverage detected