Переглянути джерело

daemon/config: remove commonUnixBridgeConfig

This type was added to support Solaris (which didn't support these
options). Solaris support was removed, so we can integrate this type
back into the "unix" type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 4 роки тому
батько
коміт
defeab7387
2 змінених файлів з 7 додано та 13 видалено
  1. 0 10
      daemon/config/config_common_unix.go
  2. 7 3
      daemon/config/config_unix.go

+ 0 - 10
daemon/config/config_common_unix.go

@@ -3,8 +3,6 @@
 package config // import "github.com/docker/docker/daemon/config"
 
 import (
-	"net"
-
 	"github.com/docker/docker/api/types"
 )
 
@@ -16,14 +14,6 @@ type CommonUnixConfig struct {
 	DefaultInitBinary string                   `json:"default-init,omitempty"`
 }
 
-type commonUnixBridgeConfig struct {
-	DefaultIP                   net.IP `json:"ip,omitempty"`
-	IP                          string `json:"bip,omitempty"`
-	DefaultGatewayIPv4          net.IP `json:"default-gateway,omitempty"`
-	DefaultGatewayIPv6          net.IP `json:"default-gateway-v6,omitempty"`
-	InterContainerCommunication bool   `json:"icc,omitempty"`
-}
-
 // GetRuntime returns the runtime path and arguments for a given
 // runtime name
 func (conf *Config) GetRuntime(name string) *types.Runtime {

+ 7 - 3
daemon/config/config_unix.go

@@ -4,6 +4,7 @@ package config // import "github.com/docker/docker/daemon/config"
 
 import (
 	"fmt"
+	"net"
 
 	containertypes "github.com/docker/docker/api/types/container"
 	"github.com/docker/docker/opts"
@@ -20,10 +21,13 @@ const (
 type BridgeConfig struct {
 	commonBridgeConfig
 
-	// These fields are common to all unix platforms.
-	commonUnixBridgeConfig
-
 	// Fields below here are platform specific.
+	DefaultIP                   net.IP `json:"ip,omitempty"`
+	IP                          string `json:"bip,omitempty"`
+	DefaultGatewayIPv4          net.IP `json:"default-gateway,omitempty"`
+	DefaultGatewayIPv6          net.IP `json:"default-gateway-v6,omitempty"`
+	InterContainerCommunication bool   `json:"icc,omitempty"`
+
 	EnableIPv6          bool   `json:"ipv6,omitempty"`
 	EnableIPTables      bool   `json:"iptables,omitempty"`
 	EnableIP6Tables     bool   `json:"ip6tables,omitempty"`