Skip to content

Commit

Permalink
Change in bridge EndpointOperInfo()
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
aboch committed Jun 4, 2015
1 parent 65f5163 commit 349def3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 349def3

Please sign in to comment.