diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-20 17:20:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-20 17:20:59 +0200 |
commit | 8d5432932d21b6863f813437d649044ca2264a2d (patch) | |
tree | 453a4e0d7a287e159035e9d146e7f67657ba19fb /cmd | |
parent | 27f9e23a0b9ec8d9ba7ac98b66b422f7825a6555 (diff) | |
parent | a1c654de94738802b850edfad9502fca5dd26a59 (diff) | |
download | podman-8d5432932d21b6863f813437d649044ca2264a2d.tar.gz podman-8d5432932d21b6863f813437d649044ca2264a2d.tar.bz2 podman-8d5432932d21b6863f813437d649044ca2264a2d.zip |
Merge pull request #3139 from jwhonce/wip/remote_info
Add connection information to podman-remote info
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/info.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/podman/info.go b/cmd/podman/info.go index a6fce7fcb..823303354 100644 --- a/cmd/podman/info.go +++ b/cmd/podman/info.go @@ -10,6 +10,7 @@ import ( "github.com/containers/libpod/pkg/adapter" "github.com/containers/libpod/version" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -60,7 +61,16 @@ func infoCmd(c *cliconfig.InfoValues) error { if err != nil { return errors.Wrapf(err, "error getting info") } + if runtime.Remote { + endpoint, err := runtime.RemoteEndpoint() + if err != nil { + logrus.Errorf("Failed to obtain server connection: %s", err.Error()) + } else { + remoteClientInfo["Connection"] = endpoint.Connection + remoteClientInfo["Connection Type"] = endpoint.Type.String() + } + remoteClientInfo["RemoteAPI Version"] = version.RemoteAPIVersion remoteClientInfo["Podman Version"] = version.Version remoteClientInfo["OS Arch"] = fmt.Sprintf("%s/%s", rt.GOOS, rt.GOARCH) |