(sandbox: &Sandbox)
| 3998 | } |
| 3999 | |
| 4000 | fn merged_environment(sandbox: &Sandbox) -> HashMap<String, String> { |
| 4001 | let mut environment = sandbox |
| 4002 | .spec |
| 4003 | .as_ref() |
| 4004 | .and_then(|spec| spec.template.as_ref()) |
| 4005 | .map_or_else(HashMap::new, |template| template.environment.clone()); |
| 4006 | if let Some(spec) = sandbox.spec.as_ref() { |
| 4007 | environment.extend(spec.environment.clone()); |
| 4008 | } |
| 4009 | environment |
| 4010 | } |
| 4011 | |
| 4012 | /// Rewrites loopback host references in a gateway URL to a hostname the guest |
| 4013 | /// can reach via gvproxy. |
no outgoing calls