diff options
author | cdoern <cbdoer23@g.holycross.edu> | 2021-06-11 15:34:06 -0400 |
---|---|---|
committer | cdoern <cdoern@redhat.com> | 2021-08-09 14:17:08 -0400 |
commit | 12ac4198caa0e0493f22b6f611023266449253d8 (patch) | |
tree | c8c9bf192759cc075fd0f968dc0eae6ad526de59 /pkg/api/handlers/libpod/images_pull.go | |
parent | 04ab2b16617fe2d3178eb0b461aacbcab609611e (diff) | |
download | podman-12ac4198caa0e0493f22b6f611023266449253d8.tar.gz podman-12ac4198caa0e0493f22b6f611023266449253d8.tar.bz2 podman-12ac4198caa0e0493f22b6f611023266449253d8.zip |
Libpod images pull changes
Added quiet param to docs to limit stream output. Formatted JSON.
fixes #10612
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/images_pull.go')
-rw-r--r-- | pkg/api/handlers/libpod/images_pull.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go index 04b415638..3c13c6e20 100644 --- a/pkg/api/handlers/libpod/images_pull.go +++ b/pkg/api/handlers/libpod/images_pull.go @@ -33,6 +33,7 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) { TLSVerify bool `schema:"tlsVerify"` AllTags bool `schema:"allTags"` PullPolicy string `schema:"policy"` + Quiet bool `schema:"quiet"` }{ TLSVerify: true, PullPolicy: "always", @@ -116,8 +117,10 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) { select { case s := <-writer.Chan(): report.Stream = string(s) - if err := enc.Encode(report); err != nil { - logrus.Warnf("Failed to encode json: %v", err) + if !query.Quiet { + if err := enc.Encode(report); err != nil { + logrus.Warnf("Failed to encode json: %v", err) + } } flush() case <-runCtx.Done(): |