summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/system.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-09-27 12:45:01 -0500
committerbaude <bbaude@redhat.com>2018-09-28 10:48:16 -0500
commit6db7027e975029bc8c50fef958452d502620edea (patch)
tree3b55f94a0f2d1deb82431abfc59476b07a91dafb /pkg/varlinkapi/system.go
parentca8469aace64d71fdb1849607d8227c31a3cf4da (diff)
downloadpodman-6db7027e975029bc8c50fef958452d502620edea.tar.gz
podman-6db7027e975029bc8c50fef958452d502620edea.tar.bz2
podman-6db7027e975029bc8c50fef958452d502620edea.zip
Add buildah version and distribution to info
For the sake of debug and problem reporting, we would benefit from knowing what buildah version was vendored into podman. Also, knowing the distribution and distribution version would also be handy. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/system.go')
-rw-r--r--pkg/varlinkapi/system.go25
1 files changed, 16 insertions, 9 deletions
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go
index 54bce3d35..287f42209 100644
--- a/pkg/varlinkapi/system.go
+++ b/pkg/varlinkapi/system.go
@@ -42,17 +42,24 @@ func (i *LibpodAPI) GetInfo(call iopodman.VarlinkCall) error {
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
+
host := info[0].Data
+ distribution := iopodman.InfoDistribution{
+ Distribution: host["Distribution"].(map[string]interface{})["distribution"].(string),
+ Version: host["Distribution"].(map[string]interface{})["version"].(string),
+ }
infoHost := iopodman.InfoHost{
- Mem_free: host["MemFree"].(int64),
- Mem_total: host["MemTotal"].(int64),
- Swap_free: host["SwapFree"].(int64),
- Arch: host["arch"].(string),
- Cpus: int64(host["cpus"].(int)),
- Hostname: host["hostname"].(string),
- Kernel: host["kernel"].(string),
- Os: host["os"].(string),
- Uptime: host["uptime"].(string),
+ Buildah_version: host["BuildahVersion"].(string),
+ Distribution: distribution,
+ Mem_free: host["MemFree"].(int64),
+ Mem_total: host["MemTotal"].(int64),
+ Swap_free: host["SwapFree"].(int64),
+ Arch: host["arch"].(string),
+ Cpus: int64(host["cpus"].(int)),
+ Hostname: host["hostname"].(string),
+ Kernel: host["kernel"].(string),
+ Os: host["os"].(string),
+ Uptime: host["uptime"].(string),
}
podmanInfo.Host = infoHost
store := info[1].Data