summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-02 20:23:26 +0100
committerGitHub <noreply@github.com>2020-03-02 20:23:26 +0100
commit47c4ea39196cedac87e7a4e4c1ead54ed9d7ed50 (patch)
tree64ce3ceb630aaecf993b1747bf8ba7f3f3af170f /pkg/api/server
parentf9a476833bc8461dd246db0b31f542ad4a6d7587 (diff)
parent09048731000e73b44a0243a0339d8c122eb8a165 (diff)
downloadpodman-47c4ea39196cedac87e7a4e4c1ead54ed9d7ed50.tar.gz
podman-47c4ea39196cedac87e7a4e4c1ead54ed9d7ed50.tar.bz2
podman-47c4ea39196cedac87e7a4e4c1ead54ed9d7ed50.zip
Merge pull request #5347 from baude/apiv2wait
rework apiv2 wait endpoint|binding
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_containers.go31
1 files changed, 25 insertions, 6 deletions
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 6a2ba4b1e..6aad7ff88 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -436,8 +436,8 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// ---
// tags:
// - containers (compat)
- // summary: Wait on a container to exit
- // description: Block until a container stops, then returns the exit code.
+ // summary: Wait on a container
+ // description: Block until a container stops or given condition is met.
// parameters:
// - in: path
// name: name
@@ -447,7 +447,14 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// - in: query
// name: condition
// type: string
- // description: not supported
+ // description: |
+ // wait until container is to a given condition. default is stopped. valid conditions are:
+ // - configured
+ // - created
+ // - exited
+ // - paused
+ // - running
+ // - stopped
// produces:
// - application/json
// responses:
@@ -1030,18 +1037,30 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// ---
// tags:
// - containers
- // summary: Wait on a container to exit
+ // summary: Wait on a container
+ // description: Wait on a container to met a given condition
// parameters:
// - in: path
// name: name
// type: string
// required: true
// description: the name or ID of the container
+ // - in: query
+ // name: condition
+ // type: string
+ // description: |
+ // wait until container is to a given condition. default is stopped. valid conditions are:
+ // - configured
+ // - created
+ // - exited
+ // - paused
+ // - running
+ // - stopped
// produces:
// - application/json
// responses:
- // 204:
- // description: no error
+ // 200:
+ // $ref: "#/responses/ContainerWaitResponse"
// 404:
// $ref: "#/responses/NoSuchContainer"
// 500: