diff options
Diffstat (limited to 'pkg/adapter/info_remote.go')
-rw-r--r-- | pkg/adapter/info_remote.go | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/pkg/adapter/info_remote.go b/pkg/adapter/info_remote.go deleted file mode 100644 index 0e8fb06d1..000000000 --- a/pkg/adapter/info_remote.go +++ /dev/null @@ -1,53 +0,0 @@ -// +build remoteclient - -package adapter - -import ( - "encoding/json" - - "github.com/containers/libpod/libpod/define" - iopodman "github.com/containers/libpod/pkg/varlink" -) - -// Info returns information for the host system and its components -func (r RemoteRuntime) Info() ([]define.InfoData, error) { - // TODO the varlink implementation for info should be updated to match the output for regular info - var ( - reply []define.InfoData - regInfo map[string]interface{} - hostInfo map[string]interface{} - store map[string]interface{} - ) - - info, err := iopodman.GetInfo().Call(r.Conn) - if err != nil { - return nil, err - } - - // info.host -> map[string]interface{} - h, err := json.Marshal(info.Host) - if err != nil { - return nil, err - } - json.Unmarshal(h, &hostInfo) - - // info.store -> map[string]interface{} - s, err := json.Marshal(info.Store) - if err != nil { - return nil, err - } - json.Unmarshal(s, &store) - - // info.Registries -> map[string]interface{} - reg, err := json.Marshal(info.Registries) - if err != nil { - return nil, err - } - json.Unmarshal(reg, ®Info) - - // Add everything to the reply - reply = append(reply, define.InfoData{Type: "host", Data: hostInfo}) - reply = append(reply, define.InfoData{Type: "registries", Data: regInfo}) - reply = append(reply, define.InfoData{Type: "store", Data: store}) - return reply, nil -} |