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

Method get_sandbox

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

Fetch a single sandbox by name.

(
        &self,
        sandbox_name: &str,
    )

Source from the content-addressed store, hash-verified

713
714 /// Fetch a single sandbox by name.
715 pub async fn get_sandbox(
716 &self,
717 sandbox_name: &str,
718 ) -> Result<Option<DriverSandbox>, ComputeDriverError> {
719 let name = container::container_name(sandbox_name);
720 match self.client.inspect_container(&name).await {
721 Ok(inspect) => Ok(driver_sandbox_from_inspect(&inspect)),
722 Err(PodmanApiError::NotFound(_)) => Ok(None),
723 Err(e) => Err(ComputeDriverError::from(e)),
724 }
725 }
726
727 /// List all managed sandboxes.
728 ///

Callers

nothing calls this directly

Calls 3

container_nameFunction · 0.85
inspect_containerMethod · 0.80

Tested by

no test coverage detected