... | ... |
@@ -411,9 +411,9 @@ func deleteContainers(srv *Server, w http.ResponseWriter, r *http.Request, vars |
411 | 411 |
return nil, fmt.Errorf("Missing parameter") |
412 | 412 |
} |
413 | 413 |
name := vars["name"] |
414 |
- v := r.Form.Get("v") == "1" |
|
414 |
+ removeVolume := r.Form.Get("removeVolume") == "1" |
|
415 | 415 |
|
416 |
- if err := srv.ContainerDestroy(name, v); err != nil { |
|
416 |
+ if err := srv.ContainerDestroy(name, removeVolume); err != nil { |
|
417 | 417 |
return nil, err |
418 | 418 |
} |
419 | 419 |
w.WriteHeader(http.StatusNoContent) |
... | ... |
@@ -413,7 +413,7 @@ func (srv *Server) ContainerRestart(name string, t int) error { |
413 | 413 |
return nil |
414 | 414 |
} |
415 | 415 |
|
416 |
-func (srv *Server) ContainerDestroy(name string, v bool) error { |
|
416 |
+func (srv *Server) ContainerDestroy(name string, removeVolume bool) error { |
|
417 | 417 |
|
418 | 418 |
if container := srv.runtime.Get(name); container != nil { |
419 | 419 |
volumes := make(map[string]struct{}) |
... | ... |
@@ -425,7 +425,7 @@ func (srv *Server) ContainerDestroy(name string, v bool) error { |
425 | 425 |
return fmt.Errorf("Error destroying container %s: %s", name, err.Error()) |
426 | 426 |
} |
427 | 427 |
|
428 |
- if v { |
|
428 |
+ if removeVolume { |
|
429 | 429 |
// Retrieve all volumes from all remaining containers |
430 | 430 |
usedVolumes := make(map[string]*Container) |
431 | 431 |
for _, container := range srv.runtime.List() { |