cni

package
v3.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

README

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCNINetworkInterface

func NewCNINetworkInterface(conf InitConfig) (types.ContainerNetwork, error)

NewCNINetworkInterface creates the ContainerNetwork interface for the CNI backend. Note: The networks are not loaded from disk until a method is called.

Types

type InitConfig

type InitConfig struct {
	// CNIConfigDir is directory where the cni config files are stored.
	CNIConfigDir string
	// CNIPluginDirs is a list of directories where cni should look for the plugins.
	CNIPluginDirs []string

	// DefaultNetwork is the name for the default network.
	DefaultNetwork string
	// DefaultSubnet is the default subnet for the default network.
	DefaultSubnet string

	// IsMachine describes whenever podman runs in a podman machine environment.
	IsMachine bool

	// LockFile is the path to lock file.
	LockFile string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL