2016-03-25 19:38:00 -04:00
|
|
|
package runconfig
|
|
|
|
|
|
|
|
import (
|
2016-09-06 14:18:12 -04:00
|
|
|
"github.com/docker/docker/api/types/container"
|
2016-06-07 15:05:43 -04:00
|
|
|
"github.com/docker/docker/pkg/sysinfo"
|
2016-03-25 19:38:00 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// DefaultDaemonNetworkMode returns the default network stack the daemon should
|
|
|
|
// use.
|
|
|
|
func DefaultDaemonNetworkMode() container.NetworkMode {
|
2016-06-07 03:45:21 -04:00
|
|
|
return container.NetworkMode("bridge")
|
2016-03-25 19:38:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// IsPreDefinedNetwork indicates if a network is predefined by the daemon
|
|
|
|
func IsPreDefinedNetwork(network string) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2017-03-10 12:39:22 -05:00
|
|
|
// validateNetMode ensures that the various combinations of requested
|
2016-03-25 19:38:00 -04:00
|
|
|
// network settings are valid.
|
2017-03-10 12:39:22 -05:00
|
|
|
func validateNetMode(c *container.Config, hc *container.HostConfig) error {
|
2016-03-25 19:38:00 -04:00
|
|
|
// We may not be passed a host config, such as in the case of docker commit
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-03-10 12:39:22 -05:00
|
|
|
// validateIsolation performs platform specific validation of the
|
2016-03-25 19:38:00 -04:00
|
|
|
// isolation level in the hostconfig structure.
|
|
|
|
// This setting is currently discarded for Solaris so this is a no-op.
|
2017-03-10 12:39:22 -05:00
|
|
|
func validateIsolation(hc *container.HostConfig) error {
|
2016-03-25 19:38:00 -04:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-03-10 12:39:22 -05:00
|
|
|
// validateQoS performs platform specific validation of the QoS settings
|
|
|
|
func validateQoS(hc *container.HostConfig) error {
|
2016-03-25 19:38:00 -04:00
|
|
|
return nil
|
|
|
|
}
|
2016-06-07 15:05:43 -04:00
|
|
|
|
2017-03-10 12:39:22 -05:00
|
|
|
// validateResources performs platform specific validation of the resource settings
|
|
|
|
func validateResources(hc *container.HostConfig, si *sysinfo.SysInfo) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// validatePrivileged performs platform specific validation of the Privileged setting
|
|
|
|
func validatePrivileged(hc *container.HostConfig) error {
|
2016-06-07 15:05:43 -04:00
|
|
|
return nil
|
|
|
|
}
|