From 608f23172fcd01bedb4861552fe7ffa6eae6382c Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Fri, 11 Nov 2016 15:34:01 +0100 Subject: [PATCH] =?UTF-8?q?Add=20reference=20filter=20and=20deprecated=20f?= =?UTF-8?q?ilter=20param=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … for `docker images`. This deprecates the `filter` param for the `/images` endpoint and make a new filter called `reference` to replace it. It does change the CLI side (still possible to do `docker images busybox:musl`) but changes the cli code to use the filter instead (so that `docker images --filter busybox:musl` and `docker images busybox:musl` act the same). Signed-off-by: Vincent Demeester Upstream-commit: 85e72de60c165ef682a8b5cee88188a85ca34261 Component: cli --- components/cli/image_list.go | 4 ---- components/cli/image_list_test.go | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/components/cli/image_list.go b/components/cli/image_list.go index 6ebb460541..63c71b1dd1 100644 --- a/components/cli/image_list.go +++ b/components/cli/image_list.go @@ -21,10 +21,6 @@ func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions } query.Set("filters", filterJSON) } - if options.MatchName != "" { - // FIXME rename this parameter, to not be confused with the filters flag - query.Set("filter", options.MatchName) - } if options.All { query.Set("all", "1") } diff --git a/components/cli/image_list_test.go b/components/cli/image_list_test.go index 1ea6f1f05a..1c9406ddda 100644 --- a/components/cli/image_list_test.go +++ b/components/cli/image_list_test.go @@ -48,17 +48,6 @@ func TestImageList(t *testing.T) { "filters": "", }, }, - { - options: types.ImageListOptions{ - All: true, - MatchName: "image_name", - }, - expectedQueryParams: map[string]string{ - "all": "1", - "filter": "image_name", - "filters": "", - }, - }, { options: types.ImageListOptions{ Filters: filters,