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

Method validate_sandbox

crates/openshell-driver-vm/src/driver.rs:501–509  ·  view source on GitHub ↗
(&self, sandbox: &Sandbox)

Source from the content-addressed store, hash-verified

499 // gRPC API surface; boxing here would diverge from every other handler.
500 #[allow(clippy::result_large_err)]
501 pub fn validate_sandbox(&self, sandbox: &Sandbox) -> Result<(), Status> {
502 validate_vm_sandbox(sandbox, self.config.gpu_enabled)?;
503 if self.resolved_sandbox_image(sandbox).is_none() {
504 return Err(Status::failed_precondition(
505 "vm sandboxes require template.image or a configured default sandbox image",
506 ));
507 }
508 Ok(())
509 }
510
511 // `tonic::Status` is large but is the standard error type across the
512 // gRPC API surface; boxing here would diverge from every other handler.

Callers 1

Calls 2

validate_vm_sandboxFunction · 0.85

Tested by

no test coverage detected