aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/entities/images.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-07-21 14:09:44 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-07-21 17:13:36 +0200
commitb79ac0aca2ba7f8a5176197da9fa5992d0b6d497 (patch)
tree976d1d0d5ac4038974128fc12f26a0096538dfda /pkg/domain/entities/images.go
parent04ed519e9d38e2ae12ec0b568e6418e750ff203d (diff)
downloadpodman-b79ac0aca2ba7f8a5176197da9fa5992d0b6d497.tar.gz
podman-b79ac0aca2ba7f8a5176197da9fa5992d0b6d497.tar.bz2
podman-b79ac0aca2ba7f8a5176197da9fa5992d0b6d497.zip
remote push: show copy progress
`podman-remote push` has shown absolutely no progress at all. Fix that by doing essentially the same as the remote-pull code does. The get-free-out-of-jail-card for backwards compatibility is to let the `quiet` parameter default to true. Since the --quioet flag wasn't working before either, older Podman clients do not set it. Also add regression tests to make sure we won't regress again. Fixes: #11554 Fixes: #14971 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'pkg/domain/entities/images.go')
-rw-r--r--pkg/domain/entities/images.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index da317cfad..b8b346005 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -1,6 +1,7 @@
package entities
import (
+ "io"
"net/url"
"time"
@@ -192,8 +193,7 @@ type ImagePushOptions struct {
// image. Default is manifest type of source, with fallbacks.
// Ignored for remote calls.
Format string
- // Quiet can be specified to suppress pull progress when pulling. Ignored
- // for remote calls.
+ // Quiet can be specified to suppress push progress when pushing.
Quiet bool
// Rm indicates whether to remove the manifest list if push succeeds
Rm bool
@@ -211,6 +211,17 @@ type ImagePushOptions struct {
Progress chan types.ProgressProperties
// CompressionFormat is the format to use for the compression of the blobs
CompressionFormat string
+ // Writer is used to display copy information including progress bars.
+ Writer io.Writer
+}
+
+// ImagePushReport is the response from pushing an image.
+// Currently only used in the remote API.
+type ImagePushReport struct {
+ // Stream used to provide push progress
+ Stream string `json:"stream,omitempty"`
+ // Error contains text of errors from pushing
+ Error string `json:"error,omitempty"`
}
// ImageSearchOptions are the arguments for searching images.