Merge pull request #29395 from mavenugo/exp13
Cherry-pick : Add the missing experimental ipvlan network driver
This commit is contained in:
commit
45b441f4f9
10 changed files with 20 additions and 17 deletions
|
@ -1189,6 +1189,7 @@ func (daemon *Daemon) networkOptions(dconfig *Config, pg plugingetter.PluginGett
|
|||
return options, nil
|
||||
}
|
||||
|
||||
options = append(options, nwconfig.OptionExperimental(dconfig.Experimental))
|
||||
options = append(options, nwconfig.OptionDataDir(dconfig.Root))
|
||||
options = append(options, nwconfig.OptionExecRoot(dconfig.GetExecRoot()))
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ github.com/RackSec/srslog 456df3a81436d29ba874f3590eeeee25d666f8a5
|
|||
github.com/imdario/mergo 0.2.1
|
||||
|
||||
#get libnetwork packages
|
||||
github.com/docker/libnetwork 4df06c4a7d9b67d0948eab39c5d013d7296acdbf
|
||||
github.com/docker/libnetwork b908488a139e81cb8c4091cd836745aeb4d813a4
|
||||
github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894
|
||||
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
|
||||
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
|
||||
|
|
9
vendor/github.com/docker/libnetwork/config/config.go
generated
vendored
9
vendor/github.com/docker/libnetwork/config/config.go
generated
vendored
|
@ -35,6 +35,7 @@ type Config struct {
|
|||
// DaemonCfg represents libnetwork core configuration
|
||||
type DaemonCfg struct {
|
||||
Debug bool
|
||||
Experimental bool
|
||||
DataDir string
|
||||
DefaultNetwork string
|
||||
DefaultDriver string
|
||||
|
@ -222,6 +223,14 @@ func OptionPluginGetter(pg plugingetter.PluginGetter) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// OptionExperimental function returns an option setter for experimental daemon
|
||||
func OptionExperimental(exp bool) Option {
|
||||
return func(c *Config) {
|
||||
logrus.Debugf("Option Experimental: %v", exp)
|
||||
c.Daemon.Experimental = exp
|
||||
}
|
||||
}
|
||||
|
||||
// ProcessOptions processes options and stores it in config
|
||||
func (c *Config) ProcessOptions(options ...Option) {
|
||||
for _, opt := range options {
|
||||
|
|
4
vendor/github.com/docker/libnetwork/controller.go
generated
vendored
4
vendor/github.com/docker/libnetwork/controller.go
generated
vendored
|
@ -188,7 +188,7 @@ func New(cfgOptions ...config.Option) (NetworkController, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
for _, i := range getInitializers() {
|
||||
for _, i := range getInitializers(c.cfg.Daemon.Experimental) {
|
||||
var dcfg map[string]interface{}
|
||||
|
||||
// External plugins don't need config passed through daemon. They can
|
||||
|
@ -476,7 +476,7 @@ func (c *controller) ID() string {
|
|||
|
||||
func (c *controller) BuiltinDrivers() []string {
|
||||
drivers := []string{}
|
||||
for _, i := range getInitializers() {
|
||||
for _, i := range getInitializers(c.cfg.Daemon.Experimental) {
|
||||
if i.ntype == "remote" {
|
||||
continue
|
||||
}
|
||||
|
|
2
vendor/github.com/docker/libnetwork/drivers_experimental_linux.go
generated
vendored
2
vendor/github.com/docker/libnetwork/drivers_experimental_linux.go
generated
vendored
|
@ -1,5 +1,3 @@
|
|||
// +build experimental
|
||||
|
||||
package libnetwork
|
||||
|
||||
import "github.com/docker/libnetwork/drivers/ipvlan"
|
||||
|
|
2
vendor/github.com/docker/libnetwork/drivers_freebsd.go
generated
vendored
2
vendor/github.com/docker/libnetwork/drivers_freebsd.go
generated
vendored
|
@ -5,7 +5,7 @@ import (
|
|||
"github.com/docker/libnetwork/drivers/remote"
|
||||
)
|
||||
|
||||
func getInitializers() []initializer {
|
||||
func getInitializers(experimental bool) []initializer {
|
||||
return []initializer{
|
||||
{null.Init, "null"},
|
||||
{remote.Init, "remote"},
|
||||
|
|
6
vendor/github.com/docker/libnetwork/drivers_linux.go
generated
vendored
6
vendor/github.com/docker/libnetwork/drivers_linux.go
generated
vendored
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/docker/libnetwork/drivers/remote"
|
||||
)
|
||||
|
||||
func getInitializers() []initializer {
|
||||
func getInitializers(experimental bool) []initializer {
|
||||
in := []initializer{
|
||||
{bridge.Init, "bridge"},
|
||||
{host.Init, "host"},
|
||||
|
@ -19,6 +19,8 @@ func getInitializers() []initializer {
|
|||
{overlay.Init, "overlay"},
|
||||
}
|
||||
|
||||
in = append(in, additionalDrivers()...)
|
||||
if experimental {
|
||||
in = append(in, additionalDrivers()...)
|
||||
}
|
||||
return in
|
||||
}
|
||||
|
|
2
vendor/github.com/docker/libnetwork/drivers_solaris.go
generated
vendored
2
vendor/github.com/docker/libnetwork/drivers_solaris.go
generated
vendored
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/docker/libnetwork/drivers/solaris/overlay"
|
||||
)
|
||||
|
||||
func getInitializers() []initializer {
|
||||
func getInitializers(experimental bool) []initializer {
|
||||
return []initializer{
|
||||
{overlay.Init, "overlay"},
|
||||
{bridge.Init, "bridge"},
|
||||
|
|
7
vendor/github.com/docker/libnetwork/drivers_stub_linux.go
generated
vendored
7
vendor/github.com/docker/libnetwork/drivers_stub_linux.go
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
// +build !experimental
|
||||
|
||||
package libnetwork
|
||||
|
||||
func additionalDrivers() []initializer {
|
||||
return nil
|
||||
}
|
2
vendor/github.com/docker/libnetwork/drivers_windows.go
generated
vendored
2
vendor/github.com/docker/libnetwork/drivers_windows.go
generated
vendored
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/docker/libnetwork/drivers/windows/overlay"
|
||||
)
|
||||
|
||||
func getInitializers() []initializer {
|
||||
func getInitializers(experimental bool) []initializer {
|
||||
return []initializer{
|
||||
{null.Init, "null"},
|
||||
{overlay.Init, "overlay"},
|
||||
|
|
Loading…
Reference in a new issue