From 6db7027e975029bc8c50fef958452d502620edea Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 27 Sep 2018 12:45:01 -0500 Subject: 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 --- pkg/varlinkapi/system.go | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'pkg/varlinkapi') 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 -- cgit v1.2.3-54-g00ecf