X Tutup
Skip to content

Add --filter scope=swarm|local for docker network ls#31529

Merged
thaJeztah merged 1 commit intomoby:masterfrom
yongtang:31324-network-ls-filter-scope
Mar 24, 2017
Merged

Add --filter scope=swarm|local for docker network ls#31529
thaJeztah merged 1 commit intomoby:masterfrom
yongtang:31324-network-ls-filter-scope

Conversation

@yongtang
Copy link
Member

@yongtang yongtang commented Mar 3, 2017

- What I did

This fix tries to address the request in #31324 by adding --filter scope=swarm|local for docker network ls.

As docker network ls has a SCOPE column by default, it is natural to add the support of --filter scope=swarm|local.

- How I did it

This fix adds the scope=swarm|local support for docker network ls --filter.

Related docs has been updated.

- How to verify it

Additional unit test cases have been added.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

maxresdefault

This fix fixes #31324.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

@allencloud
Copy link
Contributor

I think we still need to update swagger.yml. WDYT? @yongtang

@yongtang yongtang force-pushed the 31324-network-ls-filter-scope branch from a6fa0ea to 7744fbb Compare March 5, 2017 18:38
@yongtang
Copy link
Member Author

yongtang commented Mar 5, 2017

Thanks @allencloud. The PR has been updated with changes in swagger.yaml added.

@yongtang
Copy link
Member Author

yongtang commented Mar 5, 2017

@allencloud The PR has been updated. Thanks.

api/swagger.yaml Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to add scope before type since out of alphabetical order, WDYT?

@yongtang yongtang force-pushed the 31324-network-ls-filter-scope branch from 7744fbb to 49753b7 Compare March 6, 2017 04:52
@yongtang
Copy link
Member Author

yongtang commented Mar 6, 2017

Thanks @allencloud. The swagger.yaml, docs, and man have been updated.

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

design LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be local scope. ^^

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allencloud My bad. The PR has been updated. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be local scope. ^^

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

@thaJeztah
Copy link
Member

Design, and code looks good to me, but needs a rebase @yongtang 😅

@thaJeztah
Copy link
Member

Don't forget to add a mention to the API history; https://github.com/docker/docker/blob/master/docs/api/version-history.md

api/swagger.yaml Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also global I think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, is there 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cpuguy83 @thaJeztah. Yes I forgot libnetwork have the legacy external K-V store mode (global).

The PR has been updated and rebased. Please take a look.

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go under API 1.29 now - we had to bump the API version for 17.03.1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @thaJeztah. The PR has been updated with version changed.

This fix tries to address the request in 31324 by adding
`--filter scope=swarm|local` for `docker network ls`.

As `docker network ls` has a `SCOPE` column by default,
it is natural to add the support of `--filter scope=swarm|local`.

This fix adds the `scope=swarm|local` support for
`docker network ls --filter`.

Related docs has been updated.

Additional unit test cases have been added.

This fix fixes 31324.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@yongtang yongtang force-pushed the 31324-network-ls-filter-scope branch from d93a710 to 704ea8f Compare March 24, 2017 01:49
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐮
/cc @thaJeztah for docs-review 👼

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks!

@thaJeztah
Copy link
Member

windows completed but failed to notify github

java.net.SocketTimeoutException: connect timed out
Finished: SUCCESS

@thaJeztah thaJeztah merged commit 4e290f7 into moby:master Mar 24, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.05.0 milestone Mar 24, 2017
@albers
Copy link
Member

albers commented Mar 24, 2017

Thanks @yongtang!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] docker network ls --filter scope=swarm|local

8 participants

X Tutup