summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-05-11 09:39:34 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-11 16:05:10 +0000
commit9657cd6c15372f8c655ec13ce4f0310ff5d6a7a1 (patch)
tree6aae448f8c409e8b55a7343dbbdc2bb2464a6c0d
parentc339c5bb6e1d3d894d8020dc63ae8cf3c2f50e56 (diff)
downloadpodman-9657cd6c15372f8c655ec13ce4f0310ff5d6a7a1.tar.gz
podman-9657cd6c15372f8c655ec13ce4f0310ff5d6a7a1.tar.bz2
podman-9657cd6c15372f8c655ec13ce4f0310ff5d6a7a1.zip
Fix varlink remove image force
Fixes a bug where the force bool was being ignored when deleting images via the varlink interface. Also, minor fix to the docs to add a line break between methods and types in the doc index. Signed-off-by: baude <bbaude@redhat.com> Closes: #753 Approved by: rhatdan
-rwxr-xr-xAPI.md1
-rw-r--r--docs/varlink/apidoc.go1
-rw-r--r--pkg/varlinkapi/images.go5
3 files changed, 5 insertions, 2 deletions
diff --git a/API.md b/API.md
index 2c4d40022..c9d2d5c23 100755
--- a/API.md
+++ b/API.md
@@ -80,6 +80,7 @@ in the [API.md](https://github.com/projectatomic/libpod/blob/master/API.md) file
[func UpdateContainer() NotImplemented](#UpdateContainer)
[func WaitContainer(name: string) int](#WaitContainer)
+
[type ContainerChanges](#ContainerChanges)
[type ContainerMount](#ContainerMount)
diff --git a/docs/varlink/apidoc.go b/docs/varlink/apidoc.go
index 9cb190c33..7f1d60bc8 100644
--- a/docs/varlink/apidoc.go
+++ b/docs/varlink/apidoc.go
@@ -184,6 +184,7 @@ func generateIndex(methods []funcDescriber, types []typeDescriber, errors []err,
}
b.WriteString(fmt.Sprintf("\n[func %s(%s) %s](#%s)\n", method.Name, strings.Join(inArgs, ", "), strings.Join(outArgs, ", "), method.Name))
}
+ b.WriteString("\n")
for _, t := range types {
b.WriteString(fmt.Sprintf("[type %s](#%s)\n\n", t.Name, t.Name))
}
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 981a4d9a0..dc246fd7a 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -170,10 +170,11 @@ func (i *LibpodAPI) RemoveImage(call ioprojectatomicpodman.VarlinkCall, name str
if err != nil {
return call.ReplyImageNotFound(name)
}
- if err := newImage.Remove(force); err != nil {
+ imageID, err := runtime.RemoveImage(newImage, force)
+ if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- return call.ReplyRemoveImage(newImage.ID())
+ return call.ReplyRemoveImage(imageID)
}
// SearchImage searches all registries configured in /etc/containers/registries.conf for an image