1
0
Fork 0
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:
Alessandro Boch 2016-01-21 14:24:35 -08:00
parent 15cc67b73d
commit cfa515fd9d
4 changed files with 51 additions and 0 deletions

View file

@ -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,
})
)