summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-25 14:40:21 -0700
committerGitHub <noreply@github.com>2021-03-25 14:40:21 -0700
commit9e23e0b3e3b219cbdc42fac4f843d6d2ec97421b (patch)
tree6986b66d1aa4e37999ffd091900b9a487e87d202 /libpod/image
parent8eb36320ca321ba514b5388cfdb11595e61a7d49 (diff)
parent429a655866ba6298935a2fb53cd6e1e8653bab4d (diff)
downloadpodman-9e23e0b3e3b219cbdc42fac4f843d6d2ec97421b.tar.gz
podman-9e23e0b3e3b219cbdc42fac4f843d6d2ec97421b.tar.bz2
podman-9e23e0b3e3b219cbdc42fac4f843d6d2ec97421b.zip
Merge pull request #9810 from jmguzik/fix-impages-filter-http-api
Fix filters list/prune in image http compat/libpod api endpoints
Diffstat (limited to 'libpod/image')
-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
}