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:
Albin Kerouanton
2024-04-18 10:45:23 +02:00
parent e8644c3e0e
commit 29f2ca04e0
6 changed files with 8 additions and 8 deletions

View File

@@ -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
}

View File

@@ -1,4 +1,4 @@
package ipam
package defaultipam
import (
"context"

View File

@@ -1,4 +1,4 @@
package ipam
package defaultipam
import (
"context"

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
package ipam
package defaultipam
import (
"context"

View File

@@ -1,4 +1,4 @@
package ipam
package defaultipam
import (
"fmt"