spiegel_podman/libpod/network/cni
Paul Holzinger 4febe55769
netavark IPAM assignment
Add a new boltdb to handle IPAM assignment.

The db structure is the following:
Each network has their own bucket with the network name as bucket key.
Inside the network bucket there is an ID bucket which maps the container ID (key)
to a json array of ip addresses (value).
The network bucket also has a bucket for each subnet, the subnet is used as key.
Inside the subnet bucket an ip is used as key and the container ID as value.

The db should be stored on a tmpfs to ensure we always have a clean
state after a reboot.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-11 16:25:19 +01:00
..
testfiles Network interface 2021-08-24 12:28:03 +02:00
cni_conversion.go netavark IPAM assignment 2021-11-11 16:25:19 +01:00
cni_exec.go rootful: do not set XDG_RUNTIME_DIR for cni plugins 2021-09-24 11:25:02 +02:00
cni_suite_test.go Network interface 2021-08-24 12:28:03 +02:00
cni_types.go Replace 'an user' => 'a user' 2021-10-24 22:27:39 +02:00
config.go netavark network interface 2021-11-11 15:54:02 +01:00
config_test.go Merge pull request #11949 from Luap99/net-range 2021-10-13 18:42:15 +02:00
network.go Make networking code reusable 2021-11-11 15:54:02 +01:00
README.md Network interface 2021-08-24 12:28:03 +02:00
run.go Make networking code reusable 2021-11-11 15:54:02 +01:00
run_test.go Make networking code reusable 2021-11-11 15:54:02 +01:00

This package abstracts CNI from libpod. It implements the ContainerNetwork interface defined in libpod/network/types/network.go for the CNI backend.

Testing

Run the tests with:

go test -v -mod=vendor -cover ./libpod/network/cni/

Run the tests as root to also test setup/teardown. This will execute CNI and therefore the cni plugins have to be installed.