diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-17 14:05:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 14:05:15 +0100 |
commit | 1e440a3a3f7c7a1ac5896ae834e884c0dc3907f3 (patch) | |
tree | 7d47b76e16325f841ea729e203519bbf2b0a0707 /libpod/runtime.go | |
parent | 43292040ab6841779def4872a4c337a77b05bfa0 (diff) | |
parent | 40f4a00eb344ad3848c5e84bffd8c2061311f0a9 (diff) | |
download | podman-1e440a3a3f7c7a1ac5896ae834e884c0dc3907f3.tar.gz podman-1e440a3a3f7c7a1ac5896ae834e884c0dc3907f3.tar.bz2 podman-1e440a3a3f7c7a1ac5896ae834e884c0dc3907f3.zip |
Merge pull request #4681 from jvanz/issue4553
podman: mirror information
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index 3873079ce..001d850b0 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -691,24 +691,22 @@ func (r *Runtime) Info() ([]define.InfoData, error) { } info = append(info, define.InfoData{Type: "store", Data: storeInfo}) - reg, err := sysreg.GetRegistries() - if err != nil { - return nil, errors.Wrapf(err, "error getting registries") - } registries := make(map[string]interface{}) - registries["search"] = reg - - ireg, err := sysreg.GetInsecureRegistries() + data, err := sysreg.GetRegistriesData() if err != nil { return nil, errors.Wrapf(err, "error getting registries") } - registries["insecure"] = ireg - - breg, err := sysreg.GetBlockedRegistries() + for _, reg := range data { + registries[reg.Prefix] = reg + } + regs, err := sysreg.GetRegistries() if err != nil { return nil, errors.Wrapf(err, "error getting registries") } - registries["blocked"] = breg + if len(regs) > 0 { + registries["search"] = regs + } + info = append(info, define.InfoData{Type: "registries", Data: registries}) return info, nil } |