Skip to content

Commit

Permalink
set compat network driver default
Browse files Browse the repository at this point in the history
when using the compatibility endpoint for creating a network, if the driver is not provided, we need to set it to the default network driver ... which is bridge.

Signed-off-by: baude <[email protected]>
  • Loading branch information
baude committed Oct 21, 2020
1 parent 61b276a commit cf227cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api/handlers/compat/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
if len(networkCreate.Name) > 0 {
name = networkCreate.Name
}
if len(networkCreate.Driver) < 1 {
networkCreate.Driver = network.DefaultNetworkDriver
}
// At present I think we should just support the bridge driver
// and allow demand to make us consider more
if networkCreate.Driver != network.DefaultNetworkDriver {
Expand Down

0 comments on commit cf227cc

Please sign in to comment.