mirror of
https://github.com/containers/podman.git
synced 2025-07-04 01:48:28 +08:00
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:
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
|
||||||
|
Reference in New Issue
Block a user