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

Function sandboxes_using_provider

crates/openshell-server/src/grpc/provider.rs:350–367  ·  view source on GitHub ↗
(
    store: &Store,
    provider_name: &str,
)

Source from the content-addressed store, hash-verified

348}
349
350async fn sandboxes_using_provider(
351 store: &Store,
352 provider_name: &str,
353) -> Result<Vec<String>, Status> {
354 let provider_name = provider_name.to_string();
355 let mut names = scan_sandboxes(store, |sandbox| {
356 let spec = sandbox.spec.as_ref()?;
357 if spec.providers.iter().any(|n| n == &provider_name) {
358 Some(sandbox.object_name().to_string())
359 } else {
360 None
361 }
362 })
363 .await?;
364 names.sort();
365 names.dedup();
366 Ok(names)
367}
368
369async fn sandboxes_using_provider_records(
370 store: &Store,

Callers 1

delete_provider_recordFunction · 0.85

Calls 2

scan_sandboxesFunction · 0.85
object_nameMethod · 0.80

Tested by

no test coverage detected