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

Method remove_volume

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

Remove a named volume. Idempotent (not-found is ignored).

(&self, name: &str)

Source from the content-addressed store, hash-verified

493
494 /// Remove a named volume. Idempotent (not-found is ignored).
495 pub async fn remove_volume(&self, name: &str) -> Result<(), PodmanApiError> {
496 validate_name(name)?;
497 match self
498 .request_ok(
499 hyper::Method::DELETE,
500 &format!("/libpod/volumes/{name}"),
501 None,
502 )
503 .await
504 {
505 Ok(()) | Err(PodmanApiError::NotFound(_)) => Ok(()),
506 Err(e) => Err(e),
507 }
508 }
509
510 /// Inspect a named volume. Does not create the volume.
511 pub async fn inspect_volume(&self, name: &str) -> Result<VolumeInspect, PodmanApiError> {

Callers 3

create_sandboxMethod · 0.80
delete_sandboxMethod · 0.80
dropMethod · 0.80

Calls 2

validate_nameFunction · 0.85
request_okMethod · 0.80

Tested by 1

dropMethod · 0.64