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

Method sandbox_exists

crates/openshell-driver-podman/src/driver.rs:705–712  ·  view source on GitHub ↗

Check whether a sandbox container exists.

(&self, sandbox_name: &str)

Source from the content-addressed store, hash-verified

703
704 /// Check whether a sandbox container exists.
705 pub async fn sandbox_exists(&self, sandbox_name: &str) -> Result<bool, ComputeDriverError> {
706 let name = container::container_name(sandbox_name);
707 match self.client.inspect_container(&name).await {
708 Ok(_) => Ok(true),
709 Err(PodmanApiError::NotFound(_)) => Ok(false),
710 Err(e) => Err(ComputeDriverError::from(e)),
711 }
712 }
713
714 /// Fetch a single sandbox by name.
715 pub async fn get_sandbox(

Callers

nothing calls this directly

Calls 2

container_nameFunction · 0.85
inspect_containerMethod · 0.80

Tested by

no test coverage detected