2015-10-19 19:33:43 +03:00
|
|
|
package daemon
|
|
|
|
|
2015-11-12 22:55:17 +03:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/docker/docker/container"
|
|
|
|
)
|
2015-10-19 19:33:43 +03:00
|
|
|
|
|
|
|
// excludeByIsolation is a platform specific helper function to support PS
|
|
|
|
// filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix.
|
2015-11-12 22:55:17 +03:00
|
|
|
func excludeByIsolation(container *container.Container, ctx *listContext) iterationAction {
|
|
|
|
i := strings.ToLower(string(container.HostConfig.Isolation))
|
2015-10-19 19:33:43 +03:00
|
|
|
if i == "" {
|
|
|
|
i = "default"
|
|
|
|
}
|
|
|
|
if !ctx.filters.Match("isolation", i) {
|
|
|
|
return excludeContainer
|
|
|
|
}
|
|
|
|
return includeContainer
|
|
|
|
}
|