diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-09-14 16:53:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 16:53:53 -0400 |
commit | a7b6a0fd16e4b5f4a30a16e0ec1d5574925717ae (patch) | |
tree | 1d2053b6b2f9b6d4de34b8764e15b5839735d420 /pkg/varlinkapi | |
parent | 040555534532de45c84b8bcf09a6e6e59144b43b (diff) | |
parent | 6f47eb0b287f35ebfb42fb44f0228b24dfee0d1e (diff) | |
download | podman-a7b6a0fd16e4b5f4a30a16e0ec1d5574925717ae.tar.gz podman-a7b6a0fd16e4b5f4a30a16e0ec1d5574925717ae.tar.bz2 podman-a7b6a0fd16e4b5f4a30a16e0ec1d5574925717ae.zip |
Merge pull request #1474 from baude/varlinkinforegistries
add registry information to varlink info
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/system.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go index a90b72a6d..54bce3d35 100644 --- a/pkg/varlinkapi/system.go +++ b/pkg/varlinkapi/system.go @@ -34,6 +34,9 @@ func (i *LibpodAPI) Ping(call iopodman.VarlinkCall) error { // GetInfo returns details about the podman host and its stores func (i *LibpodAPI) GetInfo(call iopodman.VarlinkCall) error { + var ( + registries, insecureRegistries []string + ) podmanInfo := iopodman.PodmanInfo{} info, err := i.Runtime.Info() if err != nil { @@ -76,7 +79,19 @@ func (i *LibpodAPI) GetInfo(call iopodman.VarlinkCall) error { Graph_status: graphStatus, } + registriesInterface := info[2].Data["registries"] + insecureRegistriesInterface := info[3].Data["registries"] + if registriesInterface != nil { + registries = registriesInterface.([]string) + } + if insecureRegistriesInterface != nil { + insecureRegistries = insecureRegistriesInterface.([]string) + } + podmanInfo.Store = infoStore podmanInfo.Podman = pmaninfo + podmanInfo.Registries = registries + podmanInfo.Insecure_registries = insecureRegistries + return call.ReplyGetInfo(podmanInfo) } |