Signed-off-by: allencloud <allen.sun@daocloud.io>
| ... | ... |
@@ -357,12 +357,14 @@ func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, netwo |
| 357 | 357 |
// GetNetworkDriverList returns the list of plugins drivers |
| 358 | 358 |
// registered for network. |
| 359 | 359 |
func (daemon *Daemon) GetNetworkDriverList() []string {
|
| 360 |
- pluginList := []string{}
|
|
| 361 |
- pluginMap := make(map[string]bool) |
|
| 362 |
- |
|
| 363 | 360 |
if !daemon.NetworkControllerEnabled() {
|
| 364 | 361 |
return nil |
| 365 | 362 |
} |
| 363 |
+ |
|
| 364 |
+ // TODO: Replace this with proper libnetwork API |
|
| 365 |
+ pluginList := []string{"overlay"}
|
|
| 366 |
+ pluginMap := map[string]bool{"overlay": true}
|
|
| 367 |
+ |
|
| 366 | 368 |
networks := daemon.netController.Networks() |
| 367 | 369 |
|
| 368 | 370 |
for _, network := range networks {
|
| ... | ... |
@@ -371,8 +373,6 @@ func (daemon *Daemon) GetNetworkDriverList() []string {
|
| 371 | 371 |
pluginMap[network.Type()] = true |
| 372 | 372 |
} |
| 373 | 373 |
} |
| 374 |
- // TODO : Replace this with proper libnetwork API |
|
| 375 |
- pluginList = append(pluginList, "overlay") |
|
| 376 | 374 |
|
| 377 | 375 |
sort.Strings(pluginList) |
| 378 | 376 |
|