summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorLars Karlitski <lars@karlitski.net>2019-02-04 20:08:34 +0100
committerLars Karlitski <lars@karlitski.net>2019-02-12 14:48:19 +0100
commit5a325181709041ec01a4e60ed039bbd8cb7a20db (patch)
tree12b0640763b42ba1a1c4a1ca568b0cfff6b61e96 /pkg/varlinkapi
parent8a51b11058d4e5581d53177a1cee5e05aac57500 (diff)
downloadpodman-5a325181709041ec01a4e60ed039bbd8cb7a20db.tar.gz
podman-5a325181709041ec01a4e60ed039bbd8cb7a20db.tar.bz2
podman-5a325181709041ec01a4e60ed039bbd8cb7a20db.zip
varlink: Rename `ContainerInList` to `Container`
Container more clearly describes what the type represents. Signed-off-by: Lars Karlitski <lars@karlitski.net>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/containers.go8
-rw-r--r--pkg/varlinkapi/util.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 3af41ab66..2b2832838 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -21,7 +21,7 @@ import (
// ListContainers ...
func (i *LibpodAPI) ListContainers(call iopodman.VarlinkCall) error {
var (
- listContainers []iopodman.ListContainerData
+ listContainers []iopodman.Container
)
containers, err := i.Runtime.GetAllContainers()
@@ -44,10 +44,10 @@ func (i *LibpodAPI) ListContainers(call iopodman.VarlinkCall) error {
}
// GetContainer ...
-func (i *LibpodAPI) GetContainer(call iopodman.VarlinkCall, name string) error {
- ctr, err := i.Runtime.LookupContainer(name)
+func (i *LibpodAPI) GetContainer(call iopodman.VarlinkCall, id string) error {
+ ctr, err := i.Runtime.LookupContainer(id)
if err != nil {
- return call.ReplyContainerNotFound(name)
+ return call.ReplyContainerNotFound(id)
}
opts := shared.PsOptions{
Namespace: true,
diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go
index 51891e729..7f6f95d3b 100644
--- a/pkg/varlinkapi/util.go
+++ b/pkg/varlinkapi/util.go
@@ -15,7 +15,7 @@ func getContext() context.Context {
return context.TODO()
}
-func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct) iopodman.ListContainerData {
+func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct) iopodman.Container {
var (
mounts []iopodman.ContainerMount
ports []iopodman.ContainerPortMappings
@@ -56,7 +56,7 @@ func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct
Ipc: ns.IPC,
}
- lc := iopodman.ListContainerData{
+ lc := iopodman.Container{
Id: containerID,
Image: batchInfo.ConConfig.RootfsImageName,
Imageid: batchInfo.ConConfig.RootfsImageID,