summaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-09 10:40:20 +0100
committerGitHub <noreply@github.com>2020-01-09 10:40:20 +0100
commitf3fc10feb42930def6922fc050096ea38bafed7a (patch)
treeedf2dea05853dee9fb90bdfe3f07d3d810a0fe58 /pkg/adapter
parentc99b413abbc74f6f7e126d8bca58f44a3fcd9c2d (diff)
parentd52a4dc2d48e0c660fea1449e9d24aa4acf5fe8a (diff)
downloadpodman-f3fc10feb42930def6922fc050096ea38bafed7a.tar.gz
podman-f3fc10feb42930def6922fc050096ea38bafed7a.tar.bz2
podman-f3fc10feb42930def6922fc050096ea38bafed7a.zip
Merge pull request #4802 from rhatdan/varlink
Fix podman-remote info to show registry data
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/info_remote.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkg/adapter/info_remote.go b/pkg/adapter/info_remote.go
index 3170e5b3d..c55d1f6ef 100644
--- a/pkg/adapter/info_remote.go
+++ b/pkg/adapter/info_remote.go
@@ -14,12 +14,11 @@ 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{}
)
- registries := make(map[string]interface{})
- insecureRegistries := make(map[string]interface{})
info, err := iopodman.GetInfo().Call(r.Conn)
if err != nil {
return nil, err
@@ -39,13 +38,16 @@ func (r RemoteRuntime) Info() ([]define.InfoData, error) {
}
json.Unmarshal(s, &store)
- registries["registries"] = info.Registries
- insecureRegistries["registries"] = info.Insecure_registries
+ // info.Registries -> map[string]interface{}
+ reg, err := json.Marshal(info.Registries)
+ if err != nil {
+ return nil, err
+ }
+ json.Unmarshal(reg, &regInfo)
// Add everything to the reply
reply = append(reply, define.InfoData{Type: "host", Data: hostInfo})
- reply = append(reply, define.InfoData{Type: "registries", Data: registries})
- reply = append(reply, define.InfoData{Type: "insecure registries", Data: insecureRegistries})
+ reply = append(reply, define.InfoData{Type: "registries", Data: regInfo})
reply = append(reply, define.InfoData{Type: "store", Data: store})
return reply, nil
}