1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #26960 from allencloud/make-remove-cloudprovider-network-return-204

make remove cloudprovider network return 204
This commit is contained in:
Brian Goff 2016-10-03 14:46:11 -04:00 committed by GitHub
commit 8b416fb025
3 changed files with 11 additions and 3 deletions

View file

@ -139,7 +139,11 @@ func (n *networkRouter) deleteNetwork(ctx context.Context, w http.ResponseWriter
return err
}
if _, err := n.clusterProvider.GetNetwork(vars["id"]); err == nil {
return n.clusterProvider.RemoveNetwork(vars["id"])
if err = n.clusterProvider.RemoveNetwork(vars["id"]); err != nil {
return err
}
w.WriteHeader(http.StatusNoContent)
return nil
}
if err := n.backend.DeleteNetwork(vars["id"]); err != nil {
return err

View file

@ -4672,7 +4672,9 @@ Stop and remove the service `id`
**Example response**:
HTTP/1.1 200 No Content
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: text/plain; charset=utf-8
**Status codes**:

View file

@ -5040,7 +5040,9 @@ Stop and remove the service `id`
**Example response**:
HTTP/1.1 200 No Content
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: text/plain; charset=utf-8
**Status codes**: