aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-08-02 08:58:59 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-06 14:49:11 +0000
commitbd9d3a8fa5843dca49a4903d66f603f678ed0fa5 (patch)
treed5122665394c94133530e0cbc3ee783fb0441839 /pkg/varlinkapi
parentee89bc46eb4d27176977174d08893188b13228b7 (diff)
downloadpodman-bd9d3a8fa5843dca49a4903d66f603f678ed0fa5.tar.gz
podman-bd9d3a8fa5843dca49a4903d66f603f678ed0fa5.tar.bz2
podman-bd9d3a8fa5843dca49a4903d66f603f678ed0fa5.zip
Rename varlink socket and interface
io.projectatomic.podman -> io.podman Signed-off-by: baude <bbaude@redhat.com> Closes: #1204 Approved by: mheon
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/config.go8
-rw-r--r--pkg/varlinkapi/containers.go52
-rw-r--r--pkg/varlinkapi/containers_create.go4
-rw-r--r--pkg/varlinkapi/images.go48
-rw-r--r--pkg/varlinkapi/system.go20
-rw-r--r--pkg/varlinkapi/util.go14
6 files changed, 73 insertions, 73 deletions
diff --git a/pkg/varlinkapi/config.go b/pkg/varlinkapi/config.go
index 2da3787be..fa1983463 100644
--- a/pkg/varlinkapi/config.go
+++ b/pkg/varlinkapi/config.go
@@ -1,7 +1,7 @@
package varlinkapi
import (
- ioprojectatomicpodman "github.com/projectatomic/libpod/cmd/podman/varlink"
+ iopodman "github.com/projectatomic/libpod/cmd/podman/varlink"
"github.com/projectatomic/libpod/libpod"
"github.com/urfave/cli"
)
@@ -9,12 +9,12 @@ import (
// LibpodAPI is the basic varlink struct for libpod
type LibpodAPI struct {
Cli *cli.Context
- ioprojectatomicpodman.VarlinkInterface
+ iopodman.VarlinkInterface
Runtime *libpod.Runtime
}
// New creates a new varlink client
-func New(cli *cli.Context, runtime *libpod.Runtime) *ioprojectatomicpodman.VarlinkInterface {
+func New(cli *cli.Context, runtime *libpod.Runtime) *iopodman.VarlinkInterface {
lp := LibpodAPI{Cli: cli, Runtime: runtime}
- return ioprojectatomicpodman.VarlinkNew(&lp)
+ return iopodman.VarlinkNew(&lp)
}
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 82cd135c3..f42386194 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -17,9 +17,9 @@ import (
)
// ListContainers ...
-func (i *LibpodAPI) ListContainers(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) ListContainers(call iopodman.VarlinkCall) error {
var (
- listContainers []ioprojectatomicpodman.ListContainerData
+ listContainers []iopodman.ListContainerData
)
containers, err := i.Runtime.GetAllContainers()
@@ -42,7 +42,7 @@ func (i *LibpodAPI) ListContainers(call ioprojectatomicpodman.VarlinkCall) error
}
// GetContainer ...
-func (i *LibpodAPI) GetContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) GetContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -59,7 +59,7 @@ func (i *LibpodAPI) GetContainer(call ioprojectatomicpodman.VarlinkCall, name st
}
// InspectContainer ...
-func (i *LibpodAPI) InspectContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) InspectContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -80,7 +80,7 @@ func (i *LibpodAPI) InspectContainer(call ioprojectatomicpodman.VarlinkCall, nam
}
// ListContainerProcesses ...
-func (i *LibpodAPI) ListContainerProcesses(call ioprojectatomicpodman.VarlinkCall, name string, opts []string) error {
+func (i *LibpodAPI) ListContainerProcesses(call iopodman.VarlinkCall, name string, opts []string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -107,7 +107,7 @@ func (i *LibpodAPI) ListContainerProcesses(call ioprojectatomicpodman.VarlinkCal
}
// GetContainerLogs ...
-func (i *LibpodAPI) GetContainerLogs(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) GetContainerLogs(call iopodman.VarlinkCall, name string) error {
var logs []string
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
@@ -168,12 +168,12 @@ func (i *LibpodAPI) GetContainerLogs(call ioprojectatomicpodman.VarlinkCall, nam
}
// ListContainerChanges ...
-func (i *LibpodAPI) ListContainerChanges(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) ListContainerChanges(call iopodman.VarlinkCall, name string) error {
changes, err := i.Runtime.GetDiff("", name)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- result := ioprojectatomicpodman.ContainerChanges{}
+ result := iopodman.ContainerChanges{}
for _, change := range changes {
switch change.Kind {
case archive.ChangeModify:
@@ -188,7 +188,7 @@ func (i *LibpodAPI) ListContainerChanges(call ioprojectatomicpodman.VarlinkCall,
}
// ExportContainer ...
-func (i *LibpodAPI) ExportContainer(call ioprojectatomicpodman.VarlinkCall, name, path string) error {
+func (i *LibpodAPI) ExportContainer(call iopodman.VarlinkCall, name, path string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -200,7 +200,7 @@ func (i *LibpodAPI) ExportContainer(call ioprojectatomicpodman.VarlinkCall, name
}
// GetContainerStats ...
-func (i *LibpodAPI) GetContainerStats(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) GetContainerStats(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -209,7 +209,7 @@ func (i *LibpodAPI) GetContainerStats(call ioprojectatomicpodman.VarlinkCall, na
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- cs := ioprojectatomicpodman.ContainerStats{
+ cs := iopodman.ContainerStats{
Id: ctr.ID(),
Name: ctr.Name(),
Cpu: containerStats.CPU,
@@ -228,12 +228,12 @@ func (i *LibpodAPI) GetContainerStats(call ioprojectatomicpodman.VarlinkCall, na
}
// ResizeContainerTty ...
-func (i *LibpodAPI) ResizeContainerTty(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) ResizeContainerTty(call iopodman.VarlinkCall) error {
return call.ReplyMethodNotImplemented("ResizeContainerTty")
}
// StartContainer ...
-func (i *LibpodAPI) StartContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) StartContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -252,7 +252,7 @@ func (i *LibpodAPI) StartContainer(call ioprojectatomicpodman.VarlinkCall, name
}
// StopContainer ...
-func (i *LibpodAPI) StopContainer(call ioprojectatomicpodman.VarlinkCall, name string, timeout int64) error {
+func (i *LibpodAPI) StopContainer(call iopodman.VarlinkCall, name string, timeout int64) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -264,7 +264,7 @@ func (i *LibpodAPI) StopContainer(call ioprojectatomicpodman.VarlinkCall, name s
}
// RestartContainer ...
-func (i *LibpodAPI) RestartContainer(call ioprojectatomicpodman.VarlinkCall, name string, timeout int64) error {
+func (i *LibpodAPI) RestartContainer(call iopodman.VarlinkCall, name string, timeout int64) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -277,7 +277,7 @@ func (i *LibpodAPI) RestartContainer(call ioprojectatomicpodman.VarlinkCall, nam
// KillContainer kills a running container. If you want to use the default SIGTERM signal, just send a -1
// for the signal arg.
-func (i *LibpodAPI) KillContainer(call ioprojectatomicpodman.VarlinkCall, name string, signal int64) error {
+func (i *LibpodAPI) KillContainer(call iopodman.VarlinkCall, name string, signal int64) error {
killSignal := uint(syscall.SIGTERM)
if signal != -1 {
killSignal = uint(signal)
@@ -293,17 +293,17 @@ func (i *LibpodAPI) KillContainer(call ioprojectatomicpodman.VarlinkCall, name s
}
// UpdateContainer ...
-func (i *LibpodAPI) UpdateContainer(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) UpdateContainer(call iopodman.VarlinkCall) error {
return call.ReplyMethodNotImplemented("UpdateContainer")
}
// RenameContainer ...
-func (i *LibpodAPI) RenameContainer(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) RenameContainer(call iopodman.VarlinkCall) error {
return call.ReplyMethodNotImplemented("RenameContainer")
}
// PauseContainer ...
-func (i *LibpodAPI) PauseContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) PauseContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -315,7 +315,7 @@ func (i *LibpodAPI) PauseContainer(call ioprojectatomicpodman.VarlinkCall, name
}
// UnpauseContainer ...
-func (i *LibpodAPI) UnpauseContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) UnpauseContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -328,12 +328,12 @@ func (i *LibpodAPI) UnpauseContainer(call ioprojectatomicpodman.VarlinkCall, nam
// AttachToContainer ...
// TODO: DO we also want a different one for websocket?
-func (i *LibpodAPI) AttachToContainer(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) AttachToContainer(call iopodman.VarlinkCall) error {
return call.ReplyMethodNotImplemented("AttachToContainer")
}
// WaitContainer ...
-func (i *LibpodAPI) WaitContainer(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) WaitContainer(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -347,7 +347,7 @@ func (i *LibpodAPI) WaitContainer(call ioprojectatomicpodman.VarlinkCall, name s
}
// RemoveContainer ...
-func (i *LibpodAPI) RemoveContainer(call ioprojectatomicpodman.VarlinkCall, name string, force bool) error {
+func (i *LibpodAPI) RemoveContainer(call iopodman.VarlinkCall, name string, force bool) error {
ctx := getContext()
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
@@ -361,7 +361,7 @@ func (i *LibpodAPI) RemoveContainer(call ioprojectatomicpodman.VarlinkCall, name
}
// DeleteStoppedContainers ...
-func (i *LibpodAPI) DeleteStoppedContainers(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) DeleteStoppedContainers(call iopodman.VarlinkCall) error {
ctx := getContext()
var deletedContainers []string
containers, err := i.Runtime.GetAllContainers()
@@ -384,7 +384,7 @@ func (i *LibpodAPI) DeleteStoppedContainers(call ioprojectatomicpodman.VarlinkCa
}
// GetAttachSockets ...
-func (i *LibpodAPI) GetAttachSockets(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) GetAttachSockets(call iopodman.VarlinkCall, name string) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -403,7 +403,7 @@ func (i *LibpodAPI) GetAttachSockets(call ioprojectatomicpodman.VarlinkCall, nam
}
}
- s := ioprojectatomicpodman.Sockets{
+ s := iopodman.Sockets{
Container_id: ctr.ID(),
Io_socket: ctr.AttachSocketPath(),
Control_socket: ctr.ControlSocketPath(),
diff --git a/pkg/varlinkapi/containers_create.go b/pkg/varlinkapi/containers_create.go
index 6a601dae8..5f69a8205 100644
--- a/pkg/varlinkapi/containers_create.go
+++ b/pkg/varlinkapi/containers_create.go
@@ -20,7 +20,7 @@ import (
)
// CreateContainer ...
-func (i *LibpodAPI) CreateContainer(call ioprojectatomicpodman.VarlinkCall, config ioprojectatomicpodman.Create) error {
+func (i *LibpodAPI) CreateContainer(call iopodman.VarlinkCall, config iopodman.Create) error {
rtc := i.Runtime.GetConfig()
ctx := getContext()
@@ -64,7 +64,7 @@ func (i *LibpodAPI) CreateContainer(call ioprojectatomicpodman.VarlinkCall, conf
// varlinkCreateToCreateConfig takes the varlink input struct and maps it to a pointer
// of a CreateConfig, which eventually can be used to create the OCI spec.
-func varlinkCreateToCreateConfig(ctx context.Context, create ioprojectatomicpodman.Create, runtime *libpod.Runtime, imageName string, data *inspect.ImageData) (*cc.CreateConfig, error) {
+func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, runtime *libpod.Runtime, imageName string, data *inspect.ImageData) (*cc.CreateConfig, error) {
var (
inputCommand, command []string
memoryLimit, memoryReservation, memorySwap, memoryKernel int64
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index f4ba8cbf3..f1167c6e2 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -26,18 +26,18 @@ import (
// ListImages lists all the images in the store
// It requires no inputs.
-func (i *LibpodAPI) ListImages(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) ListImages(call iopodman.VarlinkCall) error {
images, err := i.Runtime.ImageRuntime().GetImages()
if err != nil {
return call.ReplyErrorOccurred(fmt.Sprintf("unable to get list of images %q", err))
}
- var imageList []ioprojectatomicpodman.ImageInList
+ var imageList []iopodman.ImageInList
for _, image := range images {
labels, _ := image.Labels(getContext())
containers, _ := image.Containers()
size, _ := image.Size(getContext())
- i := ioprojectatomicpodman.ImageInList{
+ i := iopodman.ImageInList{
Id: image.ID(),
ParentId: image.Parent,
RepoTags: image.Names(),
@@ -54,7 +54,7 @@ func (i *LibpodAPI) ListImages(call ioprojectatomicpodman.VarlinkCall) error {
}
// GetImage returns a single image in the form of a ImageInList
-func (i *LibpodAPI) GetImage(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) GetImage(call iopodman.VarlinkCall, name string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
@@ -72,7 +72,7 @@ func (i *LibpodAPI) GetImage(call ioprojectatomicpodman.VarlinkCall, name string
return err
}
- il := ioprojectatomicpodman.ImageInList{
+ il := iopodman.ImageInList{
Id: newImage.ID(),
ParentId: newImage.Parent,
RepoTags: newImage.Names(),
@@ -87,7 +87,7 @@ func (i *LibpodAPI) GetImage(call ioprojectatomicpodman.VarlinkCall, name string
}
// BuildImage ...
-func (i *LibpodAPI) BuildImage(call ioprojectatomicpodman.VarlinkCall, config ioprojectatomicpodman.BuildInfo) error {
+func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildInfo) error {
var (
memoryLimit int64
memorySwap int64
@@ -221,7 +221,7 @@ func (i *LibpodAPI) BuildImage(call ioprojectatomicpodman.VarlinkCall, config io
time.Sleep(1 * time.Second)
break
}
- br := ioprojectatomicpodman.BuildResponse{
+ br := iopodman.BuildResponse{
Logs: log,
}
call.ReplyBuildImage(br)
@@ -239,7 +239,7 @@ func (i *LibpodAPI) BuildImage(call ioprojectatomicpodman.VarlinkCall, config io
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- br := ioprojectatomicpodman.BuildResponse{
+ br := iopodman.BuildResponse{
Logs: log,
Id: newImage.ID(),
}
@@ -259,13 +259,13 @@ func build(runtime *libpod.Runtime, options imagebuildah.BuildOptions, dockerfil
// CreateImage ...
// TODO With Pull being added, should we skip Create?
-func (i *LibpodAPI) CreateImage(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) CreateImage(call iopodman.VarlinkCall) error {
return call.ReplyMethodNotImplemented("CreateImage")
}
// InspectImage returns an image's inspect information as a string that can be serialized.
// Requires an image ID or name
-func (i *LibpodAPI) InspectImage(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) InspectImage(call iopodman.VarlinkCall, name string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyImageNotFound(name)
@@ -280,7 +280,7 @@ func (i *LibpodAPI) InspectImage(call ioprojectatomicpodman.VarlinkCall, name st
// HistoryImage returns the history of the image's layers
// Requires an image or name
-func (i *LibpodAPI) HistoryImage(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) HistoryImage(call iopodman.VarlinkCall, name string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyImageNotFound(name)
@@ -289,9 +289,9 @@ func (i *LibpodAPI) HistoryImage(call ioprojectatomicpodman.VarlinkCall, name st
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- var histories []ioprojectatomicpodman.ImageHistory
+ var histories []iopodman.ImageHistory
for _, hist := range history {
- imageHistory := ioprojectatomicpodman.ImageHistory{
+ imageHistory := iopodman.ImageHistory{
Id: hist.ID,
Created: hist.Created.String(),
CreatedBy: hist.CreatedBy,
@@ -306,7 +306,7 @@ func (i *LibpodAPI) HistoryImage(call ioprojectatomicpodman.VarlinkCall, name st
// PushImage pushes an local image to registry
// TODO We need to add options for signing, credentials, tls, and multi-tag
-func (i *LibpodAPI) PushImage(call ioprojectatomicpodman.VarlinkCall, name, tag string, tlsVerify bool) error {
+func (i *LibpodAPI) PushImage(call iopodman.VarlinkCall, name, tag string, tlsVerify bool) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyImageNotFound(err.Error())
@@ -329,7 +329,7 @@ func (i *LibpodAPI) PushImage(call ioprojectatomicpodman.VarlinkCall, name, tag
}
// TagImage accepts an image name and tag as strings and tags an image in the local store.
-func (i *LibpodAPI) TagImage(call ioprojectatomicpodman.VarlinkCall, name, tag string) error {
+func (i *LibpodAPI) TagImage(call iopodman.VarlinkCall, name, tag string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyImageNotFound(name)
@@ -342,7 +342,7 @@ func (i *LibpodAPI) TagImage(call ioprojectatomicpodman.VarlinkCall, name, tag s
// RemoveImage accepts a image name or ID as a string and force bool to determine if it should
// remove the image even if being used by stopped containers
-func (i *LibpodAPI) RemoveImage(call ioprojectatomicpodman.VarlinkCall, name string, force bool) error {
+func (i *LibpodAPI) RemoveImage(call iopodman.VarlinkCall, name string, force bool) error {
ctx := getContext()
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
@@ -357,20 +357,20 @@ func (i *LibpodAPI) RemoveImage(call ioprojectatomicpodman.VarlinkCall, name str
// SearchImage searches all registries configured in /etc/containers/registries.conf for an image
// Requires an image name and a search limit as int
-func (i *LibpodAPI) SearchImage(call ioprojectatomicpodman.VarlinkCall, name string, limit int64) error {
+func (i *LibpodAPI) SearchImage(call iopodman.VarlinkCall, name string, limit int64) error {
sc := image.GetSystemContext("", "", false)
registries, err := sysreg.GetRegistries()
if err != nil {
return call.ReplyErrorOccurred(fmt.Sprintf("unable to get system registries: %q", err))
}
- var imageResults []ioprojectatomicpodman.ImageSearch
+ var imageResults []iopodman.ImageSearch
for _, reg := range registries {
results, err := docker.SearchRegistry(getContext(), sc, reg, name, int(limit))
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
for _, result := range results {
- i := ioprojectatomicpodman.ImageSearch{
+ i := iopodman.ImageSearch{
Description: result.Description,
Is_official: result.IsOfficial,
Is_automated: result.IsAutomated,
@@ -385,7 +385,7 @@ func (i *LibpodAPI) SearchImage(call ioprojectatomicpodman.VarlinkCall, name str
// DeleteUnusedImages deletes any images that do not have containers associated with it.
// TODO Filters are not implemented
-func (i *LibpodAPI) DeleteUnusedImages(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) DeleteUnusedImages(call iopodman.VarlinkCall) error {
images, err := i.Runtime.ImageRuntime().GetImages()
if err != nil {
return call.ReplyErrorOccurred(err.Error())
@@ -407,7 +407,7 @@ func (i *LibpodAPI) DeleteUnusedImages(call ioprojectatomicpodman.VarlinkCall) e
}
// Commit ...
-func (i *LibpodAPI) Commit(call ioprojectatomicpodman.VarlinkCall, name, imageName string, changes []string, author, message string, pause bool) error {
+func (i *LibpodAPI) Commit(call iopodman.VarlinkCall, name, imageName string, changes []string, author, message string, pause bool) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name)
@@ -435,7 +435,7 @@ func (i *LibpodAPI) Commit(call ioprojectatomicpodman.VarlinkCall, name, imageNa
}
// ImportImage imports an image from a tarball to the image store
-func (i *LibpodAPI) ImportImage(call ioprojectatomicpodman.VarlinkCall, source, reference, message string, changes []string) error {
+func (i *LibpodAPI) ImportImage(call iopodman.VarlinkCall, source, reference, message string, changes []string) error {
configChanges, err := util.GetImageConfig(changes)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
@@ -456,7 +456,7 @@ func (i *LibpodAPI) ImportImage(call ioprojectatomicpodman.VarlinkCall, source,
// ExportImage exports an image to the provided destination
// destination must have the transport type!!
-func (i *LibpodAPI) ExportImage(call ioprojectatomicpodman.VarlinkCall, name, destination string, compress bool, tags []string) error {
+func (i *LibpodAPI) ExportImage(call iopodman.VarlinkCall, name, destination string, compress bool, tags []string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
return call.ReplyImageNotFound(name)
@@ -475,7 +475,7 @@ func (i *LibpodAPI) ExportImage(call ioprojectatomicpodman.VarlinkCall, name, de
// PullImage pulls an image from a registry to the image store.
// TODO This implementation is incomplete
-func (i *LibpodAPI) PullImage(call ioprojectatomicpodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) PullImage(call iopodman.VarlinkCall, name string) error {
newImage, err := i.Runtime.ImageRuntime().New(getContext(), name, "", "", nil, &image.DockerRegistryOptions{}, image.SigningOptions{}, true, false)
if err != nil {
return call.ReplyErrorOccurred(fmt.Sprintf("unable to pull %s: %s", name, err.Error()))
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go
index 747a25966..042aef942 100644
--- a/pkg/varlinkapi/system.go
+++ b/pkg/varlinkapi/system.go
@@ -9,13 +9,13 @@ import (
)
// GetVersion ...
-func (i *LibpodAPI) GetVersion(call ioprojectatomicpodman.VarlinkCall) error {
+func (i *LibpodAPI) GetVersion(call iopodman.VarlinkCall) error {
versionInfo, err := libpod.GetVersion()
if err != nil {
return err
}
- return call.ReplyGetVersion(ioprojectatomicpodman.Version{
+ return call.ReplyGetVersion(iopodman.Version{
Version: versionInfo.Version,
Go_version: versionInfo.GoVersion,
Git_commit: versionInfo.GitCommit,
@@ -26,21 +26,21 @@ func (i *LibpodAPI) GetVersion(call ioprojectatomicpodman.VarlinkCall) error {
// 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{
+func (i *LibpodAPI) Ping(call iopodman.VarlinkCall) error {
+ return call.ReplyPing(iopodman.StringResponse{
Message: "OK",
})
}
// GetInfo returns details about the podman host and its stores
-func (i *LibpodAPI) GetInfo(call ioprojectatomicpodman.VarlinkCall) error {
- podmanInfo := ioprojectatomicpodman.PodmanInfo{}
+func (i *LibpodAPI) GetInfo(call iopodman.VarlinkCall) error {
+ podmanInfo := iopodman.PodmanInfo{}
info, err := i.Runtime.Info()
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
host := info[0].Data
- infoHost := ioprojectatomicpodman.InfoHost{
+ infoHost := iopodman.InfoHost{
Mem_free: host["MemFree"].(int64),
Mem_total: host["MemTotal"].(int64),
Swap_free: host["SwapFree"].(int64),
@@ -53,7 +53,7 @@ func (i *LibpodAPI) GetInfo(call ioprojectatomicpodman.VarlinkCall) error {
}
podmanInfo.Host = infoHost
store := info[1].Data
- pmaninfo := ioprojectatomicpodman.InfoPodmanBinary{
+ pmaninfo := iopodman.InfoPodmanBinary{
Compiler: goruntime.Compiler,
Go_version: goruntime.Version(),
// TODO : How are we going to get this here?
@@ -61,12 +61,12 @@ func (i *LibpodAPI) GetInfo(call ioprojectatomicpodman.VarlinkCall) error {
Git_commit: libpod.GitCommit,
}
- graphStatus := ioprojectatomicpodman.InfoGraphStatus{
+ graphStatus := iopodman.InfoGraphStatus{
Backing_filesystem: store["GraphStatus"].(map[string]string)["Backing Filesystem"],
Native_overlay_diff: store["GraphStatus"].(map[string]string)["Native Overlay Diff"],
Supports_d_type: store["GraphStatus"].(map[string]string)["Supports d_type"],
}
- infoStore := ioprojectatomicpodman.InfoStore{
+ infoStore := iopodman.InfoStore{
Graph_driver_name: store["GraphDriverName"].(string),
Containers: int64(store["ContainerStore"].(map[string]interface{})["number"].(int)),
Images: int64(store["ImageStore"].(map[string]interface{})["number"].(int)),
diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go
index ad5c8c19d..667c09562 100644
--- a/pkg/varlinkapi/util.go
+++ b/pkg/varlinkapi/util.go
@@ -15,15 +15,15 @@ func getContext() context.Context {
return context.TODO()
}
-func makeListContainer(containerID string, batchInfo batchcontainer.BatchContainerStruct) ioprojectatomicpodman.ListContainerData {
+func makeListContainer(containerID string, batchInfo batchcontainer.BatchContainerStruct) iopodman.ListContainerData {
var (
- mounts []ioprojectatomicpodman.ContainerMount
- ports []ioprojectatomicpodman.ContainerPortMappings
+ mounts []iopodman.ContainerMount
+ ports []iopodman.ContainerPortMappings
)
ns := batchcontainer.GetNamespaces(batchInfo.Pid)
for _, mount := range batchInfo.ConConfig.Spec.Mounts {
- m := ioprojectatomicpodman.ContainerMount{
+ m := iopodman.ContainerMount{
Destination: mount.Destination,
Type: mount.Type,
Source: mount.Source,
@@ -33,7 +33,7 @@ func makeListContainer(containerID string, batchInfo batchcontainer.BatchContain
}
for _, pm := range batchInfo.ConConfig.PortMappings {
- p := ioprojectatomicpodman.ContainerPortMappings{
+ p := iopodman.ContainerPortMappings{
Host_port: strconv.Itoa(int(pm.HostPort)),
Host_ip: pm.HostIP,
Protocol: pm.Protocol,
@@ -45,7 +45,7 @@ func makeListContainer(containerID string, batchInfo batchcontainer.BatchContain
// If we find this needs to be done for other container endpoints, we should
// convert this to a separate function or a generic map from struct function.
- namespace := ioprojectatomicpodman.ContainerNameSpace{
+ namespace := iopodman.ContainerNameSpace{
User: ns.User,
Uts: ns.UTS,
Pidns: ns.PIDNS,
@@ -56,7 +56,7 @@ func makeListContainer(containerID string, batchInfo batchcontainer.BatchContain
Ipc: ns.IPC,
}
- lc := ioprojectatomicpodman.ListContainerData{
+ lc := iopodman.ListContainerData{
Id: containerID,
Image: batchInfo.ConConfig.RootfsImageName,
Imageid: batchInfo.ConConfig.RootfsImageID,