diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-11 16:58:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 16:58:54 +0100 |
commit | dd64038192ff41684fe75b680e865849aa969f55 (patch) | |
tree | a73f3751f02dcae80572609af6f97872ac7e2360 /libpod/image/image.go | |
parent | 668d77a12c40221fb90def84c6256d1bbcd5f6aa (diff) | |
parent | 8be7b466d86b53d170f82a4bd94667c4db71db59 (diff) | |
download | podman-dd64038192ff41684fe75b680e865849aa969f55.tar.gz podman-dd64038192ff41684fe75b680e865849aa969f55.tar.bz2 podman-dd64038192ff41684fe75b680e865849aa969f55.zip |
Merge pull request #4664 from baude/movefilters
move image filters under libpod/images
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 129ccd376..c8583a1c5 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -216,6 +216,19 @@ func (ir *Runtime) Shutdown(force bool) error { return err } +// GetImagesWithFilters gets images with a series of filters applied +func (ir *Runtime) GetImagesWithFilters(filters []string) ([]*Image, error) { + filterFuncs, err := ir.createFilterFuncs(filters, nil) + if err != nil { + return nil, err + } + images, err := ir.GetImages() + if err != nil { + return nil, err + } + return FilterImages(images, filterFuncs), nil +} + func (i *Image) reloadImage() error { newImage, err := i.imageruntime.getImage(i.ID()) if err != nil { |