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:
commit
8b416fb025
3 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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**:
|
||||
|
||||
|
|
|
@ -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**:
|
||||
|
||||
|
|
Loading…
Reference in a new issue