Files
docker-cli/components/engine/integration-cli
Yong Tang 832ffce833 Improve error message for removing pre-defined (e.g., ingress) network
This fix tries to address the issue raised in 24538

where the error message is unclear when removing pre-defined networks:
```
docker network rm ingress
Error response from daemon: rpc error: code = 7 desc = 4vlxuzpk8bxdsxpyvkxluol5g is a pre-defined network and cannot be removed
```

This fix improve the error message so that if network's name is specified
in the `RemoveNetwork`, then error message will contain the name and the ID
(instead of just an ID):
```
docker network rm ingress
Error response from daemon: rpc error: code = 7 desc = ingress (4vlxuzpk8bxdsxpyvkxluol5g) is a pre-defined network and cannot be removed
```

An integration test has been added to cover the changes.

This fix fixes 24538.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: de4871165b43ec813940858a1c96ab6bb1fbd776
Component: engine
2016-09-24 11:59:26 -07:00
..
2016-09-07 17:30:35 -04:00
2016-06-02 17:17:22 +08:00
2016-08-09 09:42:23 +08:00
2016-09-07 17:30:35 -04:00
2016-09-02 19:07:54 -07:00