Merge pull request #21160 from mavenugo/staleep
Include all endpoints in network inspect object
This commit is contained in:
commit
901c67a8ee
2 changed files with 8 additions and 4 deletions
|
@ -181,11 +181,12 @@ func buildNetworkResource(nw libnetwork.Network) *types.NetworkResource {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
sb := ei.Sandbox()
|
sb := ei.Sandbox()
|
||||||
if sb == nil {
|
key := "ep-" + e.ID()
|
||||||
continue
|
if sb != nil {
|
||||||
|
key = sb.ContainerID()
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Containers[sb.ContainerID()] = buildEndpointResource(e)
|
r.Containers[key] = buildEndpointResource(e)
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,10 @@ bda12f8922785d1f160be70736f26c1e331ab8aaf8ed8d56728508f2e2fd4727
|
||||||
```
|
```
|
||||||
|
|
||||||
The `network inspect` command shows the containers, by id, in its
|
The `network inspect` command shows the containers, by id, in its
|
||||||
results. You can specify an alternate format to execute a given
|
results. For networks backed by multi-host network driver, such as Overlay,
|
||||||
|
this command also shows the container endpoints in other hosts in the
|
||||||
|
cluster. These endpoints are represented as "ep-{endpoint-id}" in the output.
|
||||||
|
You can specify an alternate format to execute a given
|
||||||
template for each result. Go's
|
template for each result. Go's
|
||||||
[text/template](http://golang.org/pkg/text/template/) package describes all the
|
[text/template](http://golang.org/pkg/text/template/) package describes all the
|
||||||
details of the format.
|
details of the format.
|
||||||
|
|
Loading…
Add table
Reference in a new issue