aboutsummaryrefslogtreecommitdiff
path: root/libpod/driver
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-08 14:45:24 +0200
committerGitHub <noreply@github.com>2019-06-08 14:45:24 +0200
commit39f5ea4c040d60f5f16b85ab144ddacf4cbba4c8 (patch)
tree001ee1a2377c342c616f300831375c42ae58c63f /libpod/driver
parentf6a2860b625a796bd9d6fd48e641b7f7fa50d28a (diff)
parent1be345bd9d82ac64d7ae3ceea41f72329f7bdebf (diff)
downloadpodman-39f5ea4c040d60f5f16b85ab144ddacf4cbba4c8.tar.gz
podman-39f5ea4c040d60f5f16b85ab144ddacf4cbba4c8.tar.bz2
podman-39f5ea4c040d60f5f16b85ab144ddacf4cbba4c8.zip
Merge pull request #3180 from mheon/inspect_volumes
Begin to break up pkg/inspect
Diffstat (limited to 'libpod/driver')
-rw-r--r--libpod/driver/driver.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/libpod/driver/driver.go b/libpod/driver/driver.go
index 717ac2a4d..f9442fa21 100644
--- a/libpod/driver/driver.go
+++ b/libpod/driver/driver.go
@@ -1,10 +1,15 @@
package driver
import (
- "github.com/containers/libpod/pkg/inspect"
cstorage "github.com/containers/storage"
)
+// Data handles the data for a storage driver
+type Data struct {
+ Name string `json:"Name"`
+ Data map[string]string `json:"Data"`
+}
+
// GetDriverName returns the name of the driver for the given store
func GetDriverName(store cstorage.Store) (string, error) {
driver, err := store.GraphDriver()
@@ -24,7 +29,7 @@ func GetDriverMetadata(store cstorage.Store, layerID string) (map[string]string,
}
// GetDriverData returns the Data struct with information of the driver used by the store
-func GetDriverData(store cstorage.Store, layerID string) (*inspect.Data, error) {
+func GetDriverData(store cstorage.Store, layerID string) (*Data, error) {
name, err := GetDriverName(store)
if err != nil {
return nil, err
@@ -33,7 +38,7 @@ func GetDriverData(store cstorage.Store, layerID string) (*inspect.Data, error)
if err != nil {
return nil, err
}
- return &inspect.Data{
+ return &Data{
Name: name,
Data: metaData,
}, nil