diff options
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/containers.go | 15 | ||||
-rw-r--r-- | pkg/varlinkapi/images.go | 6 |
2 files changed, 14 insertions, 7 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go index 79eea4aa7..9468719fc 100644 --- a/pkg/varlinkapi/containers.go +++ b/pkg/varlinkapi/containers.go @@ -9,6 +9,7 @@ import ( "syscall" "time" + "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" "github.com/projectatomic/libpod/cmd/podman/batchcontainer" "github.com/projectatomic/libpod/cmd/podman/libpodruntime" @@ -195,12 +196,18 @@ func (i *LibpodAPI) ListContainerChanges(call ioprojectatomicpodman.VarlinkCall, if err != nil { return call.ReplyErrorOccurred(err.Error()) } - - m := make(map[string]string) + result := ioprojectatomicpodman.ContainerChanges{} for _, change := range changes { - m[change.Path] = change.Kind.String() + switch change.Kind { + case archive.ChangeModify: + result.Changed = append(result.Changed, change.Path) + case archive.ChangeDelete: + result.Deleted = append(result.Deleted, change.Path) + case archive.ChangeAdd: + result.Added = append(result.Added, change.Path) + } } - return call.ReplyListContainerChanges(m) + return call.ReplyListContainerChanges(result) } // ExportContainer ... diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index e2a9c4d5b..16bc46107 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -140,7 +140,7 @@ func (i *LibpodAPI) PushImage(call ioprojectatomicpodman.VarlinkCall, name, tag if err := newImage.PushImage(getContext(), destname, "", "", "", nil, false, so, &dockerRegistryOptions); err != nil { return call.ReplyErrorOccurred(err.Error()) } - return call.ReplyPushImage() + return call.ReplyPushImage(newImage.ID()) } // TagImage accepts an image name and tag as strings and tags an image in the local store. @@ -156,7 +156,7 @@ func (i *LibpodAPI) TagImage(call ioprojectatomicpodman.VarlinkCall, name, tag s if err := newImage.TagImage(tag); err != nil { return call.ReplyErrorOccurred(err.Error()) } - return call.ReplyTagImage() + return call.ReplyTagImage(newImage.ID()) } // RemoveImage accepts a image name or ID as a string and force bool to determine if it should @@ -275,7 +275,7 @@ func (i *LibpodAPI) ExportImage(call ioprojectatomicpodman.VarlinkCall, name, de if err := newImage.PushImage(getContext(), destination, "", "", "", nil, compress, image.SigningOptions{}, &image.DockerRegistryOptions{}); err != nil { return call.ReplyErrorOccurred(err.Error()) } - return call.ReplyExportImage() + return call.ReplyExportImage(newImage.ID()) } // PullImage pulls an image from a registry to the image store. |