mirror of https://github.com/containers/podman.git
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
This commit is contained in:
parent
c339c5bb6e
commit
9657cd6c15
1
API.md
1
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 UpdateContainer() NotImplemented](#UpdateContainer)
|
||||||
|
|
||||||
[func WaitContainer(name: string) int](#WaitContainer)
|
[func WaitContainer(name: string) int](#WaitContainer)
|
||||||
|
|
||||||
[type ContainerChanges](#ContainerChanges)
|
[type ContainerChanges](#ContainerChanges)
|
||||||
|
|
||||||
[type ContainerMount](#ContainerMount)
|
[type ContainerMount](#ContainerMount)
|
||||||
|
|
|
@ -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(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 {
|
for _, t := range types {
|
||||||
b.WriteString(fmt.Sprintf("[type %s](#%s)\n\n", t.Name, t.Name))
|
b.WriteString(fmt.Sprintf("[type %s](#%s)\n\n", t.Name, t.Name))
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,10 +170,11 @@ func (i *LibpodAPI) RemoveImage(call ioprojectatomicpodman.VarlinkCall, name str
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return call.ReplyImageNotFound(name)
|
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.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
|
// SearchImage searches all registries configured in /etc/containers/registries.conf for an image
|
||||||
|
|
Loading…
Reference in New Issue