From 40f4a00eb344ad3848c5e84bffd8c2061311f0a9 Mon Sep 17 00:00:00 2001 From: José Guilherme Vanz Date: Fri, 13 Dec 2019 11:06:10 -0300 Subject: runtime.go: show registries data and search table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update podman info command to show the registries data and the search table. Signed-off-by: José Guilherme Vanz --- libpod/runtime.go | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'libpod') diff --git a/libpod/runtime.go b/libpod/runtime.go index 5397e51f5..001d850b0 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -692,32 +692,19 @@ func (r *Runtime) Info() ([]define.InfoData, error) { info = append(info, define.InfoData{Type: "store", Data: storeInfo}) registries := make(map[string]interface{}) + data, err := sysreg.GetRegistriesData() + if err != nil { + return nil, errors.Wrapf(err, "error getting registries") + } + for _, reg := range data { + registries[reg.Prefix] = reg + } regs, err := sysreg.GetRegistries() if err != nil { return nil, errors.Wrapf(err, "error getting registries") } if len(regs) > 0 { - // v1 config file. We should use the search table format registries["search"] = regs - ireg, err := sysreg.GetInsecureRegistries() - if err != nil { - return nil, errors.Wrapf(err, "error getting registries") - } - registries["insecure"] = ireg - breg, err := sysreg.GetBlockedRegistries() - if err != nil { - return nil, errors.Wrapf(err, "error getting registries") - } - registries["blocked"] = breg - } else { - // v2 config file. We can show the whole registry data - data, err := sysreg.GetRegistriesData() - if err != nil { - return nil, errors.Wrapf(err, "error getting registries") - } - for _, reg := range data { - registries[reg.Prefix] = reg - } } info = append(info, define.InfoData{Type: "registries", Data: registries}) -- cgit v1.2.3-54-g00ecf