diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-09-30 14:43:39 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-10-04 07:07:56 -0400 |
commit | 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d (patch) | |
tree | 56793ffd885f835fa54013e9914844ff9ba20d92 /pkg/api/handlers/libpod/pods.go | |
parent | 36821d302e3787a42d6eefdbd0bdbb6d9da261fb (diff) | |
download | podman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.tar.gz podman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.tar.bz2 podman-21c9dc3c406bb486c44c4a27e5b0497bab1cd40d.zip |
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 <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/pods.go')
-rw-r--r-- | pkg/api/handlers/libpod/pods.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 7bd6d3dbf..77d026550 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -246,7 +246,8 @@ func PodDelete(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 } @@ -262,7 +263,7 @@ func PodDelete(w http.ResponseWriter, r *http.Request) { utils.PodNotFound(w, name, err) return } - if err := runtime.RemovePod(r.Context(), pod, true, query.Force); err != nil { + if err := runtime.RemovePod(r.Context(), pod, true, query.Force, query.Timeout); err != nil { utils.Error(w, "Something went wrong", http.StatusInternalServerError, err) return } |