Documentation ¶
Index ¶
- type MockIPNet
- func (mn *MockIPNet) GetExternalIfName(extIfName string, vlan uint32) (ifName string)
- func (mn *MockIPNet) GetHostIPs() []net.IP
- func (mn *MockIPNet) GetHostInterconnectIfName() string
- func (mn *MockIPNet) GetNodeIP() (net.IP, *net.IPNet)
- func (mn *MockIPNet) GetOrAllocateVrfID(networkName string) (vrf uint32, err error)
- func (mn *MockIPNet) GetOrAllocateVxlanVNI(networkName string) (vni uint32, err error)
- func (mn *MockIPNet) GetPodByIf(ifname string) (podNamespace string, podName string, exists bool)
- func (mn *MockIPNet) GetPodCustomIfName(podNamespace, podName, customIfName string) (ifName string, exists bool)
- func (mn *MockIPNet) GetPodIfNames(podNamespace string, podName string) (vppIfName, linuxIfName, loopIfName string, exists bool)
- func (mn *MockIPNet) GetPodLoopIfName(podNamespace string, podName string) string
- func (mn *MockIPNet) GetVxlanBVIIfName() string
- func (mn *MockIPNet) ReleaseVrfID(networkName string) (err error)
- func (mn *MockIPNet) ReleaseVxlanVNI(networkName string) (err error)
- func (mn *MockIPNet) SetHostIPs(ips []net.IP)
- func (mn *MockIPNet) SetHostInterconnectIfName(ifName string)
- func (mn *MockIPNet) SetNodeIP(nodeIP *net.IPNet)
- func (mn *MockIPNet) SetPodIfName(pod podmodel.ID, ifName string)
- func (mn *MockIPNet) SetVxlanBVIIfName(ifName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockIPNet ¶
MockIPNet is a mock for the ipnet Plugin.
func (*MockIPNet) GetExternalIfName ¶
GetExternalIfName returns logical name that corresponds to the specified external interface name and VLAN ID.
func (*MockIPNet) GetHostIPs ¶
GetHostIPs returns all IP addresses of this node present in the host network namespace (Linux).
func (*MockIPNet) GetHostInterconnectIfName ¶
GetHostInterconnectIfName returns the name of the TAP/AF_PACKET interface interconnecting VPP with the host stack.
func (*MockIPNet) GetOrAllocateVrfID ¶
GetOrAllocateVrfID returns the allocated VRF ID number for the given network. Allocates a new VRF ID if not already allocated.
func (*MockIPNet) GetOrAllocateVxlanVNI ¶
GetOrAllocateVxlanVNI returns the allocated VXLAN VNI number for the given network. Allocates a new VNI if not already allocated.
func (*MockIPNet) GetPodByIf ¶
GetPodByIf looks up podName and podNamespace that is associated with logical interface name.
func (*MockIPNet) GetPodCustomIfName ¶
func (mn *MockIPNet) GetPodCustomIfName(podNamespace, podName, customIfName string) (ifName string, exists bool)
GetPodCustomIfName looks up logical interface name that corresponds to the custom interface with specified name and type associated with the given local pod name + namespace.
func (*MockIPNet) GetPodIfNames ¶
func (mn *MockIPNet) GetPodIfNames(podNamespace string, podName string) (vppIfName, linuxIfName, loopIfName string, exists bool)
GetPodIfNames returns pod's interface name as set previously using SetPodIfName.
func (*MockIPNet) GetPodLoopIfName ¶
func (*MockIPNet) GetVxlanBVIIfName ¶
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 (*MockIPNet) ReleaseVrfID ¶
ReleaseVrfID releases the allocated VRF ID number for the given network.
func (*MockIPNet) ReleaseVxlanVNI ¶
ReleaseVxlanVNI releases the allocated VXLAN VNI number for the given network.
func (*MockIPNet) SetHostIPs ¶
SetHostIPs sets IP addresses of this node present in the host network namespace (Linux).
func (*MockIPNet) SetHostInterconnectIfName ¶
SetHostInterconnectIfName allows to set what tests will assume the name of the host-interconnect interface is.
func (*MockIPNet) SetPodIfName ¶
SetPodIfName allows to create a fake association between a pod and an interface.
func (*MockIPNet) SetVxlanBVIIfName ¶
SetVxlanBVIIfName allows to set what tests will assume the name of the VXLAN BVI interface is.