summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/generate.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-17 17:22:37 +0000
committerGitHub <noreply@github.com>2020-12-17 17:22:37 +0000
commita17afa931d1aa73b8657cf26de3b49841837f66d (patch)
tree8b3e3408eea4fa15320f5c294d96b8e134bf49c4 /pkg/domain/infra/tunnel/generate.go
parent033336606f8aa9687cbdff5450c691b48d45e8e6 (diff)
parent86335aa4ae01dadecd36468409d742e68b76925d (diff)
downloadpodman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.gz
podman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.bz2
podman-a17afa931d1aa73b8657cf26de3b49841837f66d.zip
Merge pull request #8752 from baude/bindings3volumes
misc bindings to podman v3
Diffstat (limited to 'pkg/domain/infra/tunnel/generate.go')
-rw-r--r--pkg/domain/infra/tunnel/generate.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index ebbfa143f..30a501a48 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -7,10 +7,16 @@ import (
"github.com/containers/podman/v2/pkg/domain/entities"
)
-func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, options entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) {
+func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, opts entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) {
+ options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New)
+ options.WithPodPrefix(opts.PodPrefix).WithRestartPolicy(opts.RestartPolicy).WithSeparator(opts.Separator)
+ if to := opts.StopTimeout; to != nil {
+ options.WithStopTimeout(*opts.StopTimeout)
+ }
return generate.Systemd(ic.ClientCxt, nameOrID, options)
}
-func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) {
+func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, opts entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) {
+ options := new(generate.KubeOptions).WithService(opts.Service)
return generate.Kube(ic.ClientCxt, nameOrIDs, options)
}