summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-01 22:54:22 +0200
committerGitHub <noreply@github.com>2020-04-01 22:54:22 +0200
commit0f357be5aeaa5dc651659cf0945a58780641e77d (patch)
tree77c502c42324db5aa5635b65f615c6a3c4e96fde /pkg/domain/infra/tunnel
parent0a163720351710be314c729086e8d288680ff0a8 (diff)
parent8500ce6b9ab0050b925ec3b899495cb2cc8d367f (diff)
downloadpodman-0f357be5aeaa5dc651659cf0945a58780641e77d.tar.gz
podman-0f357be5aeaa5dc651659cf0945a58780641e77d.tar.bz2
podman-0f357be5aeaa5dc651659cf0945a58780641e77d.zip
Merge pull request #5686 from baude/v2load
podmanv2 load
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/images.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 6a8b9be37..a4a0fccaf 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -2,6 +2,7 @@ package tunnel
import (
"context"
+ "os"
"github.com/containers/image/v5/docker/reference"
images "github.com/containers/libpod/pkg/bindings/images"
@@ -157,3 +158,12 @@ func (ir *ImageEngine) Inspect(_ context.Context, names []string, opts entities.
}
return &report, nil
}
+
+func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions) (*entities.ImageLoadReport, error) {
+ f, err := os.Open(opts.Input)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+ return images.Load(ir.ClientCxt, f, &opts.Name)
+}