summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-15 23:33:10 +0100
committerGitHub <noreply@github.com>2020-01-15 23:33:10 +0100
commit741e29caf39c57551724a48265f6d9641f8f6fe0 (patch)
tree402ec832106bdc4da02fcc30927c465152b1fe72 /pkg/api/server/register_containers.go
parent0870e88ff48eaf6b5624044b7cd2bc35cff85150 (diff)
parent69bd57f518cbc7c97808a663d76066d0d247ac0f (diff)
downloadpodman-741e29caf39c57551724a48265f6d9641f8f6fe0.tar.gz
podman-741e29caf39c57551724a48265f6d9641f8f6fe0.tar.bz2
podman-741e29caf39c57551724a48265f6d9641f8f6fe0.zip
Merge pull request #4860 from vrothberg/v2-top
v2 api: top improvements
Diffstat (limited to 'pkg/api/server/register_containers.go')
-rw-r--r--pkg/api/server/register_containers.go30
1 files changed, 29 insertions, 1 deletions
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 8b0b816cd..b275fa4d1 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -371,7 +371,7 @@ func (s *APIServer) RegisterContainersHandlers(r *mux.Router) error {
// - in: query
// name: ps_args
// type: string
- // description: arguments to pass to ps such as aux
+ // description: arguments to pass to ps such as aux. Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
// produces:
// - application/json
// responses:
@@ -703,6 +703,34 @@ func (s *APIServer) RegisterContainersHandlers(r *mux.Router) error {
// '500':
// "$ref": "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name:..*}/stats"), APIHandler(s.Context, generic.StatsContainer)).Methods(http.MethodGet)
+ // swagger:operation GET /libpod/containers/{nameOrID}/top containers topContainer
+ //
+ // List processes running inside a container. Note
+ //
+ // ---
+ // parameters:
+ // - in: path
+ // name: nameOrID
+ // required: true
+ // description: the name or ID of the container
+ // - in: query
+ // name: stream
+ // type: bool
+ // default: true
+ // description: Stream the output
+ // name: ps_args
+ // type: string
+ // description: arguments to pass to ps such as aux. Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
+ // produces:
+ // - application/json
+ // responses:
+ // '200':
+ // description: no error
+ // "ref": "#/responses/DockerTopResponse"
+ // '404':
+ // "$ref": "#/responses/NoSuchContainer"
+ // '500':
+ // "$ref": "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/containers/{name:..*}/top"), APIHandler(s.Context, handlers.TopContainer)).Methods(http.MethodGet)
// swagger:operation POST /libpod/containers/{nameOrID}/unpause libpod libpodUnpauseContainer
// ---