1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Change in bridge EndpointOperInfo()

- To also return the configured exposed ports, besides the
  port bindings; as now libnetwork/endpoint.go endpoint setters
  separate the exposed ports and port binding configs.
  Docker daemon will take care of aggregating the two sources
  for presentation.

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch 2015-06-03 20:28:15 -07:00
parent 927b19fa4b
commit 3be66461ba

View file

@ -925,6 +925,15 @@ func (d *driver) EndpointOperInfo(nid, eid types.UUID) (map[string]interface{},
m := make(map[string]interface{})
if ep.config.ExposedPorts != nil {
// Return a copy of the config data
epc := make([]types.TransportPort, 0, len(ep.config.ExposedPorts))
for _, tp := range ep.config.ExposedPorts {
epc = append(epc, tp.GetCopy())
}
m[netlabel.ExposedPorts] = epc
}
if ep.portMapping != nil {
// Return a copy of the operational data
pmc := make([]types.PortBinding, 0, len(ep.portMapping))