Remove redundant isNetworkHotPluggable() function
All platforms now have hot-pluggable networks, so this check was no longer needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6dfd5bd74f
commit
0169ad3e2a
3 changed files with 0 additions and 13 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"net"
|
||||
"os"
|
||||
"path"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -1040,8 +1039,6 @@ func (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName
|
|||
EndpointSettings: endpointConfig,
|
||||
}
|
||||
}
|
||||
} else if !daemon.isNetworkHotPluggable() {
|
||||
return fmt.Errorf(runtime.GOOS + " does not support connecting a running container to a network")
|
||||
} else {
|
||||
if err := daemon.connectToNetwork(container, idOrName, endpointConfig, true); err != nil {
|
||||
return err
|
||||
|
@ -1070,8 +1067,6 @@ func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, netw
|
|||
return fmt.Errorf("container %s is not connected to the network %s", container.ID, networkName)
|
||||
}
|
||||
delete(container.NetworkSettings.Networks, networkName)
|
||||
} else if err == nil && !daemon.isNetworkHotPluggable() {
|
||||
return fmt.Errorf(runtime.GOOS + " does not support connecting a running container to a network")
|
||||
} else if err == nil {
|
||||
if container.HostConfig.NetworkMode.IsHost() && containertypes.NetworkMode(n.Type()).IsHost() {
|
||||
return runconfig.ErrConflictHostNetwork
|
||||
|
|
|
@ -368,10 +368,6 @@ func enableIPOnPredefinedNetwork() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (daemon *Daemon) isNetworkHotPluggable() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (daemon *Daemon) setupPathsAndSandboxOptions(container *container.Container, sboxOptions *[]libnetwork.SandboxOption) error {
|
||||
var err error
|
||||
|
||||
|
|
|
@ -154,10 +154,6 @@ func enableIPOnPredefinedNetwork() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (daemon *Daemon) isNetworkHotPluggable() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (daemon *Daemon) setupPathsAndSandboxOptions(container *container.Container, sboxOptions *[]libnetwork.SandboxOption) error {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue