2015-10-19 16:33:43 +00:00
|
|
|
package daemon
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/docker/docker/container"
|
|
|
|
)
|
2015-10-19 16:33:43 +00: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 19:55:17 +00:00
|
|
|
func excludeByIsolation(container *container.Container, ctx *listContext) iterationAction {
|
|
|
|
i := strings.ToLower(string(container.HostConfig.Isolation))
|
2015-10-19 16:33:43 +00:00
|
|
|
if i == "" {
|
|
|
|
i = "default"
|
|
|
|
}
|
|
|
|
if !ctx.filters.Match("isolation", i) {
|
|
|
|
return excludeContainer
|
|
|
|
}
|
|
|
|
return includeContainer
|
|
|
|
}
|