ipam/host-local: support sets of disjoint ranges
authorCasey Callendrello <casey.callendrello@coreos.com>
Mon, 31 Jul 2017 12:38:11 +0000 (14:38 +0200)
committerCasey Callendrello <casey.callendrello@coreos.com>
Wed, 9 Aug 2017 17:02:08 +0000 (19:02 +0200)
commit27d027a6d35cc4cad25a4f1e54a59aacb52a1241
tree15507cdfb3e38a0d4f0be01b7e2eb38ef2048e45
parent20bc33abc565e75c0f9de488a020d1ef5b7d9b56
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
13 files changed:
plugins/ipam/host-local/README.md
plugins/ipam/host-local/backend/allocator/allocator.go
plugins/ipam/host-local/backend/allocator/allocator_test.go
plugins/ipam/host-local/backend/allocator/config.go
plugins/ipam/host-local/backend/allocator/config_test.go
plugins/ipam/host-local/backend/allocator/range.go
plugins/ipam/host-local/backend/allocator/range_set.go [new file with mode: 0644]
plugins/ipam/host-local/backend/allocator/range_set_test.go [new file with mode: 0644]
plugins/ipam/host-local/backend/allocator/range_test.go
plugins/ipam/host-local/host_local_test.go
plugins/ipam/host-local/main.go
plugins/main/bridge/bridge_test.go
plugins/main/ptp/ptp_test.go