summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-10-21 14:48:29 -0500
committerbaude <bbaude@redhat.com>2020-10-21 14:48:29 -0500
commitcf227cc7f27b9db1cedc46772677d8ca6acdc5b8 (patch)
tree5af1dfc21a5c0cc19492bc31345cdbbb3f67d2ca /pkg/api/handlers/compat
parent61b276a05c1c8adc51c6d4f7c061b89ce39a803b (diff)
downloadpodman-cf227cc7f27b9db1cedc46772677d8ca6acdc5b8.tar.gz
podman-cf227cc7f27b9db1cedc46772677d8ca6acdc5b8.tar.bz2
podman-cf227cc7f27b9db1cedc46772677d8ca6acdc5b8.zip
set compat network driver default
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 <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/networks.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go
index a46784a6c..629ca565e 100644
--- a/pkg/api/handlers/compat/networks.go
+++ b/pkg/api/handlers/compat/networks.go
@@ -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 {