New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "driver" filter for network ls #22319

Merged
merged 1 commit into from Apr 30, 2016

Conversation

Projects
None yet
8 participants
@thaJeztah
Member

thaJeztah commented Apr 25, 2016

This add a new filter to docker network ls to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this filter only supports an exact match.

fixes #22315

@WeiZhang555

This comment has been minimized.

Show comment
Hide comment
@WeiZhang555

WeiZhang555 Apr 27, 2016

Contributor

👍
Need rebase 😄

Contributor

WeiZhang555 commented Apr 27, 2016

👍
Need rebase 😄

Show outdated Hide outdated docs/reference/commandline/network_ls.md
The following example matches networks with the `bridge` driver:
```bash
$ docker network ls filter driver=bridge

This comment has been minimized.

@wenchma

wenchma Apr 27, 2016

Contributor

-f or --filter should be used instead.

@wenchma

wenchma Apr 27, 2016

Contributor

-f or --filter should be used instead.

This comment has been minimized.

@thaJeztah

thaJeztah Apr 27, 2016

Member

oh! thanks for catching that; I'll update when I'm at my computer (public holiday today in the Netherlands)

@thaJeztah

thaJeztah Apr 27, 2016

Member

oh! thanks for catching that; I'll update when I'm at my computer (public holiday today in the Netherlands)

@vdemeester

This comment has been minimized.

Show comment
Hide comment
@vdemeester

vdemeester Apr 27, 2016

Member

Design LGTM too 👼

Member

vdemeester commented Apr 27, 2016

Design LGTM too 👼

@@ -1396,7 +1396,7 @@ _docker_network_ls() {
case "$prev" in
--filter|-f)
COMPREPLY=( $( compgen -S = -W "id name type" -- "$cur" ) )
COMPREPLY=( $( compgen -S = -W "driver id label name type" -- "$cur" ) )

This comment has been minimized.

@thaJeztah

thaJeztah Apr 27, 2016

Member

ping @albers I think this is where it needs to be added for bash completion

also @sdurrheimer I couldn't find the --f / --filter option for zsh-completion. I think it may need to be added here; https://github.com/docker/docker/blob/master/contrib/completion/zsh/_docker#L422-L426

@thaJeztah

thaJeztah Apr 27, 2016

Member

ping @albers I think this is where it needs to be added for bash completion

also @sdurrheimer I couldn't find the --f / --filter option for zsh-completion. I think it may need to be added here; https://github.com/docker/docker/blob/master/contrib/completion/zsh/_docker#L422-L426

This comment has been minimized.

@albers

albers Apr 27, 2016

Member

@thaJeztah Hey, that's cool. Your're diving into the completions.
The completion is correct.
You could also add the secondary completion to https://github.com/docker/docker/blob/master/contrib/completion/bash/docker#L1380-1395, see https://github.com/docker/docker/blob/master/contrib/completion/bash/docker#L1327 for how to get the possible values.
Or just give me a ping if I should add this later.

@albers

albers Apr 27, 2016

Member

@thaJeztah Hey, that's cool. Your're diving into the completions.
The completion is correct.
You could also add the secondary completion to https://github.com/docker/docker/blob/master/contrib/completion/bash/docker#L1380-1395, see https://github.com/docker/docker/blob/master/contrib/completion/bash/docker#L1327 for how to get the possible values.
Or just give me a ping if I should add this later.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Apr 27, 2016

Member

Rebased, fixed docs, and attempted to update bash completion :-)

Member

thaJeztah commented Apr 27, 2016

Rebased, fixed docs, and attempted to update bash completion :-)

Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Apr 29, 2016

Member

updated the bash completion; @albers ptal (and thanks!)

Member

thaJeztah commented Apr 29, 2016

updated the bash completion; @albers ptal (and thanks!)

@sdurrheimer

This comment has been minimized.

Show comment
Hide comment
@sdurrheimer

sdurrheimer Apr 29, 2016

Contributor

I will work on zsh completion as soon as possible.

Contributor

sdurrheimer commented Apr 29, 2016

I will work on zsh completion as soon as possible.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah
Member

thaJeztah commented Apr 29, 2016

Thanks @sdurrheimer!

@albers

This comment has been minimized.

Show comment
Hide comment
@albers

albers Apr 29, 2016

Member

bash completion LGTM, good work!

Member

albers commented Apr 29, 2016

bash completion LGTM, good work!

@calavera

This comment has been minimized.

Show comment
Hide comment
@calavera

calavera Apr 30, 2016

Contributor

LGTM

Contributor

calavera commented Apr 30, 2016

LGTM

@vdemeester

This comment has been minimized.

Show comment
Hide comment
@vdemeester

vdemeester Apr 30, 2016

Member

LGTM

Member

vdemeester commented Apr 30, 2016

LGTM

@vdemeester

This comment has been minimized.

Show comment
Hide comment
@vdemeester

vdemeester Apr 30, 2016

Member

Docs too 😉

Member

vdemeester commented Apr 30, 2016

Docs too 😉

@vdemeester vdemeester merged commit 7a56581 into moby:master Apr 30, 2016

8 checks passed

docker/dco-signed All commits signed
Details
documentation success
Details
experimental Jenkins build Docker-PRs-experimental 18139 has succeeded
Details
gccgo Jenkins build Docker-PRs-gccgo 4970 has succeeded
Details
janky Jenkins build Docker-PRs 26970 has succeeded
Details
userns Jenkins build Docker-PRs-userns 9166 has succeeded
Details
win2lin Jenkins build Docker-PRs-Win2Lin 25453 has succeeded
Details
windowsTP5 Jenkins build Docker-PRs-WoW-TP5 1228 has succeeded
Details

@thaJeztah thaJeztah added this to the 1.12.0 milestone Apr 30, 2016

@thaJeztah thaJeztah deleted the thaJeztah:network-driver-filter branch Apr 30, 2016

@jimmyxian jimmyxian referenced this pull request Jun 6, 2016

Open

Keep track of the missing API in Swarm #2333

4 of 23 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment