Rationalize ipam arguments
- rename -defaultsubnet to -ipsubnet - default subnet defaults to whole -iprange - parse and check inside ipam package - removes some error cases
This commit is contained in:
1 parent
f956a76455
commit
3a9af4413d
6 files changed
+67
-77
No files matched your search
@@ -134,13 +134,11 @@ func makeAllocator(name string, cidrStr string, quorum uint) *Allocator {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
_, cidr, err := address.ParseCIDR(cidrStr)
|
||||
alloc, err := NewAllocator(peername, router.PeerUID(rand.Int63()),
|
||||
"nick-"+name, cidrStr, quorum)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
alloc := NewAllocator(peername, router.PeerUID(rand.Int63()),
|
||||
"nick-"+name, cidr, quorum)
|
||||
alloc.defaultSubnet = cidr
|
||||
|
||||
return alloc
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user