11 Commits

Author SHA1 Message Date
Paweł Gronowski
3df05205f4 modernize: Use range int
Added in Go 1.22

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Sebastiaan van Stijn
4b230a4909 internal/testutils: merge with internal/testutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-08 10:08:35 +02:00
Sebastiaan van Stijn
aead9964f3 Merge pull request #50586 from olljanat/endpoint-name-label
libnetwork: provide endpoint name for IPAM drivers
2025-09-04 20:20:25 +02:00
Albin Kerouanton
4d2a293ff3 libnet/drvapi: make NetworkAllocate optional
This method is only used by the cnmallocator to allocate Swarm-scoped
network resources. Its only concrete implementation is in the ovmanager.
Other network drivers are implementing it too to adhere to the
driverapi.Driver interface, but they all return a 'not implemented'
error.

Extract this method into a separate interface, and add a dedicated
RegisterNetworkAllocator to the driver registry. Update the cnmallocator
to load 'network allocators' instead of 'drivers'.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-02 21:55:03 +02:00
Olli Janatuinen
c6717f4387 libnetwork: provide endpoint name for IPAM drivers
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2025-08-28 00:20:34 -07:00
Albin Kerouanton
3003c5fe45 d/libnet: fix CreateOptionIPAM capitalization
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-08-27 00:18:46 +02:00
Albin Kerouanton
c9a0c93b04 d/libnet: remove unused arg from CreateOptionIpam
CreateOptionIpam takes an `ipamOptions` argument, but all callers are
passing nil. So, remove it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-08-26 20:15:24 +02:00
Matthieu MOREL
96f8c6395e chore: enable use-any rule from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-08-08 17:07:07 +02:00
Derek McGowan
f74e5d48b3 Create github.com/moby/moby/v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:29 -07:00
Cory Snider
844023f794 libnetwork/driverapi: make EventNotify optional
Overlay is the only driver which makes use of the EventNotify facility,
yet all other driver implementations are forced to provide a stub
implementation. Move the EventNotify and DecodeTableEntry methods into a
new optional TableWatcher interface and remove the stubs from all the
other drivers.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-07-22 11:51:14 -04:00
Derek McGowan
7a720df61f Move libnetwork to daemon/libnetwork
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-14 09:25:23 -07:00