mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #26891 from allencloud/fix-26890-duplicate-overlay-drivers-in-info
fix #26890 avoid duplicate overlay drivers in info
This commit is contained in:
commit
8dc63675c5
1 changed files with 5 additions and 5 deletions
|
@ -357,12 +357,14 @@ func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, netwo
|
||||||
// GetNetworkDriverList returns the list of plugins drivers
|
// GetNetworkDriverList returns the list of plugins drivers
|
||||||
// registered for network.
|
// registered for network.
|
||||||
func (daemon *Daemon) GetNetworkDriverList() []string {
|
func (daemon *Daemon) GetNetworkDriverList() []string {
|
||||||
pluginList := []string{}
|
|
||||||
pluginMap := make(map[string]bool)
|
|
||||||
|
|
||||||
if !daemon.NetworkControllerEnabled() {
|
if !daemon.NetworkControllerEnabled() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Replace this with proper libnetwork API
|
||||||
|
pluginList := []string{"overlay"}
|
||||||
|
pluginMap := map[string]bool{"overlay": true}
|
||||||
|
|
||||||
networks := daemon.netController.Networks()
|
networks := daemon.netController.Networks()
|
||||||
|
|
||||||
for _, network := range networks {
|
for _, network := range networks {
|
||||||
|
@ -371,8 +373,6 @@ func (daemon *Daemon) GetNetworkDriverList() []string {
|
||||||
pluginMap[network.Type()] = true
|
pluginMap[network.Type()] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO : Replace this with proper libnetwork API
|
|
||||||
pluginList = append(pluginList, "overlay")
|
|
||||||
|
|
||||||
sort.Strings(pluginList)
|
sort.Strings(pluginList)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue