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

Function resolve_image

crates/openshell-driver-podman/src/container.rs:317–324  ·  view source on GitHub ↗
(sandbox: &'a DriverSandbox, config: &'a PodmanComputeConfig)

Source from the content-addressed store, hash-verified

315/// if provided, otherwise the driver's default image.
316#[must_use]
317pub fn resolve_image<'a>(sandbox: &'a DriverSandbox, config: &'a PodmanComputeConfig) -> &'a str {
318 let spec = sandbox.spec.as_ref();
319 let template = spec.and_then(|s| s.template.as_ref());
320 template
321 .map(|t| t.image.as_str())
322 .filter(|s| !s.is_empty())
323 .unwrap_or(&config.default_image)
324}
325
326/// Merge environment variables from user spec/template with required driver vars.
327///

Calls 2

as_strMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected