summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/images.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-02 14:20:57 +0200
committerGitHub <noreply@github.com>2020-04-02 14:20:57 +0200
commit82610d657d58b3da68c5af35cef7470b0819636b (patch)
tree3ebb74110eb8ab718c23d4fa6312b67f226258e0 /pkg/domain/infra/abi/images.go
parent88455fe704023d65b782e70fc774128b3ec76569 (diff)
parent043308198337941a8086113619d6341528c10cd0 (diff)
downloadpodman-82610d657d58b3da68c5af35cef7470b0819636b.tar.gz
podman-82610d657d58b3da68c5af35cef7470b0819636b.tar.bz2
podman-82610d657d58b3da68c5af35cef7470b0819636b.zip
Merge pull request #5688 from baude/v2import
podmanv2 import
Diffstat (limited to 'pkg/domain/infra/abi/images.go')
-rw-r--r--pkg/domain/infra/abi/images.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index c3a2bb288..f8c63730c 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -303,6 +303,7 @@ func (ir *ImageEngine) Tag(ctx context.Context, nameOrId string, tags []string,
}
return nil
}
+
func (ir *ImageEngine) Untag(ctx context.Context, nameOrId string, tags []string, options entities.ImageUntagOptions) error {
newImage, err := ir.Libpod.ImageRuntime().NewFromLocal(nameOrId)
if err != nil {
@@ -336,3 +337,11 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
}
return &entities.ImageLoadReport{Name: name}, nil
}
+
+func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {
+ id, err := ir.Libpod.Import(ctx, opts.Source, opts.Reference, opts.Changes, opts.Message, opts.Quiet)
+ if err != nil {
+ return nil, err
+ }
+ return &entities.ImageImportReport{Id: id}, nil
+}