mirror of https://github.com/docker/cli.git
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:
parent
dc4d7a83ff
commit
85e72de60c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue