summaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-08-02 15:02:50 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-08-02 15:08:30 -0400
commitcd561cfe2f3a23388a17504be8a33faa4e7ed203 (patch)
tree90a11c76025ff278629272bc3db06ef4b1b1f1c6 /pkg/adapter
parent8b72a72ca2171a8545023ee45ab42de9a78ae5f4 (diff)
downloadpodman-cd561cfe2f3a23388a17504be8a33faa4e7ed203.tar.gz
podman-cd561cfe2f3a23388a17504be8a33faa4e7ed203.tar.bz2
podman-cd561cfe2f3a23388a17504be8a33faa4e7ed203.zip
Swap 'volume inspect' frontend to use the new backend
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/runtime.go19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go
index ee6913cc0..452d0159f 100644
--- a/pkg/adapter/runtime.go
+++ b/pkg/adapter/runtime.go
@@ -5,14 +5,11 @@ package adapter
import (
"bufio"
"context"
- "github.com/containers/libpod/libpod/define"
"io"
"io/ioutil"
"os"
"text/template"
- "github.com/containers/libpod/cmd/podman/shared"
-
"github.com/containers/buildah"
"github.com/containers/buildah/imagebuildah"
"github.com/containers/buildah/pkg/parse"
@@ -20,7 +17,9 @@ import (
"github.com/containers/image/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/libpodruntime"
+ "github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/events"
"github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/rootless"
@@ -209,7 +208,7 @@ func (r *LocalRuntime) Push(ctx context.Context, srcName, destination, manifestM
}
// InspectVolumes returns a slice of volumes based on an arg list or --all
-func (r *LocalRuntime) InspectVolumes(ctx context.Context, c *cliconfig.VolumeInspectValues) ([]*Volume, error) {
+func (r *LocalRuntime) InspectVolumes(ctx context.Context, c *cliconfig.VolumeInspectValues) ([]*libpod.InspectVolumeData, error) {
var (
volumes []*libpod.Volume
err error
@@ -229,7 +228,17 @@ func (r *LocalRuntime) InspectVolumes(ctx context.Context, c *cliconfig.VolumeIn
if err != nil {
return nil, err
}
- return libpodVolumeToVolume(volumes), nil
+
+ inspectVols := make([]*libpod.InspectVolumeData, 0, len(volumes))
+ for _, vol := range volumes {
+ inspectOut, err := vol.Inspect()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error inspecting volume %s", vol.Name())
+ }
+ inspectVols = append(inspectVols, inspectOut)
+ }
+
+ return inspectVols, nil
}
// Volumes returns a slice of localruntime volumes