Documentation ¶
Index ¶
- type MockOvsctl
- func (m MockOvsctl) AddArpDnatRule(bridgeName string, port string, mac string) error
- func (m MockOvsctl) AddArpReplyRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, mode string) error
- func (m MockOvsctl) AddArpSnatRule(bridgeName string, mac string, macHex string, ofport string) error
- func (m MockOvsctl) AddFakeArpReply(bridgeName string, ip net.IP) error
- func (m MockOvsctl) AddIPSnatRule(bridgeName string, ip net.IP, vlanID int, port string, mac string, ...) error
- func (m MockOvsctl) AddMacDnatRule(bridgeName string, port string, ip net.IP, mac string, vlanid int, ...) error
- func (m MockOvsctl) AddPortOnOVSBridge(hostIfName string, bridgeName string, vlanID int) error
- func (m MockOvsctl) AddVMIpAcceptRule(bridgeName string, primaryIP string, mac string) error
- func (m MockOvsctl) CreateOVSBridge(bridgeName string) error
- func (MockOvsctl) DeleteArpReplyRule(bridgeName string, port string, ip net.IP, vlanid int)
- func (MockOvsctl) DeleteIPSnatRule(bridgeName string, port string)
- func (MockOvsctl) DeleteMacDnatRule(bridgeName string, port string, ip net.IP, vlanid int)
- func (m MockOvsctl) DeleteOVSBridge(bridgeName string) error
- func (m MockOvsctl) DeletePortFromOVS(bridgeName string, interfaceName string) error
- func (MockOvsctl) GetOVSPortNumber(interfaceName string) (string, error)
- type OvsInterface
- type Ovsctl
- func (o Ovsctl) AddArpDnatRule(bridgeName, port, mac string) error
- func (o Ovsctl) AddArpReplyRule(bridgeName, port string, ip net.IP, mac string, vlanid int, mode string) error
- func (o Ovsctl) AddArpSnatRule(bridgeName, mac, macHex, ofport string) error
- func (o Ovsctl) AddFakeArpReply(bridgeName string, ip net.IP) error
- func (o Ovsctl) AddIPSnatRule(bridgeName string, ip net.IP, vlanID int, port, mac, outport string) error
- func (o Ovsctl) AddMacDnatRule(bridgeName, port string, ip net.IP, mac string, vlanid int, ...) error
- func (o Ovsctl) AddPortOnOVSBridge(hostIfName, bridgeName string, vlanID int) error
- func (o Ovsctl) AddVMIpAcceptRule(bridgeName, primaryIP, mac string) error
- func (o Ovsctl) CreateOVSBridge(bridgeName string) error
- func (o Ovsctl) DeleteArpReplyRule(bridgeName, port string, ip net.IP, vlanid int)
- func (o Ovsctl) DeleteIPSnatRule(bridgeName, port string)
- func (o Ovsctl) DeleteMacDnatRule(bridgeName, port string, ip net.IP, vlanid int)
- func (o Ovsctl) DeleteOVSBridge(bridgeName string) error
- func (o Ovsctl) DeletePortFromOVS(bridgeName, interfaceName string) error
- func (o Ovsctl) GetOVSPortNumber(interfaceName string) (string, error)
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 (MockOvsctl) AddArpSnatRule ¶
func (MockOvsctl) AddFakeArpReply ¶
func (m MockOvsctl) AddFakeArpReply(bridgeName string, ip net.IP) error
func (MockOvsctl) AddIPSnatRule ¶
func (MockOvsctl) AddMacDnatRule ¶
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) DeleteIPSnatRule ¶
func (MockOvsctl) DeleteIPSnatRule(bridgeName string, port string)
func (MockOvsctl) DeleteMacDnatRule ¶
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 (Ovsctl) AddArpDnatRule ¶
func (Ovsctl) AddArpReplyRule ¶
func (Ovsctl) AddArpSnatRule ¶
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 (Ovsctl) AddVMIpAcceptRule ¶
func (Ovsctl) CreateOVSBridge ¶
func (Ovsctl) DeleteArpReplyRule ¶
func (Ovsctl) DeleteIPSnatRule ¶
func (Ovsctl) DeleteMacDnatRule ¶
func (Ovsctl) DeleteOVSBridge ¶
func (Ovsctl) DeletePortFromOVS ¶
Click to show internal directories.
Click to hide internal directories.