aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/images.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-04-20 10:02:35 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-20 10:10:24 -0700
commit9cd6bba5d57e7e23a92ab27e6c37f8623662d9b3 (patch)
tree4ab14b11f1bb0cf26287a5f4cc2acf94dda34a1d /pkg/domain/infra/abi/images.go
parente5e625b2a6481dd49d1d6303df1157c8a51dd7c2 (diff)
downloadpodman-9cd6bba5d57e7e23a92ab27e6c37f8623662d9b3.tar.gz
podman-9cd6bba5d57e7e23a92ab27e6c37f8623662d9b3.tar.bz2
podman-9cd6bba5d57e7e23a92ab27e6c37f8623662d9b3.zip
V2 podman image tree
* Basic port of V1 podman image tree ID TODO: Refactor to return tree from service and format in presentation layer TODO: Support tunneling mode Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/images.go')
-rw-r--r--pkg/domain/infra/abi/images.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 0f710ad28..4353e0798 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -476,3 +476,15 @@ func (ir *ImageEngine) Build(ctx context.Context, containerFiles []string, opts
}
return &entities.BuildReport{ID: id}, nil
}
+
+func (ir *ImageEngine) Tree(ctx context.Context, nameOrId string, opts entities.ImageTreeOptions) (*entities.ImageTreeReport, error) {
+ img, err := ir.Libpod.ImageRuntime().NewFromLocal(nameOrId)
+ if err != nil {
+ return nil, err
+ }
+ results, err := img.GenerateTree(opts.WhatRequires)
+ if err != nil {
+ return nil, err
+ }
+ return &entities.ImageTreeReport{Tree: results}, nil
+}