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 <github@gone.nl> Upstream-commit: b0089e48272f18d856ba147b393371c18d5683fb Component: engine
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user