diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-27 16:25:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 16:25:30 +0100 |
commit | 4233250c430a8f769048548b6ad6affd0d9e65e0 (patch) | |
tree | 0cf0c3dc86ccf85be3d5098f278021798c3f6b6c /pkg/domain/infra/tunnel | |
parent | 3ddb5b10d53df54346a6d795047124fc4e995699 (diff) | |
parent | e56d5295614b745115abf0198f7b67ae157aae1e (diff) | |
download | podman-4233250c430a8f769048548b6ad6affd0d9e65e0.tar.gz podman-4233250c430a8f769048548b6ad6affd0d9e65e0.tar.bz2 podman-4233250c430a8f769048548b6ad6affd0d9e65e0.zip |
Merge pull request #5611 from baude/v2podcreate
podmanv2 pod create using podspecgen
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r-- | pkg/domain/infra/tunnel/pods.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go index 53003da42..4894874e5 100644 --- a/pkg/domain/infra/tunnel/pods.go +++ b/pkg/domain/infra/tunnel/pods.go @@ -5,6 +5,7 @@ import ( "github.com/containers/libpod/pkg/bindings/pods" "github.com/containers/libpod/pkg/domain/entities" + "github.com/containers/libpod/pkg/specgen" ) func (ic *ContainerEngine) PodExists(ctx context.Context, nameOrId string) (*entities.BoolReport, error) { @@ -170,3 +171,9 @@ func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, optio } return reports, nil } + +func (ic *ContainerEngine) PodCreate(ctx context.Context, opts entities.PodCreateOptions) (*entities.PodCreateReport, error) { + podSpec := specgen.NewPodSpecGenerator() + opts.ToPodSpecGen(podSpec) + return pods.CreatePodFromSpec(ic.ClientCxt, podSpec) +} |