mirror of
https://github.com/containers/podman.git
synced 2025-06-04 21:55:24 +08:00
Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -1,14 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/containers/podman/v2/libpod"
|
||||
"github.com/containers/podman/v2/libpod/define"
|
||||
"github.com/containers/podman/v2/pkg/domain/entities"
|
||||
createconfig "github.com/containers/podman/v2/pkg/spec"
|
||||
"github.com/gorilla/schema"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@ -59,18 +56,3 @@ func WaitContainer(w http.ResponseWriter, r *http.Request) (int32, error) {
|
||||
}
|
||||
return con.WaitForConditionWithInterval(interval, condition)
|
||||
}
|
||||
|
||||
func CreateContainer(ctx context.Context, w http.ResponseWriter, runtime *libpod.Runtime, cc *createconfig.CreateConfig) {
|
||||
var pod *libpod.Pod
|
||||
ctr, err := createconfig.CreateContainerFromCreateConfig(ctx, runtime, cc, pod)
|
||||
if err != nil {
|
||||
Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "CreateContainerFromCreateConfig()"))
|
||||
return
|
||||
}
|
||||
|
||||
response := entities.ContainerCreateResponse{
|
||||
ID: ctr.ID(),
|
||||
Warnings: []string{}}
|
||||
|
||||
WriteResponse(w, http.StatusCreated, response)
|
||||
}
|
||||
|
Reference in New Issue
Block a user