summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-05-10 13:58:20 -0700
committerJhon Honce <jhonce@redhat.com>2021-05-10 14:13:15 -0700
commit8ad40a85d5eab3eea888708e242f32354e799822 (patch)
tree6d3bd8c09ea3eab3ba14c2b81f924684150eb89d /cmd/podman
parent76c857704053a6c6ee1e2ed1900b549d399f967d (diff)
downloadpodman-8ad40a85d5eab3eea888708e242f32354e799822.tar.gz
podman-8ad40a85d5eab3eea888708e242f32354e799822.tar.bz2
podman-8ad40a85d5eab3eea888708e242f32354e799822.zip
Add host.serviceIsRemote to podman info results
Developers asked for a deterministic field to verify if podman is running via API or linked directly to libpod library. $ podman info --format '{{.Host.ServiceIsRemote}}' false $ podman-remote info --format '{{.Host.ServiceIsRemote}}' true $ podman --remote info --format '{{.Host.ServiceIsRemote}}' true * docs/conf.py formatted via black Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/system/info.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go
index afd5b3a34..44be4ccec 100644
--- a/cmd/podman/system/info.go
+++ b/cmd/podman/system/info.go
@@ -78,6 +78,8 @@ func info(cmd *cobra.Command, args []string) error {
return err
}
+ info.Host.ServiceIsRemote = registry.IsRemote()
+
switch {
case report.IsJSON(inFormat):
b, err := json.MarshalIndent(info, "", " ")