diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-03-23 09:04:31 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-03-24 16:06:01 -0700 |
commit | 1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f (patch) | |
tree | a9ce6c3b2e91a797cf8174d7a4e9d62eccb4d1e8 /pkg/domain/infra/tunnel/images.go | |
parent | 0c084d9719772a9b68d5eb67114cf5bf001958b2 (diff) | |
download | podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.gz podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.bz2 podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.zip |
V2 podman images/image list
* Updated entities to support flags/options
* Updated bindings caused by entities changes
* Removed handlers.ImageSummary in favor of entities.ImageSummary
* Introduced StringSet() container object to simply error checking
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 718685e57..60df40498 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -32,23 +32,22 @@ func (ir *ImageEngine) Delete(ctx context.Context, nameOrId string, opts entitie return &report, err } -func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) (*entities.ImageListReport, error) { +func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) ([]*entities.ImageSummary, error) { images, err := images.List(ir.ClientCxt, &opts.All, opts.Filters) + if err != nil { return nil, err } - report := entities.ImageListReport{ - Images: make([]entities.ImageSummary, len(images)), - } + is := make([]*entities.ImageSummary, len(images)) for i, img := range images { hold := entities.ImageSummary{} if err := utils.DeepCopy(&hold, img); err != nil { return nil, err } - report.Images[i] = hold + is[i] = &hold } - return &report, nil + return is, nil } func (ir *ImageEngine) History(ctx context.Context, nameOrId string, opts entities.ImageHistoryOptions) (*entities.ImageHistoryReport, error) { |