mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: remove getPortMapInfo alias
The getPortMapInfo var was introduced in f198dfd856,
and (from looking at that patch) looks to have been as a quick and dirty workaround
for the `container` argument colliding with the `container` import.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -26,12 +26,9 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrRootFSReadOnly is returned when a container
|
||||
// rootfs is marked readonly.
|
||||
ErrRootFSReadOnly = errors.New("container rootfs is marked read-only")
|
||||
getPortMapInfo = getSandboxPortMapInfo
|
||||
)
|
||||
// ErrRootFSReadOnly is returned when a container
|
||||
// rootfs is marked readonly.
|
||||
var ErrRootFSReadOnly = errors.New("container rootfs is marked read-only")
|
||||
|
||||
func (daemon *Daemon) getDNSSearchSettings(container *container.Container) []string {
|
||||
if len(container.HostConfig.DNSSearch) > 0 {
|
||||
|
||||
@@ -886,7 +886,7 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep
|
||||
}
|
||||
|
||||
// Port-mapping rules belong to the container & applicable only to non-internal networks
|
||||
portmaps := getSandboxPortMapInfo(sb)
|
||||
portmaps := getPortMapInfo(sb)
|
||||
if n.Info().Internal() || len(portmaps) > 0 {
|
||||
return createOptions, nil
|
||||
}
|
||||
@@ -960,8 +960,8 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep
|
||||
return createOptions, nil
|
||||
}
|
||||
|
||||
// getSandboxPortMapInfo retrieves the current port-mapping programmed for the given sandbox
|
||||
func getSandboxPortMapInfo(sb libnetwork.Sandbox) nat.PortMap {
|
||||
// getPortMapInfo retrieves the current port-mapping programmed for the given sandbox
|
||||
func getPortMapInfo(sb libnetwork.Sandbox) nat.PortMap {
|
||||
pm := nat.PortMap{}
|
||||
if sb == nil {
|
||||
return pm
|
||||
|
||||
Reference in New Issue
Block a user