Rename "v" in "removeVolume"

Upstream-commit: 0c6380cc3237ac9eb1947223479ee13253d04287
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-05-09 19:19:55 -07:00
parent ad97f9e37e
commit fe9bc15b8d
2 changed files with 4 additions and 4 deletions

View File

@ -411,9 +411,9 @@ func deleteContainers(srv *Server, w http.ResponseWriter, r *http.Request, vars
return nil, fmt.Errorf("Missing parameter")
}
name := vars["name"]
v := r.Form.Get("v") == "1"
removeVolume := r.Form.Get("removeVolume") == "1"
if err := srv.ContainerDestroy(name, v); err != nil {
if err := srv.ContainerDestroy(name, removeVolume); err != nil {
return nil, err
}
w.WriteHeader(http.StatusNoContent)

View File

@ -413,7 +413,7 @@ func (srv *Server) ContainerRestart(name string, t int) error {
return nil
}
func (srv *Server) ContainerDestroy(name string, v bool) error {
func (srv *Server) ContainerDestroy(name string, removeVolume bool) error {
if container := srv.runtime.Get(name); container != nil {
volumes := make(map[string]struct{})
@ -425,7 +425,7 @@ func (srv *Server) ContainerDestroy(name string, v bool) error {
return fmt.Errorf("Error destroying container %s: %s", name, err.Error())
}
if v {
if removeVolume {
// Retrieve all volumes from all remaining containers
usedVolumes := make(map[string]*Container)
for _, container := range srv.runtime.List() {