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