diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-20 16:37:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-20 16:37:38 -0400 |
commit | 1e9b3e7500a14ae066f5790fad6c3dfa9f94b688 (patch) | |
tree | 915e35f9821c61486ed4f6a22959d2e6abbad9d3 /pkg/domain/infra | |
parent | 37365b166d30d7da108d4ce79a76bbae787e4219 (diff) | |
parent | 9cd6bba5d57e7e23a92ab27e6c37f8623662d9b3 (diff) | |
download | podman-1e9b3e7500a14ae066f5790fad6c3dfa9f94b688.tar.gz podman-1e9b3e7500a14ae066f5790fad6c3dfa9f94b688.tar.bz2 podman-1e9b3e7500a14ae066f5790fad6c3dfa9f94b688.zip |
Merge pull request #5899 from jwhonce/wip/tree
V2 podman image tree
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/images.go | 12 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 4 |
2 files changed, 16 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 +} diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 6ea2bd9f2..2decd605d 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -263,3 +263,7 @@ func (ir *ImageEngine) Config(_ context.Context) (*config.Config, error) { func (ir *ImageEngine) Build(ctx context.Context, containerFiles []string, opts entities.BuildOptions) (*entities.BuildReport, error) { return nil, errors.New("not implemented yet") } + +func (ir *ImageEngine) Tree(ctx context.Context, nameOrId string, opts entities.ImageTreeOptions) (*entities.ImageTreeReport, error) { + return nil, errors.New("not implemented yet") +} |