summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorJosé Guilherme Vanz <jvanz@jvanz.com>2019-12-13 11:06:10 -0300
committerJosé Guilherme Vanz <jvanz@jvanz.com>2019-12-13 11:11:28 -0300
commit40f4a00eb344ad3848c5e84bffd8c2061311f0a9 (patch)
tree50cd41c69615bb76ba1f81286d38e979c152f2c4 /libpod/runtime.go
parent95d26e3f6f1b089968ea1eacf7c5af538ef27955 (diff)
downloadpodman-40f4a00eb344ad3848c5e84bffd8c2061311f0a9.tar.gz
podman-40f4a00eb344ad3848c5e84bffd8c2061311f0a9.tar.bz2
podman-40f4a00eb344ad3848c5e84bffd8c2061311f0a9.zip
runtime.go: show registries data and search table
Update podman info command to show the registries data and the search table. Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go27
1 files changed, 7 insertions, 20 deletions
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})