mirror of https://github.com/containers/podman.git
Add version to podman info command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
d6b3bc18f8
commit
62803f8d3b
|
@ -8,6 +8,7 @@ type Info struct {
|
||||||
Host *HostInfo `json:"host"`
|
Host *HostInfo `json:"host"`
|
||||||
Store *StoreInfo `json:"store"`
|
Store *StoreInfo `json:"store"`
|
||||||
Registries map[string]interface{} `json:"registries"`
|
Registries map[string]interface{} `json:"registries"`
|
||||||
|
Version Version `json:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//HostInfo describes the libpod host
|
//HostInfo describes the libpod host
|
||||||
|
|
|
@ -26,6 +26,11 @@ import (
|
||||||
// Info returns the store and host information
|
// Info returns the store and host information
|
||||||
func (r *Runtime) info() (*define.Info, error) {
|
func (r *Runtime) info() (*define.Info, error) {
|
||||||
info := define.Info{}
|
info := define.Info{}
|
||||||
|
versionInfo, err := define.GetVersion()
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrapf(err, "error getting version info")
|
||||||
|
}
|
||||||
|
info.Version = versionInfo
|
||||||
// get host information
|
// get host information
|
||||||
hostInfo, err := r.hostInfo()
|
hostInfo, err := r.hostInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue