summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/containers.go
diff options
context:
space:
mode:
authorBoaz Shuster <boaz.shuster.github@gmail.com>2021-01-21 18:02:20 +0200
committerBoaz Shuster <boaz.shuster.github@gmail.com>2021-05-03 22:17:06 +0300
commita726a3d79c5bdda13fee2285222360a45e996272 (patch)
treeb2cb61ae2b7b29f429d4dcbaaa42efdba03a5a8f /pkg/domain/infra/tunnel/containers.go
parent697ec8f6f0ac8f251fd7f3f3bb5e21313ca62207 (diff)
downloadpodman-a726a3d79c5bdda13fee2285222360a45e996272.tar.gz
podman-a726a3d79c5bdda13fee2285222360a45e996272.tar.bz2
podman-a726a3d79c5bdda13fee2285222360a45e996272.zip
Add --all to podman start
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com> Co-authored-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/containers.go')
-rw-r--r--pkg/domain/infra/tunnel/containers.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index 4545d266b..de7f6f1d4 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -506,7 +506,7 @@ func startAndAttach(ic *ContainerEngine, name string, detachKeys *string, input,
func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []string, options entities.ContainerStartOptions) ([]*entities.ContainerStartReport, error) {
reports := []*entities.ContainerStartReport{}
var exitCode = define.ExecErrorCodeGeneric
- ctrs, err := getContainersByContext(ic.ClientCtx, false, false, namesOrIds)
+ ctrs, err := getContainersByContext(ic.ClientCtx, options.All, false, namesOrIds)
if err != nil {
return nil, err
}
@@ -514,9 +514,13 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
// There can only be one container if attach was used
for i, ctr := range ctrs {
name := ctr.ID
+ rawInput := ctr.ID
+ if !options.All {
+ rawInput = namesOrIds[i]
+ }
report := entities.ContainerStartReport{
Id: name,
- RawInput: namesOrIds[i],
+ RawInput: rawInput,
ExitCode: exitCode,
}
ctrRunning := ctr.State == define.ContainerStateRunning.String()