mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Reject multiple networks on container creation
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
15cc67b73d
commit
cfa515fd9d
4 changed files with 51 additions and 0 deletions
|
@ -966,4 +966,13 @@ var (
|
|||
Description: "Engine's predefined networks cannot be deleted",
|
||||
HTTPStatusCode: http.StatusForbidden,
|
||||
})
|
||||
|
||||
// ErrorCodeMultipleNetworkConnect is generated when more than one network is passed
|
||||
// when creating a container
|
||||
ErrorCodeMultipleNetworkConnect = errcode.Register(errGroup, errcode.ErrorDescriptor{
|
||||
Value: "CANNOT_CONNECT_TO_MULTIPLE_NETWORKS",
|
||||
Message: "Container cannot be connected to %s",
|
||||
Description: "A container can only be connected to one network at the time",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
})
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue