From 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 30 Sep 2021 14:43:39 -0400 Subject: Add --time out for podman * rm -f commands Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh --- pkg/api/handlers/compat/volumes.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/api/handlers/compat/volumes.go') diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go index 0f9b66888..e779aa185 100644 --- a/pkg/api/handlers/compat/volumes.go +++ b/pkg/api/handlers/compat/volumes.go @@ -213,7 +213,8 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) { decoder = r.Context().Value(api.DecoderKey).(*schema.Decoder) ) query := struct { - Force bool `schema:"force"` + Force bool `schema:"force"` + Timeout *uint `schema:"timeout"` }{ // override any golang type defaults } @@ -239,7 +240,7 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) { vol, err := runtime.LookupVolume(name) if err == nil { // As above, we do not pass `force` from the query parameters here - if err := runtime.RemoveVolume(r.Context(), vol, false); err != nil { + if err := runtime.RemoveVolume(r.Context(), vol, false, query.Timeout); err != nil { if errors.Cause(err) == define.ErrVolumeBeingUsed { utils.Error(w, "volumes being used", http.StatusConflict, err) } else { -- cgit v1.2.3-54-g00ecf