summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/images.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-03-30 12:13:50 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-03-31 13:01:27 +0200
commit3bdad6fa2af41be7e783256f3c8a213dc42ca8f6 (patch)
treeb1d3b9f1b3ee9addd187dc11cfe3585ebd6b02dd /pkg/domain/infra/tunnel/images.go
parent598bb53d46dfc85b8bcc1e3000736106f80de93e (diff)
downloadpodman-3bdad6fa2af41be7e783256f3c8a213dc42ca8f6.tar.gz
podman-3bdad6fa2af41be7e783256f3c8a213dc42ca8f6.tar.bz2
podman-3bdad6fa2af41be7e783256f3c8a213dc42ca8f6.zip
podmanV2: implement pull
Implement pulling images for the v2 client. What I _really_ don't like is the fact that we are now having a near identical code clone among `pkg/domain/infra/abi` and `pkg/api/handlers/libpod`. Partly because we don't yet have a higher-level pull function and partly because we have redudancy among `pkg/domain` and `pkg/api`. Pull might be a high outlier but I am concerned already by the potential of introducing more redundancy. I'd love to `infra/abi` and `pkg/abi` to really use the same code in the future. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r--pkg/domain/infra/tunnel/images.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 6a3adc9ee..7638d908a 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -85,3 +85,11 @@ func (ir *ImageEngine) Prune(ctx context.Context, opts entities.ImagePruneOption
}
return &report, nil
}
+
+func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, options entities.ImagePullOptions) (*entities.ImagePullReport, error) {
+ pulledImages, err := images.Pull(ir.ClientCxt, rawImage, options)
+ if err != nil {
+ return nil, err
+ }
+ return &entities.ImagePullReport{Images: pulledImages}, nil
+}