cniovs

package
v0.0.0-...-5d7f650 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultHostVhostuserBaseDir = "/var/lib/vhost_sockets/"
)

Constants

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(conf *types.NetConf, args *skel.CmdArgs, data *OvsSavedData) error

func SaveConfig

func SaveConfig(conf *types.NetConf, args *skel.CmdArgs, data *OvsSavedData) error

SaveConfig() - Some data needs to be saved for cmdDel().

This function squirrels the data away to be retrieved later.

func SetDefaultExecCommand

func SetDefaultExecCommand()

func SetExecCommand

func SetExecCommand(o ExecCommandInterface)

Types

type CniOvs

type CniOvs struct {
}

Types

func (CniOvs) AddOnContainer

func (cniOvs CniOvs) AddOnContainer(conf *types.NetConf,
	args *skel.CmdArgs,
	kubeClient kubernetes.Interface,
	sharedDir string,
	pod *v1.Pod,
	ipResult *current.Result) (*v1.Pod, error)

func (CniOvs) AddOnHost

func (cniOvs CniOvs) AddOnHost(conf *types.NetConf,
	args *skel.CmdArgs,
	kubeClient kubernetes.Interface,
	sharedDir string,
	ipResult *current.Result) error

API Functions

func (CniOvs) DelFromContainer

func (cniOvs CniOvs) DelFromContainer(conf *types.NetConf, args *skel.CmdArgs, sharedDir string, pod *v1.Pod) error

func (CniOvs) DelFromHost

func (cniOvs CniOvs) DelFromHost(conf *types.NetConf, args *skel.CmdArgs, sharedDir string) error

type ExecCommandInterface

type ExecCommandInterface interface {
	// contains filtered or unexported methods
}

type FakeExecCommand

type FakeExecCommand struct {
	Out  []byte
	Err  error
	Cmd  string
	Args []string
}

type OvsSavedData

type OvsSavedData struct {
	Vhostname string `json:"vhostname"` // Vhost Port name
	VhostMac  string `json:"vhostmac"`  // Vhost port MAC address
	IfMac     string `json:"ifmac"`     // Interface Mac address
}

This structure is a union of all the OVS data (for all types of interfaces) that need to be preserved for later use.

Jump to

Keyboard shortcuts

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