Commit
a047d4b1df4664d9b4cb7ff9b320756d009f690b
by Albin Kerouanton libnet/ipam: un-embed mutex from `addrSpace` Embedding `sync.Mutex` into a struct is considered a bad practice as it makes the mutex methods part of the embedding struct's API. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/ipam/structures.go (diff) The file was modified
libnetwork/ipam/allocator.go (diff)
Commit
df88857e6cd265e0b5ccd29c9e4db5f3db5c16fd
by Albin Kerouanton libnet/ipam: put `addrSpace` into a separate file `addrSpace` methods are currently scattered in two different files. As upcoming work will rewrite some of these methods, better put them into a separate file. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/ipam/structures.go (diff) The file was modified
libnetwork/ipam/allocator.go (diff) The file was added libnetwork/ipam/address_space.go The file was modified
libnetwork/ipam/address_space.go (diff) The file was modified
libnetwork/ipam/allocator.go (diff)
Commit
37a81cd04dcdf60f40cce2fa09498cc23172625c
by Albin Kerouanton libnet/ipam: split v4/v6 address spaces Address spaces are a continuum of addresses that can be used for a specific purpose (ie. 'local' for unmanaged containers, 'global for Swarm). v4 and v6 addresses aren't of the same size -- hence combining them into a single address space doesn't form a continuum. Better set them apart into two different address spaces. Also, the upcoming rewrite of `addrSpace` will benefit from that split. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/ipam/allocator.go (diff) The file was modified
libnetwork/ipam/allocator_test.go (diff) The file was modified
libnetwork/ipam/address_space.go (diff) The file was modified
libnetwork/ipam/structures.go (diff) The file was modified
libnetwork/netutils/utils.go (diff) The file was modified
libnetwork/netutils/utils_linux_test.go (diff)
Commit
115de5ff3d16dbec510923e166950556071693ee
by Albin Kerouanton libnet/ipamapi: add in/out structs for RequestPool The `RequestPool` method has many args and named returns. This makes the code hard to follow at times. This commit adds one struct, `PoolRequest`, to replace these args, and one struct, `AllocatedPool`, to replace these named returns. Both structs' fields are properly documented to better define their semantics, and their relationship with address allocation. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/ipams/windowsipam/windowsipam_test.go (diff) The file was modified
libnetwork/cnmallocator/networkallocator_test.go (diff) The file was modified
libnetwork/ipam/allocator.go (diff) The file was modified
libnetwork/ipamapi/contract.go (diff) The file was modified
libnetwork/cnmallocator/networkallocator.go (diff) The file was modified
libnetwork/ipams/null/null_test.go (diff) The file was modified
libnetwork/ipams/remote/remote_test.go (diff) The file was modified
libnetwork/ipams/windowsipam/windowsipam.go (diff) The file was modified
libnetwork/network.go (diff) The file was modified
libnetwork/ipams/remote/remote.go (diff) The file was modified
libnetwork/ipams/null/null.go (diff) The file was modified
libnetwork/ipam/allocator_test.go (diff) The file was modified
libnetwork/ipam/parallel_test.go (diff) The file was modified
integration-cli/docker_api_network_test.go (diff)
Commit
e8644c3e0e8aed98f11ef27f15b124c0ee5c6dea
by Albin Kerouanton libnet/ipam: default-address-pools as Register arg Prior to this change, daemon's `default-address-pools` param would be passed to `SetDefaultIPAddressPool()` to set a global var named `defaultAddressPool`. This var would then be retrieved during the `default` IPAM driver registration. Both steps were executed in close succession during libnet's controller initialization. This change removes the global var and just pass the user-defined `default-address-pools` to the `default` driver's `Register` fn. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/ipams/builtin/builtin_windows.go (diff) The file was modified
libnetwork/ipams/builtin/builtin.go (diff) The file was modified
libnetwork/cnmallocator/drivers_ipam.go (diff) The file was modified
libnetwork/drvregistry/ipams_test.go (diff) The file was modified
libnetwork/ipams/builtin/builtin_unix.go (diff) The file was modified
libnetwork/drivers_ipam.go (diff)
Commit
29f2ca04e0695feb7d232bf3eb03c6dedac378f6
by Albin Kerouanton 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> The file was removed libnetwork/ipam/allocator_test.go The file was added libnetwork/ipams/defaultipam/structures.go The file was removed libnetwork/ipam/parallel_test.go The file was added libnetwork/ipams/defaultipam/allocator.go The file was modified
libnetwork/ipams/builtin/builtin.go (diff) The file was removed libnetwork/ipam/address_space.go The file was removed libnetwork/ipam/allocator.go The file was added libnetwork/ipams/defaultipam/allocator_test.go The file was added libnetwork/ipams/defaultipam/address_space.go The file was added libnetwork/ipams/defaultipam/parallel_test.go The file was removed libnetwork/ipam/structures.go
Commit
218394cada882b7e73cb19dabb4df68cfbea3c9c
by Albin Kerouanton libnet/ipams/builtin: move to libnet/ipams Packages in libnet/ipams are drivers, except builtin -- it's used to register drivers. Move files one level up and delete this pkg. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was removed libnetwork/ipams/builtin/builtin_unix.go The file was removed libnetwork/ipams/builtin/builtin_windows.go The file was added libnetwork/ipams/drivers.go The file was modified
libnetwork/drivers_ipam.go (diff) The file was added libnetwork/ipams/drivers_unix.go The file was modified
libnetwork/drvregistry/ipams_test.go (diff) The file was modified
libnetwork/cnmallocator/drivers_ipam.go (diff) The file was added libnetwork/ipams/drivers_windows.go The file was removed libnetwork/ipams/builtin/builtin.go
Commit
8cec9f0dcaa3e56972a61aa4634621c65cd1f7d1
by Albin Kerouanton libnet/ipams/defaultipam: add a Register fn All drivers except the default have a Register function. Before this change, default's registration was handled by another package. Move this logic into the driver pkg. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was removed libnetwork/ipams/drivers.go The file was modified
libnetwork/ipams/drivers_unix.go (diff) The file was modified
libnetwork/ipams/defaultipam/allocator.go (diff) The file was modified
libnetwork/ipams/drivers_windows.go (diff) The file was modified
libnetwork/ipams/windowsipam/windowsipam.go (diff) The file was modified
libnetwork/ipams/drivers_windows.go (diff) The file was removed libnetwork/ipams/drivers_unix.go The file was modified
libnetwork/ipams/windowsipam/windowsipam.go (diff) The file was added libnetwork/ipams/windowsipam/windowsipam_other.go The file was removed libnetwork/ipams/drivers_windows.go The file was added libnetwork/ipams/drivers.go The file was modified
libnetwork/ipams/windowsipam/windowsipam_test.go (diff) The file was modified
libnetwork/controller.go (diff) The file was modified
libnetwork/ipams/drivers.go (diff) The file was removed libnetwork/drivers_ipam.go The file was modified
libnetwork/cnmallocator/drivers_ipam.go (diff) The file was modified
libnetwork/drvregistry/ipams_test.go (diff)
Commit
0db56de78e2f7d156fe18ea85f0daa9e9e686f83
by Albin Kerouanton libnet/ipamutils: no more global state Prior to this change, cnmallocator would call `ConfigGlobalScopeDefaultNetworks` right before initializing its IPAM drivers. This function was mutating some global state used during drivers init. This change just remove the global state, and adds an arg to ipams.Register and defaultipam.Register to pass the global pools by arguments instead. Signed-off-by: Albin Kerouanton <albinker@gmail.com> The file was modified
libnetwork/drvregistry/ipams_test.go (diff) The file was modified
libnetwork/ipams/defaultipam/allocator.go (diff) The file was modified
libnetwork/ipams/drivers.go (diff) The file was modified
libnetwork/cnmallocator/drivers_ipam.go (diff) The file was modified
libnetwork/ipamutils/utils_test.go (diff) The file was modified
libnetwork/controller.go (diff) The file was modified
libnetwork/ipamutils/utils.go (diff) The file was modified
libnetwork/libnetwork_linux_test.go (diff) The file was modified
libnetwork/network_windows.go (diff) The file was modified
libnetwork/cnmallocator/networkallocator.go (diff) The file was modified
libnetwork/ipams/defaultipam/allocator.go (diff) The file was modified
libnetwork/libnetwork_internal_test.go (diff) The file was modified
libnetwork/ipamapi/contract.go (diff) The file was modified
libnetwork/endpoint_unix_test.go (diff) The file was modified
libnetwork/cnmallocator/provider.go (diff) The file was modified
libnetwork/network.go (diff) The file was modified
libnetwork/network_unix.go (diff) The file was modified
libnetwork/sandbox_unix_test.go (diff) The file was modified
libnetwork/ipamapi/contract.go (diff) The file was modified
libnetwork/ipams/null/null.go (diff) The file was modified
libnetwork/libnetwork_linux_test.go (diff)