diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-03-27 13:31:17 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-03-28 16:49:08 +0100 |
commit | cc129d13c5b8b80f542dbc6192ff3d5df29b47ee (patch) | |
tree | 9aff03eb40997c7373089c83d1c32ed6ace0815e /pkg/api/server/register_pods.go | |
parent | 684b4bd2f16d078edd25d262bb8baefc699508e9 (diff) | |
download | podman-cc129d13c5b8b80f542dbc6192ff3d5df29b47ee.tar.gz podman-cc129d13c5b8b80f542dbc6192ff3d5df29b47ee.tar.bz2 podman-cc129d13c5b8b80f542dbc6192ff3d5df29b47ee.zip |
v2 api: implement pods top endpoint
Note that this commit does not add tests for the pod-top endpoint.
They will be added in a later change.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/api/server/register_pods.go')
-rw-r--r-- | pkg/api/server/register_pods.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index 5ba2263e8..5ad9b5bc1 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -263,5 +263,36 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // 500: // $ref: "#/responses/InternalError" r.Handle(VersionedPath("/libpod/pods/{name}/unpause"), s.APIHandler(libpod.PodUnpause)).Methods(http.MethodPost) + // swagger:operation POST /libpod/pods/{name}/top pods topPod + // --- + // summary: List processes + // description: List processes running inside a pod + // produces: + // - application/json + // parameters: + // - in: path + // name: name + // type: string + // required: true + // description: | + // Name of pod to query for processes + // - in: query + // name: stream + // type: boolean + // default: true + // description: Stream the output + // - in: query + // name: ps_args + // type: string + // default: -ef + // 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. + // responses: + // 200: + // $ref: "#/responses/DockerTopResponse" + // 404: + // $ref: "#/responses/NoSuchContainer" + // 500: + // $ref: "#/responses/InternalError" + r.Handle(VersionedPath("/libpod/pods/{name}/top"), s.APIHandler(libpod.PodTop)).Methods(http.MethodGet) return nil } |