summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-05-28 13:27:23 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-11 11:01:13 +0200
commit7d71d24440afbf30689c53c2c69205072e4b029f (patch)
tree20ae3d75ac79b2e9cf5a237ce4582ecd6a508b9c /pkg/domain/infra
parent7f5aabb08389f9baee49bd76ab21f876e0bb70b9 (diff)
downloadpodman-7d71d24440afbf30689c53c2c69205072e4b029f.tar.gz
podman-7d71d24440afbf30689c53c2c69205072e4b029f.tar.bz2
podman-7d71d24440afbf30689c53c2c69205072e4b029f.zip
podman-pod{rm,start,stop}: support --pod-id-file
Support the `--pod-id-file` flag in the rm, start and stop pod commands. This completes the already support flag in pod-create and is another prerequisite for generating generic systemd unit files for pods. Also add completions, docs and tests. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/pods.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index eb6f1e191..054b59b06 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -144,6 +144,7 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
var (
reports []*entities.PodStopReport
)
+
pods, err := getPodsByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
if err != nil && !(options.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err
@@ -199,10 +200,12 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op
var (
reports []*entities.PodStartReport
)
+
pods, err := getPodsByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
if err != nil {
return nil, err
}
+
for _, p := range pods {
report := entities.PodStartReport{Id: p.ID()}
errs, err := p.Start(ctx)
@@ -227,6 +230,7 @@ func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, optio
var (
reports []*entities.PodRmReport
)
+
pods, err := getPodsByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
if err != nil && !(options.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err