summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/helpers.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-12-17 12:07:13 -0600
committerbaude <bbaude@redhat.com>2020-12-21 09:21:46 -0600
commit401dcff8389e10c6fd88ad34f82daccb8f800d3f (patch)
tree2ccb5389ef46b53329911acf8d0fd5aa16a7b74f /pkg/domain/infra/tunnel/helpers.go
parentd6925182cdaf94225908a386d02eae8fd3e01123 (diff)
downloadpodman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.tar.gz
podman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.tar.bz2
podman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.zip
podman v3 container bindings
convert the golang container bindings to all use options so that changes in the future are more managable. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/helpers.go')
-rw-r--r--pkg/domain/infra/tunnel/helpers.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go
index cd116995f..0a806d860 100644
--- a/pkg/domain/infra/tunnel/helpers.go
+++ b/pkg/domain/infra/tunnel/helpers.go
@@ -4,7 +4,6 @@ import (
"context"
"github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/bindings"
"github.com/containers/podman/v2/pkg/bindings/containers"
"github.com/containers/podman/v2/pkg/bindings/pods"
"github.com/containers/podman/v2/pkg/domain/entities"
@@ -18,8 +17,8 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
if all && len(namesOrIDs) > 0 {
return nil, errors.New("cannot lookup containers and all")
}
-
- allContainers, err := containers.List(contextWithConnection, nil, bindings.PTrue, nil, nil, nil, bindings.PTrue)
+ options := new(containers.ListOptions).WithAll(true).WithSync(true)
+ allContainers, err := containers.List(contextWithConnection, options)
if err != nil {
return nil, err
}
@@ -38,7 +37,7 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
// First determine if the container exists by doing an inspect.
// Inspect takes supports names and IDs and let's us determine
// a containers full ID.
- inspectData, err := containers.Inspect(contextWithConnection, nameOrID, bindings.PFalse)
+ inspectData, err := containers.Inspect(contextWithConnection, nameOrID, new(containers.InspectOptions).WithSize(false))
if err != nil {
if ignore && errorhandling.Contains(err, define.ErrNoSuchCtr) {
continue