diff options
author | baude <bbaude@redhat.com> | 2018-09-14 09:47:41 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2018-09-14 10:13:07 -0500 |
commit | 6f47eb0b287f35ebfb42fb44f0228b24dfee0d1e (patch) | |
tree | cd2553e6ed68d4862b95fcc8c664824d0c903a89 /pkg/varlinkapi/system.go | |
parent | b873fe760a3d3462c8f73e86195fedcacc543be0 (diff) | |
download | podman-6f47eb0b287f35ebfb42fb44f0228b24dfee0d1e.tar.gz podman-6f47eb0b287f35ebfb42fb44f0228b24dfee0d1e.tar.bz2 podman-6f47eb0b287f35ebfb42fb44f0228b24dfee0d1e.zip |
add registry information to varlink info
when using the varlink api, we should pass on the registries information
as is present in the cli info command.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/system.go')
-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) } |