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

Function cleanup_sandbox_token_file

crates/openshell-driver-podman/src/driver.rs:126–143  ·  view source on GitHub ↗
(sandbox_id: &str)

Source from the content-addressed store, hash-verified

124}
125
126fn cleanup_sandbox_token_file(sandbox_id: &str) {
127 let Ok(path) = sandbox_token_host_path(sandbox_id) else {
128 return;
129 };
130 if let Err(err) = std::fs::remove_file(&path)
131 && err.kind() != std::io::ErrorKind::NotFound
132 {
133 warn!(
134 sandbox_id = %sandbox_id,
135 path = %path.display(),
136 error = %err,
137 "Failed to remove Podman sandbox token file"
138 );
139 }
140 if let Some(dir) = path.parent() {
141 let _ = std::fs::remove_dir(dir);
142 }
143}
144
145fn local_podman_cdi_gpu_inventory_from(dev_root: &Path) -> CdiGpuInventory {
146 let mut device_ids = std::fs::read_dir(dev_root)

Callers 2

create_sandboxMethod · 0.70
delete_sandboxMethod · 0.70

Calls 1

sandbox_token_host_pathFunction · 0.70

Tested by

no test coverage detected