|
@@ -21,17 +21,17 @@ func (n NetworkMode) IsUserDefined() bool {
|
|
|
}
|
|
|
|
|
|
// IsHyperV indicates the use of a Hyper-V partition for isolation
|
|
|
-func (i IsolationLevel) IsHyperV() bool {
|
|
|
+func (i Isolation) IsHyperV() bool {
|
|
|
return strings.ToLower(string(i)) == "hyperv"
|
|
|
}
|
|
|
|
|
|
// IsProcess indicates the use of process isolation
|
|
|
-func (i IsolationLevel) IsProcess() bool {
|
|
|
+func (i Isolation) IsProcess() bool {
|
|
|
return strings.ToLower(string(i)) == "process"
|
|
|
}
|
|
|
|
|
|
-// IsValid indicates is an isolation level is valid
|
|
|
-func (i IsolationLevel) IsValid() bool {
|
|
|
+// IsValid indicates if an isolation technology is valid
|
|
|
+func (i Isolation) IsValid() bool {
|
|
|
return i.IsDefault() || i.IsHyperV() || i.IsProcess()
|
|
|
}
|
|
|
|
|
@@ -65,10 +65,10 @@ func ValidateNetMode(c *Config, hc *HostConfig) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-// ValidateIsolationLevel performs platform specific validation of the
|
|
|
-// isolation level in the hostconfig structure. Windows supports 'default' (or
|
|
|
+// ValidateIsolationperforms platform specific validation of the
|
|
|
+// isolation technology in the hostconfig structure. Windows supports 'default' (or
|
|
|
// blank), 'process', or 'hyperv'.
|
|
|
-func ValidateIsolationLevel(hc *HostConfig) error {
|
|
|
+func ValidateIsolation(hc *HostConfig) error {
|
|
|
// We may not be passed a host config, such as in the case of docker commit
|
|
|
if hc == nil {
|
|
|
return nil
|