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>
Upstream-commit: 85e72de60c
Component: cli
This commit is contained in:
@ -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")
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user