summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-25 01:32:00 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-03-25 12:29:53 +0100
commit429a655866ba6298935a2fb53cd6e1e8653bab4d (patch)
treeb21615bfe2f09e049cae16211b0a6e62bed181c8 /libpod
parente523d09638b05edfd51538ac5786f00793e396ee (diff)
downloadpodman-429a655866ba6298935a2fb53cd6e1e8653bab4d.tar.gz
podman-429a655866ba6298935a2fb53cd6e1e8653bab4d.tar.bz2
podman-429a655866ba6298935a2fb53cd6e1e8653bab4d.zip
Fix filters in image http compat/libpod api endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/prune.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index 7ee3e077e..12727901a 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -2,6 +2,7 @@ package image
import (
"context"
+ "strconv"
"strings"
"github.com/containers/podman/v3/libpod/events"
@@ -34,6 +35,12 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
}
return false
}, nil
+ case "dangling":
+ danglingImages, err := strconv.ParseBool(filterValue)
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid filter dangling=%s", filterValue)
+ }
+ return ImageFilter(DanglingFilter(danglingImages)), nil
}
return nil, nil
}