فهرست منبع

Merge pull request #29877 from mavenugo/npfilter

Use GetAllByCap to get list of network plugins in docker info
Tibor Vass 8 سال پیش
والد
کامیت
4617b66c90
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      daemon/network.go

+ 7 - 0
daemon/network.go

@@ -407,6 +407,13 @@ func (daemon *Daemon) GetNetworkDriverList() []string {
 	}
 
 	pluginList := daemon.netController.BuiltinDrivers()
+
+	managedPlugins := daemon.PluginStore.GetAllManagedPluginsByCap(driverapi.NetworkPluginEndpointType)
+
+	for _, plugin := range managedPlugins {
+		pluginList = append(pluginList, plugin.Name())
+	}
+
 	pluginMap := make(map[string]bool)
 	for _, plugin := range pluginList {
 		pluginMap[plugin] = true