mirror of
https://github.com/moby/moby.git
synced 2026-08-08 17:11:38 +00:00
libnet: move ipam pkg to ipam/defaultipam
All drivers except the default ipam driver are stored in ipams/. Since `default` isn't a valid Go pkg name, this package is renamed to `defaultipam`, following `windowsipam` example. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package builtin
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/libnetwork/ipam"
|
||||
"github.com/docker/docker/libnetwork/ipamapi"
|
||||
"github.com/docker/docker/libnetwork/ipams/defaultipam"
|
||||
"github.com/docker/docker/libnetwork/ipamutils"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ func registerBuiltin(ic ipamapi.Registerer, addressPools []*ipamutils.NetworkToS
|
||||
}
|
||||
}
|
||||
|
||||
a, err := ipam.NewAllocator(localAddressPools, ipamutils.GetGlobalScopeDefaultNetworks())
|
||||
a, err := defaultipam.NewAllocator(localAddressPools, ipamutils.GetGlobalScopeDefaultNetworks())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package ipam
|
||||
package defaultipam
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package ipam
|
||||
package defaultipam
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package ipam
|
||||
package defaultipam
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -357,7 +357,7 @@ func TestPoolAllocationReuse(t *testing.T) {
|
||||
// Verify that we don't see any repeat networks even though
|
||||
// we have freed them.
|
||||
seen := map[string]bool{}
|
||||
for i := 0; i < len(allocs); i++ {
|
||||
for range allocs {
|
||||
alloc, err := a.RequestPool(ipamapi.PoolRequest{AddressSpace: localAddressSpace})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -1,4 +1,4 @@
|
||||
package ipam
|
||||
package defaultipam
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package ipam
|
||||
package defaultipam
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
Reference in New Issue
Block a user