From b0089e48272f18d856ba147b393371c18d5683fb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 25 Jul 2016 12:04:55 +0200 Subject: [PATCH] Add new error to API docs Commit cc493a52a46271df82dbebea26038502b85788b9 added a constraint to network connect/disconnect operations on "Swarm scoped" networks. This adds those errors to the API documentation. Also changes the error to lowercase for consistency. Signed-off-by: Sebastiaan van Stijn --- api/server/router/network/network_routes.go | 4 ++-- docs/reference/api/docker_remote_api_v1.24.md | 2 ++ docs/reference/api/docker_remote_api_v1.25.md | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/server/router/network/network_routes.go b/api/server/router/network/network_routes.go index 0949a50d9c..c38ba3d7f4 100644 --- a/api/server/router/network/network_routes.go +++ b/api/server/router/network/network_routes.go @@ -121,7 +121,7 @@ func (n *networkRouter) postNetworkConnect(ctx context.Context, w http.ResponseW } if nw.Info().Dynamic() { - return newNetworkForbiddenError("Operation not supported for swarm scoped networks") + return newNetworkForbiddenError("operation not supported for swarm scoped networks") } return n.backend.ConnectContainerToNetwork(connect.Container, nw.Name(), connect.EndpointConfig) @@ -147,7 +147,7 @@ func (n *networkRouter) postNetworkDisconnect(ctx context.Context, w http.Respon } if nw.Info().Dynamic() { - return newNetworkForbiddenError("Operation not supported for swarm scoped networks") + return newNetworkForbiddenError("operation not supported for swarm scoped networks") } return n.backend.DisconnectContainerFromNetwork(disconnect.Container, nw, disconnect.Force) diff --git a/docs/reference/api/docker_remote_api_v1.24.md b/docs/reference/api/docker_remote_api_v1.24.md index 7267f2da0d..453f5ac7f1 100644 --- a/docs/reference/api/docker_remote_api_v1.24.md +++ b/docs/reference/api/docker_remote_api_v1.24.md @@ -3259,6 +3259,7 @@ Content-Type: application/json **Status codes**: - **200** - no error +- **403** - operation not supported for swarm scoped networks - **404** - network or container is not found - **500** - Internal Server Error @@ -3291,6 +3292,7 @@ Content-Type: application/json **Status codes**: - **200** - no error +- **403** - operation not supported for swarm scoped networks - **404** - network or container not found - **500** - Internal Server Error diff --git a/docs/reference/api/docker_remote_api_v1.25.md b/docs/reference/api/docker_remote_api_v1.25.md index 04a5d0c416..b2030ef77c 100644 --- a/docs/reference/api/docker_remote_api_v1.25.md +++ b/docs/reference/api/docker_remote_api_v1.25.md @@ -3260,6 +3260,7 @@ Content-Type: application/json **Status codes**: - **200** - no error +- **403** - operation not supported for swarm scoped networks - **404** - network or container is not found - **500** - Internal Server Error @@ -3292,6 +3293,7 @@ Content-Type: application/json **Status codes**: - **200** - no error +- **403** - operation not supported for swarm scoped networks - **404** - network or container not found - **500** - Internal Server Error