(sandbox: &Sandbox)
| 3425 | } |
| 3426 | |
| 3427 | fn sandbox_to_json(sandbox: &Sandbox) -> serde_json::Value { |
| 3428 | let meta = sandbox.metadata.as_ref(); |
| 3429 | let labels = meta.map_or_else(|| serde_json::json!({}), |m| serde_json::json!(m.labels)); |
| 3430 | serde_json::json!({ |
| 3431 | "id": sandbox.object_id(), |
| 3432 | "name": sandbox.object_name(), |
| 3433 | "labels": labels, |
| 3434 | "resource_version": meta.map_or(0, |m| m.resource_version), |
| 3435 | "created_at": format_epoch_ms(meta.map_or(0, |m| m.created_at_ms)), |
| 3436 | "phase": phase_name(sandbox.phase()), |
| 3437 | "current_policy_version": sandbox.current_policy_version(), |
| 3438 | }) |
| 3439 | } |
| 3440 | |
| 3441 | pub async fn sandbox_provider_list(server: &str, name: &str, tls: &TlsOptions) -> Result<()> { |
| 3442 | let mut client = grpc_client(server, tls).await?; |
nothing calls this directly
no outgoing calls
no test coverage detected