Extend pre-existing address reclaim to docker containers

This commit is contained in:
Bryan Boreham committed 2017-02-13 11:30:34 +00:00
1 parent e26dbf11e9
commit 7075b5d9fd
4 files changed
+53 -22

No files matched your search

+3 -2
View File
@@ -77,8 +77,9 @@ type Allocator struct {
}
type PreClaim struct {
Ident string
Cidr address.CIDR
Ident string
IsContainer bool
Cidr address.CIDR
}
type Config struct {
+1 -1
View File
@@ -174,7 +174,7 @@ func TestAllocatorClaim(t *testing.T) {
)
preAddr, _ := address.ParseCIDR(testPre)
allocs, router, subnet := makeNetworkOfAllocators(2, universe, []PreClaim{{container1, preAddr}})
allocs, router, subnet := makeNetworkOfAllocators(2, universe, []PreClaim{{container1, true, preAddr}})
defer stopNetworkOfAllocators(allocs, router)
alloc := allocs[1]
addr1, _ := address.ParseCIDR(testAddr1)