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

Function driver_sandbox_from_public

crates/openshell-server/src/compute/mod.rs:1550–1565  ·  view source on GitHub ↗
(
    sandbox: &Sandbox,
    driver_name: &str,
)

Source from the content-addressed store, hash-verified

1548}
1549
1550fn driver_sandbox_from_public(
1551 sandbox: &Sandbox,
1552 driver_name: &str,
1553) -> Result<DriverSandbox, Box<Status>> {
1554 Ok(DriverSandbox {
1555 id: sandbox.object_id().to_string(),
1556 name: sandbox.object_name().to_string(),
1557 namespace: String::new(), // Namespace is set by the driver based on its config
1558 spec: sandbox
1559 .spec
1560 .as_ref()
1561 .map(|spec| driver_sandbox_spec_from_public(spec, driver_name))
1562 .transpose()?,
1563 status: sandbox.status.as_ref().map(driver_status_from_public),
1564 })
1565}
1566
1567fn driver_sandbox_spec_from_public(
1568 spec: &SandboxSpec,

Callers 2

create_sandboxMethod · 0.85

Calls 3

object_idMethod · 0.80
object_nameMethod · 0.80

Tested by

no test coverage detected