mirror of
https://github.com/moby/moby.git
synced 2025-12-09 10:01:25 +03:00
Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause. Created a new test file dedicated for pause commands. Created a new utility function to get a slice of paused containers. Updated documentation Signed-off-by: André Martins <martins@noironetworks.com>
This commit is contained in:
@@ -380,6 +380,16 @@ func getPausedContainers() (string, error) {
|
||||
return out, err
|
||||
}
|
||||
|
||||
func getSliceOfPausedContainers() ([]string, error) {
|
||||
out, err := getPausedContainers()
|
||||
if err == nil {
|
||||
slice := strings.Split(strings.TrimSpace(out), "\n")
|
||||
return slice, err
|
||||
} else {
|
||||
return []string{out}, err
|
||||
}
|
||||
}
|
||||
|
||||
func unpauseContainer(container string) error {
|
||||
unpauseCmd := exec.Command(dockerBinary, "unpause", container)
|
||||
exitCode, err := runCommand(unpauseCmd)
|
||||
|
||||
Reference in New Issue
Block a user