ovsctl

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockOvsctl

type MockOvsctl struct {
	// contains filtered or unexported fields
}

func NewMockOvsctl

func NewMockOvsctl(returnError bool, errorStr string, ovsPort string) MockOvsctl

func (MockOvsctl) AddArpDnatRule

func (m MockOvsctl) AddArpDnatRule(bridgeName string, port string, mac string) error

func (MockOvsctl) AddArpReplyRule

func (m MockOvsctl) AddArpReplyRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, mode string) error

func (MockOvsctl) AddArpSnatRule

func (m MockOvsctl) AddArpSnatRule(bridgeName string, mac string, macHex string, ofport string) error

func (MockOvsctl) AddFakeArpReply

func (m MockOvsctl) AddFakeArpReply(bridgeName string, ip net.IP) error

func (MockOvsctl) AddIPSnatRule

func (m MockOvsctl) AddIPSnatRule(bridgeName string, ip net.IP, vlanID int, port string, mac string, outport string) error

func (MockOvsctl) AddMacDnatRule

func (m MockOvsctl) AddMacDnatRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, containerPort string) error

func (MockOvsctl) AddPortOnOVSBridge

func (m MockOvsctl) AddPortOnOVSBridge(hostIfName string, bridgeName string, vlanID int) error

func (MockOvsctl) AddVMIpAcceptRule

func (m MockOvsctl) AddVMIpAcceptRule(bridgeName string, primaryIP string, mac string) error

func (MockOvsctl) CreateOVSBridge

func (m MockOvsctl) CreateOVSBridge(bridgeName string) error

func (MockOvsctl) DeleteArpReplyRule

func (MockOvsctl) DeleteArpReplyRule(bridgeName string, port string, ip net.IP, vlanid int)

func (MockOvsctl) DeleteIPSnatRule

func (MockOvsctl) DeleteIPSnatRule(bridgeName string, port string)

func (MockOvsctl) DeleteMacDnatRule

func (MockOvsctl) DeleteMacDnatRule(bridgeName string, port string, ip net.IP, vlanid int)

func (MockOvsctl) DeleteOVSBridge

func (m MockOvsctl) DeleteOVSBridge(bridgeName string) error

func (MockOvsctl) DeletePortFromOVS

func (m MockOvsctl) DeletePortFromOVS(bridgeName string, interfaceName string) error

func (MockOvsctl) GetOVSPortNumber

func (MockOvsctl) GetOVSPortNumber(interfaceName string) (string, error)

type OvsInterface

type OvsInterface interface {
	// TODO: remove this interface after platform calls are mocked
	CreateOVSBridge(bridgeName string) error
	DeleteOVSBridge(bridgeName string) error
	AddPortOnOVSBridge(hostIfName string, bridgeName string, vlanID int) error
	GetOVSPortNumber(interfaceName string) (string, error)
	AddVMIpAcceptRule(bridgeName string, primaryIP string, mac string) error
	AddArpSnatRule(bridgeName string, mac string, macHex string, ofport string) error
	AddIPSnatRule(bridgeName string, ip net.IP, vlanID int, port string, mac string, outport string) error
	AddArpDnatRule(bridgeName string, port string, mac string) error
	AddFakeArpReply(bridgeName string, ip net.IP) error
	AddArpReplyRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, mode string) error
	AddMacDnatRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, containerPort string) error
	DeleteArpReplyRule(bridgeName string, port string, ip net.IP, vlanid int)
	DeleteIPSnatRule(bridgeName string, port string)
	DeleteMacDnatRule(bridgeName string, port string, ip net.IP, vlanid int)
	DeletePortFromOVS(bridgeName string, interfaceName string) error
}

type Ovsctl

type Ovsctl struct {
	// contains filtered or unexported fields
}

func NewOvsctl

func NewOvsctl() Ovsctl

func (Ovsctl) AddArpDnatRule

func (o Ovsctl) AddArpDnatRule(bridgeName, port, mac string) error

func (Ovsctl) AddArpReplyRule

func (o Ovsctl) AddArpReplyRule(bridgeName, port string, ip net.IP, mac string, vlanid int, mode string) error

func (Ovsctl) AddArpSnatRule

func (o Ovsctl) AddArpSnatRule(bridgeName, mac, macHex, ofport string) error

func (Ovsctl) AddFakeArpReply

func (o Ovsctl) AddFakeArpReply(bridgeName string, ip net.IP) error

func (Ovsctl) AddIPSnatRule

func (o Ovsctl) AddIPSnatRule(bridgeName string, ip net.IP, vlanID int, port, mac, outport string) error

IP SNAT Rule - Change src mac to VM Mac for packets coming from container host veth port.

func (Ovsctl) AddMacDnatRule

func (o Ovsctl) AddMacDnatRule(bridgeName, port string, ip net.IP, mac string, vlanid int, containerPort string) error

Add MAC DNAT rule based on dst ip and vlanid

func (Ovsctl) AddPortOnOVSBridge

func (o Ovsctl) AddPortOnOVSBridge(hostIfName, bridgeName string, vlanID int) error

func (Ovsctl) AddVMIpAcceptRule

func (o Ovsctl) AddVMIpAcceptRule(bridgeName, primaryIP, mac string) error

func (Ovsctl) CreateOVSBridge

func (o Ovsctl) CreateOVSBridge(bridgeName string) error

func (Ovsctl) DeleteArpReplyRule

func (o Ovsctl) DeleteArpReplyRule(bridgeName, port string, ip net.IP, vlanid int)

func (Ovsctl) DeleteIPSnatRule

func (o Ovsctl) DeleteIPSnatRule(bridgeName, port string)

func (Ovsctl) DeleteMacDnatRule

func (o Ovsctl) DeleteMacDnatRule(bridgeName, port string, ip net.IP, vlanid int)

func (Ovsctl) DeleteOVSBridge

func (o Ovsctl) DeleteOVSBridge(bridgeName string) error

func (Ovsctl) DeletePortFromOVS

func (o Ovsctl) DeletePortFromOVS(bridgeName, interfaceName string) error

func (Ovsctl) GetOVSPortNumber

func (o Ovsctl) GetOVSPortNumber(interfaceName string) (string, error)

Jump to

Keyboard shortcuts

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