mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
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 <pholzing@redhat.com>
This commit is contained in:
@ -362,17 +362,12 @@ func PodTop(w http.ResponseWriter, r *http.Request) {
|
|||||||
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
|
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
|
||||||
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
|
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
|
||||||
|
|
||||||
psArgs := "-ef"
|
|
||||||
if utils.IsLibpodRequest(r) {
|
|
||||||
psArgs = ""
|
|
||||||
}
|
|
||||||
query := struct {
|
query := struct {
|
||||||
Delay int `schema:"delay"`
|
Delay int `schema:"delay"`
|
||||||
PsArgs string `schema:"ps_args"`
|
PsArgs string `schema:"ps_args"`
|
||||||
Stream bool `schema:"stream"`
|
Stream bool `schema:"stream"`
|
||||||
}{
|
}{
|
||||||
Delay: 5,
|
Delay: 5,
|
||||||
PsArgs: psArgs,
|
|
||||||
}
|
}
|
||||||
if err := decoder.Decode(&query, r.URL.Query()); err != nil {
|
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))
|
utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to parse parameters for %s: %w", r.URL.String(), err))
|
||||||
|
@ -1174,7 +1174,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
|
|||||||
// - in: query
|
// - in: query
|
||||||
// name: ps_args
|
// name: ps_args
|
||||||
// type: string
|
// type: string
|
||||||
// default: -ef
|
// default:
|
||||||
// description: |
|
// description: |
|
||||||
// arguments to pass to ps such as aux.
|
// 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.
|
// Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
|
||||||
|
@ -309,7 +309,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
|
|||||||
// - in: query
|
// - in: query
|
||||||
// name: ps_args
|
// name: ps_args
|
||||||
// type: string
|
// type: string
|
||||||
// default: -ef
|
// default:
|
||||||
// description: |
|
// description: |
|
||||||
// arguments to pass to ps such as aux.
|
// 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.
|
// Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
|
||||||
|
Reference in New Issue
Block a user