1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/router/network
Yong Tang 05a831a775 Fix incorrect Scope in network ls/inspect with duplicate network names
This fix tries to address the issue raised in 30242 where the `Scope`
field always changed to `swarm` in the ouput of `docker network ls/inspect`
when duplicate networks name exist.

The reason for the issue was that `buildNetworkResource()` use network name
(which may not be unique) to check for the scope.

This fix fixes the issue by always use network ID in `buildNetworkResource()`.

A test has been added. The test fails before the fix and passes after the fix.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-25 09:39:55 -08:00
..
backend.go Convert DanglingOnly to Filters for docker image prune 2016-12-02 20:08:49 -08:00
filter.go Return [] instead of null in case filterNetworks returns empty 2017-01-11 01:56:11 -08:00
filter_test.go Return [] instead of null in case filterNetworks returns empty 2017-01-11 01:56:11 -08:00
network.go rename clusterProvider to cluster in router 2016-12-26 20:53:13 +08:00
network_routes.go Fix incorrect Scope in network ls/inspect with duplicate network names 2017-01-25 09:39:55 -08:00