diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-10-14 10:33:18 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-11-11 15:54:02 +0100 |
commit | eaae29462880aa0fb17e8d448cc79519e070e64f (patch) | |
tree | 7da8ee0d642bb34f0f7c97a64e95f93661966050 /libpod/network/netavark/netavark_suite_test.go | |
parent | 12c62b92ff2f63cb34dcb9c0555b96983e6aad94 (diff) | |
download | podman-eaae29462880aa0fb17e8d448cc79519e070e64f.tar.gz podman-eaae29462880aa0fb17e8d448cc79519e070e64f.tar.bz2 podman-eaae29462880aa0fb17e8d448cc79519e070e64f.zip |
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 <pholzing@redhat.com>
Diffstat (limited to 'libpod/network/netavark/netavark_suite_test.go')
-rw-r--r-- | libpod/network/netavark/netavark_suite_test.go | 37 |
1 files changed, 37 insertions, 0 deletions
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"), + }) +} |