mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add new error to API docs
Commit cc493a52a4
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>
This commit is contained in:
parent
3056e4884e
commit
b0089e4827
3 changed files with 6 additions and 2 deletions
|
@ -121,7 +121,7 @@ func (n *networkRouter) postNetworkConnect(ctx context.Context, w http.ResponseW
|
||||||
}
|
}
|
||||||
|
|
||||||
if nw.Info().Dynamic() {
|
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)
|
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() {
|
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)
|
return n.backend.DisconnectContainerFromNetwork(disconnect.Container, nw, disconnect.Force)
|
||||||
|
|
|
@ -3259,6 +3259,7 @@ Content-Type: application/json
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
||||||
- **200** - no error
|
- **200** - no error
|
||||||
|
- **403** - operation not supported for swarm scoped networks
|
||||||
- **404** - network or container is not found
|
- **404** - network or container is not found
|
||||||
- **500** - Internal Server Error
|
- **500** - Internal Server Error
|
||||||
|
|
||||||
|
@ -3291,6 +3292,7 @@ Content-Type: application/json
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
||||||
- **200** - no error
|
- **200** - no error
|
||||||
|
- **403** - operation not supported for swarm scoped networks
|
||||||
- **404** - network or container not found
|
- **404** - network or container not found
|
||||||
- **500** - Internal Server Error
|
- **500** - Internal Server Error
|
||||||
|
|
||||||
|
|
|
@ -3260,6 +3260,7 @@ Content-Type: application/json
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
||||||
- **200** - no error
|
- **200** - no error
|
||||||
|
- **403** - operation not supported for swarm scoped networks
|
||||||
- **404** - network or container is not found
|
- **404** - network or container is not found
|
||||||
- **500** - Internal Server Error
|
- **500** - Internal Server Error
|
||||||
|
|
||||||
|
@ -3292,6 +3293,7 @@ Content-Type: application/json
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
||||||
- **200** - no error
|
- **200** - no error
|
||||||
|
- **403** - operation not supported for swarm scoped networks
|
||||||
- **404** - network or container not found
|
- **404** - network or container not found
|
||||||
- **500** - Internal Server Error
|
- **500** - Internal Server Error
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue