summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-02-18 17:28:26 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-02-20 10:25:25 +0100
commit0d3eaca28a5485540feee02918abcd6f294e9a1d (patch)
tree40e860788c5bddcbd83a8a637f75ccbcf315fed6
parent87c9f4cc226a8b709d39de473f09dd341b1a4fc3 (diff)
downloadpodman-0d3eaca28a5485540feee02918abcd6f294e9a1d.tar.gz
podman-0d3eaca28a5485540feee02918abcd6f294e9a1d.tar.bz2
podman-0d3eaca28a5485540feee02918abcd6f294e9a1d.zip
SearchImages: extend API with filter parameter
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rwxr-xr-xAPI.md2
-rw-r--r--cmd/podman/varlink/io.podman.varlink2
-rw-r--r--pkg/varlinkapi/images.go3
3 files changed, 4 insertions, 3 deletions
diff --git a/API.md b/API.md
index 1a75e1492..f61afbee4 100755
--- a/API.md
+++ b/API.md
@@ -107,7 +107,7 @@ in the [API.md](https://github.com/containers/libpod/blob/master/API.md) file in
[func RestartPod(name: string) string](#RestartPod)
-[func SearchImages(query: string, limit: , tlsVerify: ) ImageSearchResult](#SearchImages)
+[func SearchImages(query: string, limit: int, tlsVerify: ?bool, filter: []string) ImageSearchResult](#SearchImages)
[func SendFile(type: string, length: int) string](#SendFile)
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink
index 20c8a0de5..3bb3aa20a 100644
--- a/cmd/podman/varlink/io.podman.varlink
+++ b/cmd/podman/varlink/io.podman.varlink
@@ -681,7 +681,7 @@ method RemoveImage(name: string, force: bool) -> (image: string)
# SearchImages searches available registries for images that contain the
# contents of "query" in their name. If "limit" is given, limits the amount of
# search results per registry.
-method SearchImages(query: string, limit: ?int, tlsVerify: ?bool) -> (results: []ImageSearchResult)
+method SearchImages(query: string, limit: ?int, tlsVerify: ?bool, filter: []string) -> (results: []ImageSearchResult)
# DeleteUnusedImages deletes any images not associated with a container. The IDs of the deleted images are returned
# in a string array.
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index e80a47684..f4b8a7e18 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -434,9 +434,10 @@ 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) error {
+func (i *LibpodAPI) SearchImages(call iopodman.VarlinkCall, query string, limit *int64, tlsVerify *bool, filter []string) error {
searchOptions := image.SearchOptions{
Limit: 1000,
+ Filter: filter,
InsecureSkipTLSVerify: types.NewOptionalBool(!*tlsVerify),
}
results, err := image.SearchImages(query, searchOptions)