Browse Source

Merge pull request #1785 from abhinandanpb/master

Removing the override for ipamdriver for local scope networks in
Madhu Venugopal 8 years ago
parent
commit
7d9c6e89f8
2 changed files with 3 additions and 1 deletions
  1. 0 1
      libnetwork/controller.go
  2. 3 0
      libnetwork/network.go

+ 0 - 1
libnetwork/controller.go

@@ -738,7 +738,6 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ...
 	if network.configOnly {
 		network.scope = datastore.LocalScope
 		network.networkType = "null"
-		network.ipamType = ""
 		goto addToStore
 	}
 

+ 3 - 0
libnetwork/network.go

@@ -412,6 +412,9 @@ func (n *network) applyConfigurationTo(to *network) error {
 			}
 		}
 	}
+	if len(n.ipamType) != 0 {
+		to.ipamType = n.ipamType
+	}
 	if len(n.ipamOptions) > 0 {
 		to.ipamOptions = make(map[string]string, len(n.ipamOptions))
 		for k, v := range n.ipamOptions {