ipam/host-local: support multiple IP ranges

This change allows the host-local allocator to allocate multiple IPs.
This is intended to enable dual-stack, but is not limited to only two
subnets or separate address families.
This commit is contained in:
Casey Callendrello
2017-05-11 17:01:20 +02:00
parent 7cda9af13f
commit 2e9e87732f
13 changed files with 1454 additions and 484 deletions

View File

@ -20,8 +20,8 @@ type Store interface {
Lock() error
Unlock() error
Close() error
Reserve(id string, ip net.IP) (bool, error)
LastReservedIP() (net.IP, error)
Reserve(id string, ip net.IP, rangeID string) (bool, error)
LastReservedIP(rangeID string) (net.IP, error)
Release(ip net.IP) error
ReleaseByID(id string) error
}