summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2017-12-12 12:48:51 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-14 00:54:21 +0000
commit5330d3da7c07861bfca12c7e8197a17a7c6a1b39 (patch)
treee37ad654380f53bd3b7e4b7f46832f998233b347 /libpod/runtime.go
parent40f01d56aba23045d2c5077b2ea4e9f7fdfa3249 (diff)
downloadpodman-5330d3da7c07861bfca12c7e8197a17a7c6a1b39.tar.gz
podman-5330d3da7c07861bfca12c7e8197a17a7c6a1b39.tar.bz2
podman-5330d3da7c07861bfca12c7e8197a17a7c6a1b39.zip
Update kpod info to use new libpod api
Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #124 Approved by: mheon
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d54e90722..bc3a63940 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -309,3 +309,23 @@ func (r *Runtime) refresh(alivePath string) error {
return nil
}
+
+// Info returns the store and host information
+func (r *Runtime) Info() ([]InfoData, error) {
+ info := []InfoData{}
+ // get host information
+ hostInfo, err := r.hostInfo()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting host info")
+ }
+ info = append(info, InfoData{Type: "host", Data: hostInfo})
+
+ // get store information
+ storeInfo, err := r.storeInfo()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting store info")
+ }
+ info = append(info, InfoData{Type: "store", Data: storeInfo})
+
+ return info, nil
+}