summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-02 14:56:19 -0600
committerbaude <bbaude@redhat.com>2019-01-07 12:43:57 -0600
commit41fb81d074f57bcf562e7dee78a78896e9a0bc64 (patch)
treecfb79058783d99bcfd58c1e8d46e70686c5ab834 /cmd/podman
parente796f522f6b74a9fef16976709e773f6395ef5e2 (diff)
downloadpodman-41fb81d074f57bcf562e7dee78a78896e9a0bc64.tar.gz
podman-41fb81d074f57bcf562e7dee78a78896e9a0bc64.tar.bz2
podman-41fb81d074f57bcf562e7dee78a78896e9a0bc64.zip
Add ability to build golang remote client
Add the ability to build a remote client in golang that uses all the same front-end cli code and output code. The initial limitations here are that it can only be a local client while the bridge and resolver code is being written for the golang varlink client. Tests and docs will be added in subsequent PRs. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/info.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/podman/info.go b/cmd/podman/info.go
index c0639725e..4b80f94db 100644
--- a/cmd/podman/info.go
+++ b/cmd/podman/info.go
@@ -1,10 +1,10 @@
package main
import (
+ "github.com/containers/libpod/libpod/adapter"
"runtime"
"github.com/containers/libpod/cmd/podman/formats"
- "github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/libpod"
"github.com/pkg/errors"
"github.com/urfave/cli"
@@ -39,18 +39,20 @@ func infoCmd(c *cli.Context) error {
}
info := map[string]interface{}{}
- runtime, err := libpodruntime.GetRuntime(c)
+ localRuntime, err := adapter.GetRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Shutdown(false)
+ defer localRuntime.Runtime.Shutdown(false)
- infoArr, err := runtime.Info()
+ infoArr, err := localRuntime.Runtime.Info()
if err != nil {
return errors.Wrapf(err, "error getting info")
}
- if c.Bool("debug") {
+ // TODO This is no a problem child because we don't know if we should add information
+ // TODO about the client or the backend. Only do for traditional podman for now.
+ if !localRuntime.Remote && c.Bool("debug") {
debugInfo := debugInfo(c)
infoArr = append(infoArr, libpod.InfoData{Type: "debug", Data: debugInfo})
}