ipam/host-local: support sets of disjoint ranges

In real-world address allocations, disjoint address ranges are common.
Therefore, the host-local allocator should support them.

This change still allows for multiple IPs in a single configuration, but
also allows for a "set of subnets."

Fixes: #45
This commit is contained in:
Casey Callendrello
2017-07-31 14:38:11 +02:00
parent 20bc33abc5
commit 27d027a6d3
13 changed files with 784 additions and 518 deletions

View File

@ -94,14 +94,14 @@ const (
rangesStartStr = `,
"ranges": [`
rangeSubnetConfStr = `
{
[{
"subnet": "%s"
}`
}]`
rangeSubnetGWConfStr = `
{
[{
"subnet": "%s",
"gateway": "%s"
}`
}]`
rangesEndStr = `
]`