Add reference filter and deprecated filter param…

… 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 <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-11-11 15:34:01 +01:00
parent dc4d7a83ff
commit 85e72de60c
2 changed files with 0 additions and 15 deletions

View File

@ -21,10 +21,6 @@ func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions
} }
query.Set("filters", filterJSON) 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 { if options.All {
query.Set("all", "1") query.Set("all", "1")
} }

View File

@ -48,17 +48,6 @@ func TestImageList(t *testing.T) {
"filters": "", "filters": "",
}, },
}, },
{
options: types.ImageListOptions{
All: true,
MatchName: "image_name",
},
expectedQueryParams: map[string]string{
"all": "1",
"filter": "image_name",
"filters": "",
},
},
{ {
options: types.ImageListOptions{ options: types.ImageListOptions{
Filters: filters, Filters: filters,