Przeglądaj źródła

Vendor libnetwork.

This is primarily for plugingetter import path change.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Anusha Ragunathan 8 lat temu
rodzic
commit
1845f506e4

+ 1 - 1
hack/vendor.sh

@@ -70,7 +70,7 @@ clone git github.com/RackSec/srslog 365bf33cd9acc21ae1c355209865f17228ca534e
 clone git github.com/imdario/mergo 0.2.1
 
 #get libnetwork packages
-clone git github.com/docker/libnetwork 7b74403be4241aea5b01b56adab5eab82a80698b
+clone git github.com/docker/libnetwork 848cd92ec23e3ab15a36412030ed61e3844b40e1
 clone git github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894
 clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
 clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

+ 3 - 3
vendor/src/github.com/docker/libnetwork/config/config.go

@@ -6,7 +6,7 @@ import (
 	"github.com/BurntSushi/toml"
 	log "github.com/Sirupsen/logrus"
 	"github.com/docker/docker/pkg/discovery"
-	"github.com/docker/docker/plugin/getter"
+	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/go-connections/tlsconfig"
 	"github.com/docker/libkv/store"
 	"github.com/docker/libnetwork/cluster"
@@ -21,7 +21,7 @@ type Config struct {
 	Cluster         ClusterCfg
 	Scopes          map[string]*datastore.ScopeCfg
 	ActiveSandboxes map[string]interface{}
-	PluginGetter    getter.PluginGetter
+	PluginGetter    plugingetter.PluginGetter
 }
 
 // DaemonCfg represents libnetwork core configuration
@@ -208,7 +208,7 @@ func OptionExecRoot(execRoot string) Option {
 }
 
 // OptionPluginGetter returns a plugingetter for remote drivers.
-func OptionPluginGetter(pg getter.PluginGetter) Option {
+func OptionPluginGetter(pg plugingetter.PluginGetter) Option {
 	return func(c *Config) {
 		c.PluginGetter = pg
 	}

+ 3 - 3
vendor/src/github.com/docker/libnetwork/controller.go

@@ -53,9 +53,9 @@ import (
 	log "github.com/Sirupsen/logrus"
 	"github.com/docker/docker/pkg/discovery"
 	"github.com/docker/docker/pkg/locker"
+	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/docker/pkg/plugins"
 	"github.com/docker/docker/pkg/stringid"
-	"github.com/docker/docker/plugin/getter"
 	"github.com/docker/libnetwork/cluster"
 	"github.com/docker/libnetwork/config"
 	"github.com/docker/libnetwork/datastore"
@@ -596,7 +596,7 @@ func (c *controller) isDistributedControl() bool {
 	return !c.isManager() && !c.isAgent()
 }
 
-func (c *controller) GetPluginGetter() getter.PluginGetter {
+func (c *controller) GetPluginGetter() plugingetter.PluginGetter {
 	return c.drvRegistry.GetPluginGetter()
 }
 
@@ -1073,7 +1073,7 @@ func (c *controller) loadDriver(networkType string) error {
 }
 
 func (c *controller) loadIPAMDriver(name string) error {
-	if _, err := c.GetPluginGetter().Get(name, ipamapi.PluginEndpointType, getter.LOOKUP); err != nil {
+	if _, err := c.GetPluginGetter().Get(name, ipamapi.PluginEndpointType, plugingetter.LOOKUP); err != nil {
 		if err == plugins.ErrNotFound {
 			return types.NotFoundErrorf(err.Error())
 		}

+ 2 - 2
vendor/src/github.com/docker/libnetwork/driverapi/driverapi.go

@@ -3,7 +3,7 @@ package driverapi
 import (
 	"net"
 
-	"github.com/docker/docker/plugin/getter"
+	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/libnetwork/discoverapi"
 )
 
@@ -141,7 +141,7 @@ type JoinInfo interface {
 // DriverCallback provides a Callback interface for Drivers into LibNetwork
 type DriverCallback interface {
 	// GetPluginGetter returns the pluginv2 getter.
-	GetPluginGetter() getter.PluginGetter
+	GetPluginGetter() plugingetter.PluginGetter
 	// RegisterDriver provides a way for Remote drivers to dynamically register new NetworkType and associate with a driver instance
 	RegisterDriver(name string, driver Driver, capability Capability) error
 }

+ 4 - 4
vendor/src/github.com/docker/libnetwork/drvregistry/drvregistry.go

@@ -5,7 +5,7 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/docker/docker/plugin/getter"
+	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/libnetwork/driverapi"
 	"github.com/docker/libnetwork/ipamapi"
 	"github.com/docker/libnetwork/types"
@@ -33,7 +33,7 @@ type DrvRegistry struct {
 	ipamDrivers  ipamTable
 	dfn          DriverNotifyFunc
 	ifn          IPAMNotifyFunc
-	pluginGetter getter.PluginGetter
+	pluginGetter plugingetter.PluginGetter
 }
 
 // Functors definition
@@ -54,7 +54,7 @@ type IPAMNotifyFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capabili
 type DriverNotifyFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) error
 
 // New retruns a new driver registry handle.
-func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg getter.PluginGetter) (*DrvRegistry, error) {
+func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg plugingetter.PluginGetter) (*DrvRegistry, error) {
 	r := &DrvRegistry{
 		drivers:      make(driverTable),
 		ipamDrivers:  make(ipamTable),
@@ -153,7 +153,7 @@ func (r *DrvRegistry) IPAMDefaultAddressSpaces(name string) (string, string, err
 }
 
 // GetPluginGetter returns the plugingetter
-func (r *DrvRegistry) GetPluginGetter() getter.PluginGetter {
+func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter {
 	return r.pluginGetter
 }
 

+ 2 - 2
vendor/src/github.com/docker/libnetwork/ipamapi/contract.go

@@ -4,7 +4,7 @@ package ipamapi
 import (
 	"net"
 
-	"github.com/docker/docker/plugin/getter"
+	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/types"
 )
@@ -27,7 +27,7 @@ const (
 // Callback provides a Callback interface for registering an IPAM instance into LibNetwork
 type Callback interface {
 	// GetPluginGetter returns the pluginv2 getter.
-	GetPluginGetter() getter.PluginGetter
+	GetPluginGetter() plugingetter.PluginGetter
 	// RegisterIpamDriver provides a way for Remote drivers to dynamically register with libnetwork
 	RegisterIpamDriver(name string, driver Ipam) error
 	// RegisterIpamDriverWithCapabilities provides a way for Remote drivers to dynamically register with libnetwork and specify capabilities