summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-02-19 15:09:19 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-02-20 10:25:25 +0100
commit8a49b59ed403b25340f315b3cb9ea90482ad6cd9 (patch)
tree2f699c83822c5a484def487365cbafd630596e23 /pkg
parent0d3eaca28a5485540feee02918abcd6f294e9a1d (diff)
downloadpodman-8a49b59ed403b25340f315b3cb9ea90482ad6cd9.tar.gz
podman-8a49b59ed403b25340f315b3cb9ea90482ad6cd9.tar.bz2
podman-8a49b59ed403b25340f315b3cb9ea90482ad6cd9.zip
image.SearchImages: use SearchFilter type
Use an `image.SearchFilter` instead of a `[]string` in the SearchImages API. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/varlinkapi/images.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index f4b8a7e18..032160b1b 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -435,9 +435,14 @@ func (i *LibpodAPI) RemoveImage(call iopodman.VarlinkCall, name string, force bo
// SearchImages searches all registries configured in /etc/containers/registries.conf for an image
// Requires an image name and a search limit as int
func (i *LibpodAPI) SearchImages(call iopodman.VarlinkCall, query string, limit *int64, tlsVerify *bool, filter []string) error {
+ sFilter, err := image.ParseSearchFilter(filter)
+ if err != nil {
+ return call.ReplyErrorOccurred(err.Error())
+ }
+
searchOptions := image.SearchOptions{
Limit: 1000,
- Filter: filter,
+ Filter: *sFilter,
InsecureSkipTLSVerify: types.NewOptionalBool(!*tlsVerify),
}
results, err := image.SearchImages(query, searchOptions)