github.com/portworx/docker@v1.12.1/runconfig/hostconfig_solaris.go (about) 1 package runconfig 2 3 import ( 4 "fmt" 5 "strings" 6 7 "github.com/docker/engine-api/types/container" 8 ) 9 10 // DefaultDaemonNetworkMode returns the default network stack the daemon should 11 // use. 12 func DefaultDaemonNetworkMode() container.NetworkMode { 13 return container.NetworkMode("default") 14 } 15 16 // IsPreDefinedNetwork indicates if a network is predefined by the daemon 17 func IsPreDefinedNetwork(network string) bool { 18 return false 19 } 20 21 // ValidateNetMode ensures that the various combinations of requested 22 // network settings are valid. 23 func ValidateNetMode(c *container.Config, hc *container.HostConfig) error { 24 // We may not be passed a host config, such as in the case of docker commit 25 if hc == nil { 26 return nil 27 } 28 parts := strings.Split(string(hc.NetworkMode), ":") 29 switch mode := parts[0]; mode { 30 case "default", "none": 31 default: 32 return fmt.Errorf("invalid --net: %s", hc.NetworkMode) 33 } 34 return nil 35 } 36 37 // ValidateIsolation performs platform specific validation of the 38 // isolation level in the hostconfig structure. 39 // This setting is currently discarded for Solaris so this is a no-op. 40 func ValidateIsolation(hc *container.HostConfig) error { 41 return nil 42 } 43 44 // ValidateQoS performs platform specific validation of the QoS settings 45 func ValidateQoS(hc *container.HostConfig) error { 46 return nil 47 }