Create a named volume. Idempotent (conflict is ignored).
(&self, name: &str)
| 486 | |
| 487 | /// Create a named volume. Idempotent (conflict is ignored). |
| 488 | pub async fn create_volume(&self, name: &str) -> Result<(), PodmanApiError> { |
| 489 | validate_name(name)?; |
| 490 | self.create_ignore_conflict("/libpod/volumes/create", &serde_json::json!({"Name": name})) |
| 491 | .await |
| 492 | } |
| 493 | |
| 494 | /// Remove a named volume. Idempotent (not-found is ignored). |
| 495 | pub async fn remove_volume(&self, name: &str) -> Result<(), PodmanApiError> { |