-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request moby#17534 from Microsoft/10662-filterhyperv
Windows: Add isolation to ps filter
- Loading branch information
Showing
6 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build linux freebsd | ||
|
||
package daemon | ||
|
||
// 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. | ||
func excludeByIsolation(container *Container, ctx *listContext) iterationAction { | ||
return includeContainer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package daemon | ||
|
||
import "strings" | ||
|
||
// 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. | ||
func excludeByIsolation(container *Container, ctx *listContext) iterationAction { | ||
i := strings.ToLower(string(container.hostConfig.Isolation)) | ||
if i == "" { | ||
i = "default" | ||
} | ||
if !ctx.filters.Match("isolation", i) { | ||
return excludeContainer | ||
} | ||
return includeContainer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters