Windows: integration-cli don't delete nat

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d6ab2ad36d8c184bd7ea140df8b4894eff42b02d
Component: engine
This commit is contained in:
John Howard
2016-04-05 19:29:43 -07:00
parent 5c35f01162
commit c818e1117c

View File

@ -283,6 +283,10 @@ func deleteAllNetworks() error {
if n.Name == "bridge" || n.Name == "none" || n.Name == "host" {
continue
}
if daemonPlatform == "windows" && strings.ToLower(n.Name) == "nat" {
// nat is a pre-defined network on Windows and cannot be removed
continue
}
status, b, err := sockRequest("DELETE", "/networks/"+n.Name, nil)
if err != nil {
errors = append(errors, err.Error())