From 401dcff8389e10c6fd88ad34f82daccb8f800d3f Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 17 Dec 2020 12:07:13 -0600 Subject: 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 --- pkg/domain/infra/tunnel/helpers.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pkg/domain/infra/tunnel/helpers.go') 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 -- cgit v1.2.3-54-g00ecf