Change ipam Universe from Range to CIDR

There was no code to initialize it as anything else, and this lets us
bake in an assumption that it will always be a CIDR.
This commit is contained in:
Martynas Pumputis authored and Bryan Boreham committed 2016-06-01 17:06:31 +01:00
1 parent dbc8b4fe1a
commit f50fbc002e
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ func (g *allocate) Try(alloc *Allocator) bool {
return true
}
if !alloc.universe.Overlaps(g.r.Range()) {
if !alloc.universe.Range().Overlaps(g.r.Range()) {
g.resultChan <- allocateResult{err: fmt.Errorf("range %s out of bounds: %s", g.r, alloc.universe)}
return true
}