summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-03 12:36:39 +0200
committerGitHub <noreply@github.com>2020-06-03 12:36:39 +0200
commit428303c789243e849f8d88c144c5e7c715510860 (patch)
treedebaa2bff4a57a296a57c05b6afca0e7764181fa /pkg/domain/infra/tunnel/containers.go
parent95ea39edf34e4de4450c1674721ab02a7cf6a327 (diff)
parent5473ba95d729b9583c2c5a159a8be61a3a242949 (diff)
downloadpodman-428303c789243e849f8d88c144c5e7c715510860.tar.gz
podman-428303c789243e849f8d88c144c5e7c715510860.tar.bz2
podman-428303c789243e849f8d88c144c5e7c715510860.zip
Merge pull request #6474 from QiWang19/remote-cidfile-test
Turn on remote rm_test
Diffstat (limited to 'pkg/domain/infra/tunnel/containers.go')
-rw-r--r--pkg/domain/infra/tunnel/containers.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index af9d94293..97b98eec2 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
+ "io/ioutil"
"os"
"strconv"
"strings"
@@ -162,6 +163,14 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
var (
reports []*entities.RmReport
)
+ for _, cidFile := range options.CIDFiles {
+ content, err := ioutil.ReadFile(cidFile)
+ if err != nil {
+ return nil, errors.Wrapf(err, "error reading CIDFile %s", cidFile)
+ }
+ id := strings.Split(string(content), "\n")[0]
+ namesOrIds = append(namesOrIds, id)
+ }
ctrs, err := getContainersByContext(ic.ClientCxt, options.All, namesOrIds)
if err != nil {
return nil, err