Files
podman/pkg/varlinkapi/system.go
baude 39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00

31 lines
820 B
Go

package varlinkapi
import (
ioprojectatomicpodman "github.com/projectatomic/libpod/cmd/podman/varlink"
"github.com/projectatomic/libpod/libpod"
)
// GetVersion ...
func (i *LibpodAPI) GetVersion(call ioprojectatomicpodman.VarlinkCall) error {
versionInfo, err := libpod.GetVersion()
if err != nil {
return err
}
return call.ReplyGetVersion(ioprojectatomicpodman.Version{
Version: versionInfo.Version,
Go_version: versionInfo.GoVersion,
Git_commit: versionInfo.GitCommit,
Built: versionInfo.Built,
Os_arch: versionInfo.OsArch,
})
}
// Ping returns a simple string "OK" response for clients to make sure
// the service is working.
func (i *LibpodAPI) Ping(call ioprojectatomicpodman.VarlinkCall) error {
return call.ReplyPing(ioprojectatomicpodman.StringResponse{
Message: "OK",
})
}