From 869466eb25a41ab0e6daf9bc6ab951d7300d3f9d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 15 Apr 2019 13:39:22 -0400 Subject: Add a new function for converting a CreateConfig Right now, there are two major API calls necessary to turn a filled-in CreateConfig into the options and OCI spec necessary to make a libpod Container. I'm intending on refactoring both of these extensively to unify a few things, so make a common frontend to both that will prevent API changes from leaking out of the package. Signed-off-by: Matthew Heon --- cmd/podman/shared/create.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'cmd/podman') diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 48476e177..a1b7cee1c 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -732,12 +732,7 @@ type namespace interface { } func CreateContainerFromCreateConfig(r *libpod.Runtime, createConfig *cc.CreateConfig, ctx context.Context, pod *libpod.Pod) (*libpod.Container, error) { - runtimeSpec, err := cc.CreateConfigToOCISpec(createConfig) - if err != nil { - return nil, err - } - - options, err := createConfig.GetContainerCreateOptions(r, pod) + runtimeSpec, options, err := createConfig.MakeContainerConfig(r, pod) if err != nil { return nil, err } -- cgit v1.2.3-54-g00ecf