libnetwork/drivers: remove unused "config" parameters and fields
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
d547477bc2
commit
a718ccd0c5
8 changed files with 19 additions and 23 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue