Include container names in network inspect

This commit makes `docker network inspect` print container names as
service discovery is based on container name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: fbed26297dca2adc59d891c661548302ec848984
Component: engine
This commit is contained in:
Zhang Wei
2015-11-05 19:16:13 +08:00
parent 0e4d37bec5
commit 8e86de45f2
3 changed files with 43 additions and 0 deletions
@@ -237,6 +237,7 @@ func buildEndpointResource(e libnetwork.Endpoint) types.EndpointResource {
}
er.EndpointID = e.ID()
er.Name = e.Name()
ei := e.Info()
if ei == nil {
return er
+1
View File
@@ -361,6 +361,7 @@ type NetworkResource struct {
// EndpointResource contains network resources allocated and used for a container in a network
type EndpointResource struct {
Name string
EndpointID string
MacAddress string
IPv4Address string