mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
podmanv2 pod create using podspecgen
using the factory approach similar to container, we now create pods based on a pod spec generator. wired up the podmanv2 pod create command, podcreatewithspec binding, simple binding test, and apiv2 endpoint. also included some code refactoring as it introduced as easy circular import. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -6,7 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/containers/libpod/cmd/podman/shared"
|
||||
"github.com/containers/libpod/cmd/podman/varlink"
|
||||
iopodman "github.com/containers/libpod/cmd/podman/varlink"
|
||||
"github.com/containers/libpod/libpod"
|
||||
)
|
||||
|
||||
@ -113,11 +113,11 @@ func (i *LibpodAPI) VolumesPrune(call iopodman.VarlinkCall) error {
|
||||
if err != nil {
|
||||
return call.ReplyVolumesPrune([]string{}, []string{err.Error()})
|
||||
}
|
||||
for _, i := range responses {
|
||||
if i.Err == nil {
|
||||
prunedNames = append(prunedNames, i.Id)
|
||||
for k, v := range responses {
|
||||
if v == nil {
|
||||
prunedNames = append(prunedNames, k)
|
||||
} else {
|
||||
prunedErrors = append(prunedErrors, i.Err.Error())
|
||||
prunedErrors = append(prunedErrors, v.Error())
|
||||
}
|
||||
}
|
||||
return call.ReplyVolumesPrune(prunedNames, prunedErrors)
|
||||
|
Reference in New Issue
Block a user