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

Function summary_container_target

crates/openshell-driver-docker/src/lib.rs:2868–2878  ·  view source on GitHub ↗
(summary: &ContainerSummary)

Source from the content-addressed store, hash-verified

2866}
2867
2868fn summary_container_target(summary: &ContainerSummary) -> Option<String> {
2869 // Prefer the container ID: it's stable while the container exists and is
2870 // accepted by Docker APIs just like a name. Fall back to the parsed name
2871 // for transient summaries that do not include an ID.
2872 summary
2873 .id
2874 .as_deref()
2875 .filter(|id| !id.is_empty())
2876 .map(str::to_string)
2877 .or_else(|| summary_container_name(summary))
2878}
2879
2880fn container_state_needs_shutdown_stop(state: ContainerSummaryStateEnum) -> bool {
2881 matches!(

Callers 4

delete_sandbox_innerMethod · 0.85
stop_sandbox_innerMethod · 0.85
resume_sandboxMethod · 0.85

Calls 2

summary_container_nameFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected