From 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 30 Sep 2021 14:43:39 -0400 Subject: Add --time out for podman * rm -f commands Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh --- pkg/domain/infra/tunnel/network.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/domain/infra/tunnel/network.go') diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go index 6f227f565..79fba1943 100644 --- a/pkg/domain/infra/tunnel/network.go +++ b/pkg/domain/infra/tunnel/network.go @@ -47,6 +47,9 @@ func (ic *ContainerEngine) NetworkReload(ctx context.Context, names []string, op func (ic *ContainerEngine) NetworkRm(ctx context.Context, namesOrIds []string, opts entities.NetworkRmOptions) ([]*entities.NetworkRmReport, error) { reports := make([]*entities.NetworkRmReport, 0, len(namesOrIds)) options := new(network.RemoveOptions).WithForce(opts.Force) + if opts.Timeout != nil { + options = options.WithTimeout(*opts.Timeout) + } for _, name := range namesOrIds { response, err := network.Remove(ic.ClientCtx, name, options) if err != nil { -- cgit v1.2.3-54-g00ecf