aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings/images/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/bindings/images/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/bindings/images/images.go')
-rw-r--r--pkg/bindings/images/images.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index cd5147629..bb7867c4e 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -267,46 +267,6 @@ func Import(ctx context.Context, r io.Reader, options *ImportOptions) (*entities
return &report, response.Process(&report)
}
-// Push is the binding for libpod's v2 endpoints for push images. Note that
-// `source` must be a referring to an image in the remote's container storage.
-// The destination must be a reference to a registry (i.e., of docker transport
-// or be normalized to one). Other transports are rejected as they do not make
-// sense in a remote context.
-func Push(ctx context.Context, source string, destination string, options *PushOptions) error {
- if options == nil {
- options = new(PushOptions)
- }
- conn, err := bindings.GetClient(ctx)
- if err != nil {
- return err
- }
- header, err := auth.MakeXRegistryAuthHeader(&imageTypes.SystemContext{AuthFilePath: options.GetAuthfile()}, options.GetUsername(), options.GetPassword())
- if err != nil {
- return err
- }
-
- params, err := options.ToParams()
- if err != nil {
- return err
- }
- // SkipTLSVerify is special. We need to delete the param added by
- // toparams and change the key and flip the bool
- if options.SkipTLSVerify != nil {
- params.Del("SkipTLSVerify")
- params.Set("tlsVerify", strconv.FormatBool(!options.GetSkipTLSVerify()))
- }
- params.Set("destination", destination)
-
- path := fmt.Sprintf("/images/%s/push", source)
- response, err := conn.DoRequest(ctx, nil, http.MethodPost, path, params, header)
- if err != nil {
- return err
- }
- defer response.Body.Close()
-
- return response.Process(err)
-}
-
// Search is the binding for libpod's v2 endpoints for Search images.
func Search(ctx context.Context, term string, options *SearchOptions) ([]entities.ImageSearchReport, error) {
if options == nil {