summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-25 01:32:00 +0100
committerMatthew Heon <mheon@redhat.com>2021-03-29 11:58:26 -0400
commit573ed9220b9b295eacdd017dc87bbb592043cff4 (patch)
tree0b96c575bd05acdd29671c3d04fe8f78c065ff55 /libpod
parent1b349d79adc322b9df4a9c2cac49a4e42b301ef4 (diff)
downloadpodman-573ed9220b9b295eacdd017dc87bbb592043cff4.tar.gz
podman-573ed9220b9b295eacdd017dc87bbb592043cff4.tar.bz2
podman-573ed9220b9b295eacdd017dc87bbb592043cff4.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 d6ae5feaf..21867698a 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -2,6 +2,7 @@ package image
import (
"context"
+ "strconv"
"strings"
"time"
@@ -52,6 +53,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
}