(&self)
| 644 | } |
| 645 | |
| 646 | async fn current_snapshots(&self) -> Result<Vec<DriverSandbox>, Status> { |
| 647 | let containers = self.list_managed_container_summaries().await?; |
| 648 | let container_sandboxes = containers |
| 649 | .iter() |
| 650 | .filter_map(|summary| { |
| 651 | sandbox_from_container_summary(summary, self.supervisor_readiness.as_ref()) |
| 652 | }) |
| 653 | .collect::<Vec<_>>(); |
| 654 | let mut by_id = self.pending_snapshot_map().await; |
| 655 | for sandbox in container_sandboxes { |
| 656 | by_id.insert(sandbox.id.clone(), sandbox); |
| 657 | } |
| 658 | let mut sandboxes = by_id.into_values().collect::<Vec<_>>(); |
| 659 | sandboxes.sort_by(|left, right| left.id.cmp(&right.id)); |
| 660 | Ok(sandboxes) |
| 661 | } |
| 662 | |
| 663 | async fn create_sandbox_inner(&self, sandbox: &DriverSandbox) -> Result<(), Status> { |
| 664 | let validated = Self::validated_sandbox(sandbox, &self.config)?; |
no test coverage detected