From eaae29462880aa0fb17e8d448cc79519e070e64f Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 14 Oct 2021 10:33:18 +0200 Subject: netavark network interface Implement a new network interface for netavark. For now only bridge networking is supported. The interface can create/list/inspect/remove networks. For setup and teardown netavark will be invoked. Signed-off-by: Paul Holzinger --- libpod/network/netavark/netavark_suite_test.go | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 libpod/network/netavark/netavark_suite_test.go (limited to 'libpod/network/netavark/netavark_suite_test.go') diff --git a/libpod/network/netavark/netavark_suite_test.go b/libpod/network/netavark/netavark_suite_test.go new file mode 100644 index 000000000..b24f880e0 --- /dev/null +++ b/libpod/network/netavark/netavark_suite_test.go @@ -0,0 +1,37 @@ +// +build linux + +package netavark_test + +import ( + "os" + "path/filepath" + "testing" + + "github.com/containers/podman/v3/libpod/network/netavark" + "github.com/containers/podman/v3/libpod/network/types" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestNetavark(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Netavark Suite") +} + +var netavarkBinary string + +func init() { + netavarkBinary = os.Getenv("NETAVARK_BINARY") + if netavarkBinary == "" { + netavarkBinary = "/usr/libexec/podman/netavark" + } +} + +func getNetworkInterface(confDir string, machine bool) (types.ContainerNetwork, error) { + return netavark.NewNetworkInterface(netavark.InitConfig{ + NetworkConfigDir: confDir, + IsMachine: machine, + NetavarkBinary: netavarkBinary, + LockFile: filepath.Join(confDir, "netavark.lock"), + }) +} -- cgit v1.2.3-54-g00ecf