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
Yong Tang 158b2a1875 Add scope filter in /networks/<id>
This fix tries to add a `scope` in the query of `/networks/<id>`
(`NetworkInspect`) so that in case of duplicate network names,
it is possible to locate the network ID based on the network
scope (`local`, 'swarm', or `global`).

Multiple networks might exist in different scopes, which is a legitimate case.
For example, a network name `foo` might exists locally and in swarm network.

However, before this PR it was not possible to query a network name `foo`
in a specific scope like swarm.

This fix fixes the issue by allowing a `scope` query in `/networks/<id>`.

Additional test cases have been added to unit tests and integration tests.

This fix is related to docker/cli#167, moby/moby#30897, moby/moby#33561, moby/moby#30242

This fix fixes docker/cli#167

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-12 09:54:25 -07:00
..
backend/build Extract squash and tagging from the Dockerfile builder. 2017-05-01 12:07:32 -04:00
httputils choose rpc code to determine status code 2017-06-06 10:08:50 +08:00
middleware Do not log the CA config CA signing key in debug mode. 2017-05-31 18:15:33 -07:00
router Add scope filter in /networks/<id> 2017-06-12 09:54:25 -07:00
middleware.go change comment 2016-08-26 18:30:41 +08:00
profiler.go Use generic handler for pprof profile lookups 2017-03-16 11:05:20 -04:00
router_swapper.go fix typos 2016-03-06 00:59:11 +08:00
server.go server.go: format for 2017-05-15 07:12:28 +08:00
server_test.go Correct fmt.Fprintf and t.Fatalf 2017-02-08 12:32:40 +08:00