From eef5e6d5da91736717454e72b5205459eab6bfff Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 28 Aug 2017 16:41:27 -0400 Subject: [PATCH] kpod: add more storage information to "info" Have the "kpod info" command also package up the driver-level status information that the github.com/containers/storage.Store's Status() method returns. Signed-off-by: Nalin Dahyabhai --- cmd/kpod/info.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/kpod/info.go b/cmd/kpod/info.go index 79980b08..d641a7e0 100644 --- a/cmd/kpod/info.go +++ b/cmd/kpod/info.go @@ -139,7 +139,18 @@ func storeInfo(c *cli.Context) (string, map[string]interface{}, error) { // lets say storage driver in use, number of images, number of containers info := map[string]interface{}{} info["GraphRoot"] = store.GraphRoot() + info["RunRoot"] = store.RunRoot() info["GraphDriverName"] = store.GraphDriverName() + info["GraphOptions"] = store.GraphOptions() + statusPairs, err := store.Status() + if err != nil { + return storeStr, nil, err + } + status := map[string]string{} + for _, pair := range statusPairs { + status[pair[0]] = pair[1] + } + info["GraphStatus"] = status images, err := store.Images() if err != nil { info["ImageStore"] = infoErr(err)