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

Function validate_vm_sandbox_template

crates/openshell-driver-vm/src/driver.rs:3157–3169  ·  view source on GitHub ↗
(template: &SandboxTemplate)

Source from the content-addressed store, hash-verified

3155
3156#[allow(clippy::result_large_err)]
3157fn validate_vm_sandbox_template(template: &SandboxTemplate) -> Result<(), Status> {
3158 if !template.agent_socket_path.is_empty() {
3159 return Err(Status::failed_precondition(
3160 "vm sandboxes do not support template.agent_socket_path",
3161 ));
3162 }
3163 if template.platform_config.is_some() {
3164 return Err(Status::failed_precondition(
3165 "vm sandboxes do not support template.platform_config",
3166 ));
3167 }
3168 Ok(())
3169}
3170
3171#[allow(clippy::result_large_err)]
3172fn validate_gpu_request(sandbox: &Sandbox, gpu_enabled: bool) -> Result<(), Status> {

Callers 1

validate_vm_sandboxFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected