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

Method list_containers

crates/openshell-driver-podman/src/client.rs:471–483  ·  view source on GitHub ↗

List containers matching a label filter (e.g. `"openshell.managed=true"`).

(
        &self,
        label_filter: &str,
    )

Source from the content-addressed store, hash-verified

469
470 /// List containers matching a label filter (e.g. `"openshell.managed=true"`).
471 pub async fn list_containers(
472 &self,
473 label_filter: &str,
474 ) -> Result<Vec<ContainerListEntry>, PodmanApiError> {
475 let filters = serde_json::json!({"label": [label_filter]});
476 let encoded = url_encode(&filters.to_string());
477 self.request_json(
478 hyper::Method::GET,
479 &format!("/libpod/containers/json?all=true&filters={encoded}"),
480 None,
481 )
482 .await
483 }
484
485 // ── Volume operations ────────────────────────────────────────────────
486

Callers 4

list_sandboxesMethod · 0.80
start_watchFunction · 0.80

Calls 2

url_encodeFunction · 0.85
request_jsonMethod · 0.80

Tested by

no test coverage detected