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

Method from_template

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

Source from the content-addressed store, hash-verified

106 }
107
108 fn from_template(template: &SandboxTemplate) -> Result<Self, String> {
109 let Some(config) = template.driver_config.as_ref() else {
110 return Ok(Self::default());
111 };
112
113 serde_json::from_value(struct_to_json_value(config))
114 .map_err(|err| format!("invalid vm driver_config: {err}"))
115 }
116}
117
118/// gvproxy host-loopback IP — gvproxy's TCP/UDP/ICMP forwarder NAT-rewrites

Callers

nothing calls this directly

Calls 1

struct_to_json_valueFunction · 0.85

Tested by

no test coverage detected