From dbec2b5aa216afadcd1f22b9daf5ad059478c76d Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 29 Jun 2023 11:12:52 +0200 Subject: [PATCH] api: fix doc for default ps_args The libpod API does not set a default. Also PodTop is podman sepecific so we can just rmeove this extra branch there. Signed-off-by: Paul Holzinger --- pkg/api/handlers/libpod/pods.go | 7 +------ pkg/api/server/register_containers.go | 2 +- pkg/api/server/register_pods.go | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index c13af63136..16ddc271b2 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -362,17 +362,12 @@ func PodTop(w http.ResponseWriter, r *http.Request) { runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime) decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder) - psArgs := "-ef" - if utils.IsLibpodRequest(r) { - psArgs = "" - } query := struct { Delay int `schema:"delay"` PsArgs string `schema:"ps_args"` Stream bool `schema:"stream"` }{ - Delay: 5, - PsArgs: psArgs, + Delay: 5, } if err := decoder.Decode(&query, r.URL.Query()); err != nil { utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to parse parameters for %s: %w", r.URL.String(), err)) diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index d305bec9f9..78b1966d64 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -1174,7 +1174,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // - in: query // name: ps_args // type: string - // default: -ef + // default: // 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. diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index d54cc413e7..16668f370f 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -309,7 +309,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error { // - in: query // name: ps_args // type: string - // default: -ef + // default: // 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.