summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/system.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-09-28 11:09:08 -0700
committerGitHub <noreply@github.com>2018-09-28 11:09:08 -0700
commit77d80228481d1902be0a9ed30622189b54d2e3b0 (patch)
tree3b55f94a0f2d1deb82431abfc59476b07a91dafb /pkg/varlinkapi/system.go
parentca8469aace64d71fdb1849607d8227c31a3cf4da (diff)
parent6db7027e975029bc8c50fef958452d502620edea (diff)
downloadpodman-77d80228481d1902be0a9ed30622189b54d2e3b0.tar.gz
podman-77d80228481d1902be0a9ed30622189b54d2e3b0.tar.bz2
podman-77d80228481d1902be0a9ed30622189b54d2e3b0.zip
Merge pull request #1561 from baude/addbuildahdisttoinfo
Add buildah version and distribution to info
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