summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/volumes.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-24 07:28:36 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-27 09:04:10 -0500
commite56d5295614b745115abf0198f7b67ae157aae1e (patch)
tree4b18581f6656f2bd6455e797f69ab7d45535ec6a /pkg/varlinkapi/volumes.go
parent7007680bfdee8c36b855a97ee45d268b24bde7d3 (diff)
downloadpodman-e56d5295614b745115abf0198f7b67ae157aae1e.tar.gz
podman-e56d5295614b745115abf0198f7b67ae157aae1e.tar.bz2
podman-e56d5295614b745115abf0198f7b67ae157aae1e.zip
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>
Diffstat (limited to 'pkg/varlinkapi/volumes.go')
-rw-r--r--pkg/varlinkapi/volumes.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/varlinkapi/volumes.go b/pkg/varlinkapi/volumes.go
index cbb4a70cc..e497cb537 100644
--- a/pkg/varlinkapi/volumes.go
+++ b/pkg/varlinkapi/volumes.go
@@ -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)