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

Method from_sandbox

crates/openshell-driver-kubernetes/src/driver.rs:112–122  ·  view source on GitHub ↗
(sandbox: &Sandbox)

Source from the content-addressed store, hash-verified

110
111impl KubernetesSandboxDriverConfig {
112 fn from_sandbox(sandbox: &Sandbox) -> Result<Self, String> {
113 let Some(template) = sandbox
114 .spec
115 .as_ref()
116 .and_then(|spec| spec.template.as_ref())
117 else {
118 return Ok(Self::default());
119 };
120
121 Self::from_template(template)
122 }
123
124 fn from_template(template: &SandboxTemplate) -> Result<Self, String> {
125 let Some(config) = template.driver_config.as_ref() else {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected