diff --git a/libnetwork/drivers/bridge/brmanager/brmanager.go b/libnetwork/drivers/bridge/brmanager/brmanager.go index ce11b3b946..e56ca31434 100644 --- a/libnetwork/drivers/bridge/brmanager/brmanager.go +++ b/libnetwork/drivers/bridge/brmanager/brmanager.go @@ -14,12 +14,12 @@ type driver struct{} // Init registers a new instance of bridge manager driver. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { - return Register(dc, config) +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { + return Register(dc, nil) } // Register registers a new instance of the bridge manager driver with r. -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.LocalScope, ConnectivityScope: datastore.LocalScope, diff --git a/libnetwork/drivers/host/host.go b/libnetwork/drivers/host/host.go index a2126474a7..4bf369ce1d 100644 --- a/libnetwork/drivers/host/host.go +++ b/libnetwork/drivers/host/host.go @@ -19,11 +19,11 @@ type driver struct { // Init registers a new instance of host driver. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { - return Register(dc, config) +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { + return Register(dc, nil) } -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.LocalScope, ConnectivityScope: datastore.LocalScope, diff --git a/libnetwork/drivers/ipvlan/ivmanager/ivmanager.go b/libnetwork/drivers/ipvlan/ivmanager/ivmanager.go index 1729d7ac1d..cabff9fe0c 100644 --- a/libnetwork/drivers/ipvlan/ivmanager/ivmanager.go +++ b/libnetwork/drivers/ipvlan/ivmanager/ivmanager.go @@ -14,12 +14,12 @@ type driver struct{} // Init registers a new instance of the ipvlan manager driver. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { - return Register(dc, config) +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { + return Register(dc, nil) } // Register registers a new instance of the ipvlan manager driver. -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.LocalScope, ConnectivityScope: datastore.GlobalScope, diff --git a/libnetwork/drivers/macvlan/mvmanager/mvmanager.go b/libnetwork/drivers/macvlan/mvmanager/mvmanager.go index a3bde257a3..018933fc3c 100644 --- a/libnetwork/drivers/macvlan/mvmanager/mvmanager.go +++ b/libnetwork/drivers/macvlan/mvmanager/mvmanager.go @@ -14,12 +14,12 @@ type driver struct{} // Init registers a new instance of the macvlan manager driver. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { - return Register(dc, config) +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { + return Register(dc, nil) } // Register registers a new instance of the macvlan manager driver. -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.LocalScope, ConnectivityScope: datastore.GlobalScope, diff --git a/libnetwork/drivers/null/null.go b/libnetwork/drivers/null/null.go index f899c1ffcd..179103dada 100644 --- a/libnetwork/drivers/null/null.go +++ b/libnetwork/drivers/null/null.go @@ -17,7 +17,7 @@ type driver struct { } // Register registers a new instance of the null driver. -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.LocalScope, } diff --git a/libnetwork/drivers/overlay/ovmanager/ovmanager.go b/libnetwork/drivers/overlay/ovmanager/ovmanager.go index ccd075a00f..54eb42b593 100644 --- a/libnetwork/drivers/overlay/ovmanager/ovmanager.go +++ b/libnetwork/drivers/overlay/ovmanager/ovmanager.go @@ -26,7 +26,6 @@ const ( type networkTable map[string]*network type driver struct { - config map[string]interface{} networks networkTable vxlanIdm *idm.Idm sync.Mutex @@ -48,12 +47,12 @@ type network struct { // Init registers a new instance of the overlay driver. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { - return Register(dc, config) +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { + return Register(dc, nil) } // Register registers a new instance of the overlay driver. -func Register(r driverapi.DriverCallback, config map[string]interface{}) error { +func Register(r driverapi.DriverCallback, _ map[string]interface{}) error { var err error c := driverapi.Capability{ DataScope: datastore.GlobalScope, @@ -62,7 +61,6 @@ func Register(r driverapi.DriverCallback, config map[string]interface{}) error { d := &driver{ networks: networkTable{}, - config: config, } d.vxlanIdm, err = idm.New(nil, "vxlan-id", 0, vxlanIDEnd) diff --git a/libnetwork/drivers/remote/driver.go b/libnetwork/drivers/remote/driver.go index e2f1fa2c6c..19e641a13c 100644 --- a/libnetwork/drivers/remote/driver.go +++ b/libnetwork/drivers/remote/driver.go @@ -33,7 +33,7 @@ func newDriver(name string, client *plugins.Client) driverapi.Driver { // plugin is activated. // // Deprecated: use [Register]. -func Init(dc driverapi.DriverCallback, config map[string]interface{}) error { +func Init(dc driverapi.DriverCallback, _ map[string]interface{}) error { return Register(dc, dc.GetPluginGetter()) } diff --git a/libnetwork/drivers/windows/overlay/overlay_windows.go b/libnetwork/drivers/windows/overlay/overlay_windows.go index 05bc8f2f70..6f7cd148bd 100644 --- a/libnetwork/drivers/windows/overlay/overlay_windows.go +++ b/libnetwork/drivers/windows/overlay/overlay_windows.go @@ -21,13 +21,12 @@ const ( ) type driver struct { - config map[string]interface{} networks networkTable sync.Mutex } // Register registers a new instance of the overlay driver. -func Register(r driverapi.Registerer, config map[string]interface{}) error { +func Register(r driverapi.Registerer, _ map[string]interface{}) error { c := driverapi.Capability{ DataScope: datastore.GlobalScope, ConnectivityScope: datastore.GlobalScope, @@ -35,7 +34,6 @@ func Register(r driverapi.Registerer, config map[string]interface{}) error { d := &driver{ networks: networkTable{}, - config: config, } d.restoreHNSNetworks() @@ -64,7 +62,7 @@ func (d *driver) restoreHNSNetworks() error { // We assume that any network will be recreated on daemon restart // and therefore don't restore hns endpoints for now // - //n.restoreNetworkEndpoints() + // n.restoreNetworkEndpoints() } return nil