(sandbox: &'a DriverSandbox, config: &'a PodmanComputeConfig)
| 315 | /// if provided, otherwise the driver's default image. |
| 316 | #[must_use] |
| 317 | pub 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 | /// |
no test coverage detected