(
sandbox: &DriverSandbox,
namespace: &str,
condition: DriverCondition,
deleting: bool,
)
| 1566 | } |
| 1567 | |
| 1568 | fn pending_sandbox_snapshot( |
| 1569 | sandbox: &DriverSandbox, |
| 1570 | namespace: &str, |
| 1571 | condition: DriverCondition, |
| 1572 | deleting: bool, |
| 1573 | ) -> DriverSandbox { |
| 1574 | DriverSandbox { |
| 1575 | id: sandbox.id.clone(), |
| 1576 | name: sandbox.name.clone(), |
| 1577 | namespace: namespace.to_string(), |
| 1578 | spec: None, |
| 1579 | status: Some(DriverSandboxStatus { |
| 1580 | sandbox_name: sandbox.name.clone(), |
| 1581 | instance_id: String::new(), |
| 1582 | agent_fd: String::new(), |
| 1583 | sandbox_fd: String::new(), |
| 1584 | conditions: vec![condition], |
| 1585 | deleting, |
| 1586 | }), |
| 1587 | } |
| 1588 | } |
| 1589 | |
| 1590 | fn pending_sandbox_matches(sandbox: &DriverSandbox, sandbox_id: &str, sandbox_name: &str) -> bool { |
| 1591 | (!sandbox_id.is_empty() && sandbox.id == sandbox_id) |
no outgoing calls