Documentation ¶
Index ¶
- type MockIPv4Net
- func (mn *MockIPv4Net) GetHostIPs() []net.IP
- func (mn *MockIPv4Net) GetHostInterconnectIfName() string
- func (mn *MockIPv4Net) GetIfName(podNamespace string, podName string) (name string, exists bool)
- func (mn *MockIPv4Net) GetNodeIP() (net.IP, *net.IPNet)
- func (mn *MockIPv4Net) GetPodByIf(ifname string) (podNamespace string, podName string, exists bool)
- func (mn *MockIPv4Net) GetVxlanBVIIfName() string
- func (mn *MockIPv4Net) SetHostIPs(ips []net.IP)
- func (mn *MockIPv4Net) SetHostInterconnectIfName(ifName string)
- func (mn *MockIPv4Net) SetNodeIP(nodeIP *net.IPNet)
- func (mn *MockIPv4Net) SetPodIfName(pod podmodel.ID, ifName string)
- func (mn *MockIPv4Net) SetVxlanBVIIfName(ifName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockIPv4Net ¶
MockIPv4Net is a mock for the ipv4net Plugin.
func NewMockIPv4Net ¶
func NewMockIPv4Net() *MockIPv4Net
NewMockIPv4Net is a constructor for MockIPv4Net.
func (*MockIPv4Net) GetHostIPs ¶
func (mn *MockIPv4Net) GetHostIPs() []net.IP
GetHostIPs returns all IP addresses of this node present in the host network namespace (Linux).
func (*MockIPv4Net) GetHostInterconnectIfName ¶
func (mn *MockIPv4Net) GetHostInterconnectIfName() string
GetHostInterconnectIfName returns the name of the TAP/AF_PACKET interface interconnecting VPP with the host stack.
func (*MockIPv4Net) GetIfName ¶
func (mn *MockIPv4Net) GetIfName(podNamespace string, podName string) (name string, exists bool)
GetIfName returns pod's interface name as set previously using SetPodIfName.
func (*MockIPv4Net) GetNodeIP ¶
func (mn *MockIPv4Net) GetNodeIP() (net.IP, *net.IPNet)
GetNodeIP returns the IP+network address of this node.
func (*MockIPv4Net) GetPodByIf ¶
func (mn *MockIPv4Net) GetPodByIf(ifname string) (podNamespace string, podName string, exists bool)
GetPodByIf looks up podName and podNamespace that is associated with logical interface name.
func (*MockIPv4Net) GetVxlanBVIIfName ¶
func (mn *MockIPv4Net) GetVxlanBVIIfName() string
GetVxlanBVIIfName returns the name of an BVI interface facing towards VXLAN tunnels to other hosts. Returns an empty string if VXLAN is not used (in L2 interconnect mode).
func (*MockIPv4Net) SetHostIPs ¶
func (mn *MockIPv4Net) SetHostIPs(ips []net.IP)
SetHostIPs sets IP addresses of this node present in the host network namespace (Linux).
func (*MockIPv4Net) SetHostInterconnectIfName ¶
func (mn *MockIPv4Net) SetHostInterconnectIfName(ifName string)
SetHostInterconnectIfName allows to set what tests will assume the name of the host-interconnect interface is.
func (*MockIPv4Net) SetNodeIP ¶
func (mn *MockIPv4Net) SetNodeIP(nodeIP *net.IPNet)
SetNodeIP allows to set what tests will assume the node IP is.
func (*MockIPv4Net) SetPodIfName ¶
func (mn *MockIPv4Net) SetPodIfName(pod podmodel.ID, ifName string)
SetPodIfName allows to create a fake association between a pod and an interface.
func (*MockIPv4Net) SetVxlanBVIIfName ¶
func (mn *MockIPv4Net) SetVxlanBVIIfName(ifName string)
SetVxlanBVIIfName allows to set what tests will assume the name of the VXLAN BVI interface is.