1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Make use of GetAllManagedPluginsForCap to avoid loading v1-plugins

Read this for more details : https://github.com/docker/docker/pull/29665

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2016-12-22 13:46:19 -08:00
parent 69cf4bc83e
commit c6dfc70b33
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
handleFunc := plugins.Handle
if pg := dc.GetPluginGetter(); pg != nil {
handleFunc = pg.Handle
activePlugins, _ := pg.GetAllByCap(driverapi.NetworkPluginEndpointType)
activePlugins := pg.GetAllManagedPluginsByCap(driverapi.NetworkPluginEndpointType)
for _, ap := range activePlugins {
newPluginHandler(ap.Name(), ap.Client())
}

View file

@ -50,7 +50,7 @@ func Init(cb ipamapi.Callback, l, g interface{}) error {
handleFunc := plugins.Handle
if pg := cb.GetPluginGetter(); pg != nil {
handleFunc = pg.Handle
activePlugins, _ := pg.GetAllByCap(ipamapi.PluginEndpointType)
activePlugins := pg.GetAllManagedPluginsByCap(ipamapi.PluginEndpointType)
for _, ap := range activePlugins {
newPluginHandler(ap.Name(), ap.Client())
}