Skip to content

Commit a26c953

Browse files
committed
Add comment explaining network-create flow for Swarm
Signed-off-by: Rob Murray <rob.murray@docker.com>
1 parent 571af91 commit a26c953

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/server/router/network/network_routes.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr
213213
return libnetwork.NetworkNameError(create.Name)
214214
}
215215

216+
// For a Swarm-scoped network, this call to backend.CreateNetwork is used to
217+
// validate the configuration. The network will not be created but, if the
218+
// configuration is valid, ManagerRedirectError will be returned and handled
219+
// below.
216220
nw, err := n.backend.CreateNetwork(create)
217221
if err != nil {
218222
if _, ok := err.(libnetwork.ManagerRedirectError); !ok {

0 commit comments

Comments
 (0)