diff options
author | Brent Baude <bbaude@redhat.com> | 2020-02-27 10:59:53 -0600 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-02-28 09:36:53 -0600 |
commit | 09048731000e73b44a0243a0339d8c122eb8a165 (patch) | |
tree | db939805cbb41f4ddd2db610256ba2186a8367db /pkg/api/handlers/containers.go | |
parent | baf27fa25eed668b5a73a1d7d4fe16214f1c260f (diff) | |
download | podman-09048731000e73b44a0243a0339d8c122eb8a165.tar.gz podman-09048731000e73b44a0243a0339d8c122eb8a165.tar.bz2 podman-09048731000e73b44a0243a0339d8c122eb8a165.zip |
rework apiv2 wait endpoint|binding
added the ability to wait on a condition (stopped, running, paused...) for a container. if a condition is not provided, wait will default to the stopped condition which uses the original wait code paths. if the condition is stopped, the container exit code will be returned.
also, correct a mux issue we discovered.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/handlers/containers.go')
-rw-r--r-- | pkg/api/handlers/containers.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/api/handlers/containers.go b/pkg/api/handlers/containers.go index d7d040ce2..ee080e794 100644 --- a/pkg/api/handlers/containers.go +++ b/pkg/api/handlers/containers.go @@ -8,7 +8,6 @@ import ( "github.com/containers/libpod/libpod" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/api/handlers/utils" - "github.com/gorilla/mux" "github.com/gorilla/schema" "github.com/pkg/errors" ) @@ -179,7 +178,7 @@ func RestartContainer(w http.ResponseWriter, r *http.Request) { } timeout := con.StopTimeout() - if _, found := mux.Vars(r)["t"]; found { + if _, found := r.URL.Query()["t"]; found { timeout = uint(query.Timeout) } |