summaryrefslogtreecommitdiff
path: root/cmd/podman/images.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-03-22 10:17:50 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-23 15:35:37 +0000
commitf7c8dd5836002f3bf85a7bbe6c949cdece5194df (patch)
tree6cee5a91ff32b016efcf8e9dbcff398b42ce5c4a /cmd/podman/images.go
parent8ca3bcc85d6bbf05e7838b20bfb1ae74afa8d35d (diff)
downloadpodman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.gz
podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.bz2
podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.zip
Stage 4 Image cleanup
Cull funcs from runtime_img.go which are no longer needed. Also, fix any remaining spots that use the old image technique. Signed-off-by: baude <bbaude@redhat.com> Closes: #532 Approved by: mheon
Diffstat (limited to 'cmd/podman/images.go')
-rw-r--r--cmd/podman/images.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 67f7920f2..4e2114705 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -82,7 +82,7 @@ var (
func imagesCmd(c *cli.Context) error {
var (
- filterFuncs []libpod.ImageResultFilter
+ filterFuncs []image.ResultFilter
newImage *image.Image
)
if err := validateFlags(c, imagesFlags); err != nil {
@@ -136,7 +136,7 @@ func imagesCmd(c *cli.Context) error {
var filteredImages []*image.Image
// filter the images
if len(c.StringSlice("filter")) > 0 || newImage != nil {
- filteredImages = libpod.FilterImages(images, filterFuncs)
+ filteredImages = image.FilterImages(images, filterFuncs)
} else {
filteredImages = images
}
@@ -266,8 +266,8 @@ func (i *imagesTemplateParams) HeaderMap() map[string]string {
// CreateFilterFuncs returns an array of filter functions based on the user inputs
// and is later used to filter images for output
-func CreateFilterFuncs(r *libpod.Runtime, c *cli.Context, image *image.Image) ([]libpod.ImageResultFilter, error) {
- var filterFuncs []libpod.ImageResultFilter
+func CreateFilterFuncs(r *libpod.Runtime, c *cli.Context, img *image.Image) ([]image.ResultFilter, error) {
+ var filterFuncs []image.ResultFilter
for _, filter := range c.StringSlice("filter") {
splitFilter := strings.Split(filter, "=")
switch splitFilter[0] {
@@ -276,24 +276,24 @@ func CreateFilterFuncs(r *libpod.Runtime, c *cli.Context, image *image.Image) ([
if err != nil {
return nil, errors.Wrapf(err, "unable to find image % in local stores", splitFilter[1])
}
- filterFuncs = append(filterFuncs, libpod.ImageCreatedBefore(before.Created()))
+ filterFuncs = append(filterFuncs, image.CreatedBeforeFilter(before.Created()))
case "after":
after, err := r.ImageRuntime().NewFromLocal(splitFilter[1])
if err != nil {
return nil, errors.Wrapf(err, "unable to find image % in local stores", splitFilter[1])
}
- filterFuncs = append(filterFuncs, libpod.ImageCreatedAfter(after.Created()))
+ filterFuncs = append(filterFuncs, image.CreatedAfterFilter(after.Created()))
case "dangling":
- filterFuncs = append(filterFuncs, libpod.ImageDangling())
+ filterFuncs = append(filterFuncs, image.DanglingFilter())
case "label":
labelFilter := strings.Join(splitFilter[1:], "=")
- filterFuncs = append(filterFuncs, libpod.ImageLabel(labelFilter))
+ filterFuncs = append(filterFuncs, image.LabelFilter(labelFilter))
default:
return nil, errors.Errorf("invalid filter %s ", splitFilter[0])
}
}
- if image != nil {
- filterFuncs = append(filterFuncs, libpod.OutputImageFilter(image))
+ if img != nil {
+ filterFuncs = append(filterFuncs, image.OutputImageFilter(img))
}
return filterFuncs, nil
}