From 931bd5ace6d6efa19e0b123d8d70b273ea79d5ab Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 8 May 2020 10:16:14 -0700 Subject: V2 Impliment tunnelled podman version Signed-off-by: Jhon Honce --- pkg/domain/infra/abi/system.go | 10 ++++++++++ pkg/domain/infra/tunnel/system.go | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'pkg/domain/infra') diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index fc92da1b2..d701d65de 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -407,3 +407,13 @@ func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error { cmd.Stderr = os.Stderr return cmd.Run() } + +func (ic ContainerEngine) Version(ctx context.Context) (*entities.SystemVersionReport, error) { + var report entities.SystemVersionReport + v, err := define.GetVersion() + if err != nil { + return nil, err + } + report.Client = &v + return &report, err +} diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go index d00795741..dafada805 100644 --- a/pkg/domain/infra/tunnel/system.go +++ b/pkg/domain/infra/tunnel/system.go @@ -34,3 +34,7 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error { return errors.New("unshare is not supported on remote clients") } + +func (ic ContainerEngine) Version(ctx context.Context) (*entities.SystemVersionReport, error) { + return system.Version(ic.ClientCxt) +} -- cgit v1.2.3-54-g00ecf