Documentation ¶
Index ¶
- Variables
- func SetupNetworkInterfaces(vmi *v1.VirtualMachineInstance, domain *api.Domain) error
- type BindMechanism
- type BridgePodInterface
- type MockBindMechanism
- type MockNetworkHandler
- func (_m *MockNetworkHandler) AddrAdd(link netlink.Link, addr *netlink.Addr) error
- func (_m *MockNetworkHandler) AddrDel(link netlink.Link, addr *netlink.Addr) error
- func (_m *MockNetworkHandler) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)
- func (_m *MockNetworkHandler) EXPECT() *_MockNetworkHandlerRecorder
- func (_m *MockNetworkHandler) GetMacDetails(iface string) (net.HardwareAddr, error)
- func (_m *MockNetworkHandler) LinkAdd(link netlink.Link) error
- func (_m *MockNetworkHandler) LinkByName(name string) (netlink.Link, error)
- func (_m *MockNetworkHandler) LinkSetDown(link netlink.Link) error
- func (_m *MockNetworkHandler) LinkSetLearningOff(link netlink.Link) error
- func (_m *MockNetworkHandler) LinkSetUp(link netlink.Link) error
- func (_m *MockNetworkHandler) ParseAddr(s string) (*netlink.Addr, error)
- func (_m *MockNetworkHandler) RouteList(link netlink.Link, family int) ([]netlink.Route, error)
- func (_m *MockNetworkHandler) SetRandomMac(iface string) (net.HardwareAddr, error)
- func (_m *MockNetworkHandler) StartDHCP(nic *VIF, serverAddr *netlink.Addr, bridgeInterfaceName string)
- type MockNetworkInterface
- type NetworkHandler
- type NetworkInterface
- type NetworkUtilsHandler
- func (h *NetworkUtilsHandler) AddrAdd(link netlink.Link, addr *netlink.Addr) error
- func (h *NetworkUtilsHandler) AddrDel(link netlink.Link, addr *netlink.Addr) error
- func (h *NetworkUtilsHandler) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)
- func (h *NetworkUtilsHandler) GetMacDetails(iface string) (net.HardwareAddr, error)
- func (h *NetworkUtilsHandler) LinkAdd(link netlink.Link) error
- func (h *NetworkUtilsHandler) LinkByName(name string) (netlink.Link, error)
- func (h *NetworkUtilsHandler) LinkSetDown(link netlink.Link) error
- func (h *NetworkUtilsHandler) LinkSetLearningOff(link netlink.Link) error
- func (h *NetworkUtilsHandler) LinkSetUp(link netlink.Link) error
- func (h *NetworkUtilsHandler) ParseAddr(s string) (*netlink.Addr, error)
- func (h *NetworkUtilsHandler) RouteList(link netlink.Link, family int) ([]netlink.Route, error)
- func (h *NetworkUtilsHandler) SetRandomMac(iface string) (net.HardwareAddr, error)
- func (h *NetworkUtilsHandler) StartDHCP(nic *VIF, serverAddr *netlink.Addr, bridgeInterfaceName string)
- type PodInterface
- type SlirpPodInterface
- type VIF
Constants ¶
This section is empty.
Variables ¶
View Source
var DHCPServer = dhcp.SingleClientDHCPServer
View Source
var NetworkInterfaceFactory = getNetworkClass
View Source
var SetupPodNetwork = SetupNetworkInterfaces
Allow mocking for tests
Functions ¶
func SetupNetworkInterfaces ¶ added in v0.6.0
func SetupNetworkInterfaces(vmi *v1.VirtualMachineInstance, domain *api.Domain) error
Types ¶
type BindMechanism ¶ added in v0.6.0
type BindMechanism interface {
// contains filtered or unexported methods
}
type BridgePodInterface ¶ added in v0.6.0
type BridgePodInterface struct {
// contains filtered or unexported fields
}
type MockBindMechanism ¶ added in v0.6.0
type MockBindMechanism struct {
// contains filtered or unexported fields
}
Mock of BindMechanism interface
func NewMockBindMechanism ¶ added in v0.6.0
func NewMockBindMechanism(ctrl *gomock.Controller) *MockBindMechanism
func (*MockBindMechanism) EXPECT ¶ added in v0.6.0
func (_m *MockBindMechanism) EXPECT() *_MockBindMechanismRecorder
type MockNetworkHandler ¶
type MockNetworkHandler struct {
// contains filtered or unexported fields
}
Mock of NetworkHandler interface
func NewMockNetworkHandler ¶
func NewMockNetworkHandler(ctrl *gomock.Controller) *MockNetworkHandler
func (*MockNetworkHandler) EXPECT ¶
func (_m *MockNetworkHandler) EXPECT() *_MockNetworkHandlerRecorder
func (*MockNetworkHandler) GetMacDetails ¶
func (_m *MockNetworkHandler) GetMacDetails(iface string) (net.HardwareAddr, error)
func (*MockNetworkHandler) LinkByName ¶
func (_m *MockNetworkHandler) LinkByName(name string) (netlink.Link, error)
func (*MockNetworkHandler) LinkSetDown ¶
func (_m *MockNetworkHandler) LinkSetDown(link netlink.Link) error
func (*MockNetworkHandler) LinkSetLearningOff ¶ added in v0.9.2
func (_m *MockNetworkHandler) LinkSetLearningOff(link netlink.Link) error
func (*MockNetworkHandler) LinkSetUp ¶
func (_m *MockNetworkHandler) LinkSetUp(link netlink.Link) error
func (*MockNetworkHandler) ParseAddr ¶
func (_m *MockNetworkHandler) ParseAddr(s string) (*netlink.Addr, error)
func (*MockNetworkHandler) SetRandomMac ¶ added in v0.6.0
func (_m *MockNetworkHandler) SetRandomMac(iface string) (net.HardwareAddr, error)
type MockNetworkInterface ¶ added in v0.6.0
type MockNetworkInterface struct {
// contains filtered or unexported fields
}
Mock of NetworkInterface interface
func NewMockNetworkInterface ¶ added in v0.6.0
func NewMockNetworkInterface(ctrl *gomock.Controller) *MockNetworkInterface
func (*MockNetworkInterface) EXPECT ¶ added in v0.6.0
func (_m *MockNetworkInterface) EXPECT() *_MockNetworkInterfaceRecorder
func (*MockNetworkInterface) Unplug ¶ added in v0.6.0
func (_m *MockNetworkInterface) Unplug()
type NetworkHandler ¶
type NetworkHandler interface { LinkByName(name string) (netlink.Link, error) AddrList(link netlink.Link, family int) ([]netlink.Addr, error) RouteList(link netlink.Link, family int) ([]netlink.Route, error) AddrDel(link netlink.Link, addr *netlink.Addr) error AddrAdd(link netlink.Link, addr *netlink.Addr) error LinkSetDown(link netlink.Link) error LinkSetUp(link netlink.Link) error LinkAdd(link netlink.Link) error LinkSetLearningOff(link netlink.Link) error ParseAddr(s string) (*netlink.Addr, error) SetRandomMac(iface string) (net.HardwareAddr, error) GetMacDetails(iface string) (net.HardwareAddr, error) StartDHCP(nic *VIF, serverAddr *netlink.Addr, bridgeInterfaceName string) }
var Handler NetworkHandler
type NetworkInterface ¶ added in v0.6.0
type NetworkUtilsHandler ¶
type NetworkUtilsHandler struct{}
func (*NetworkUtilsHandler) GetMacDetails ¶
func (h *NetworkUtilsHandler) GetMacDetails(iface string) (net.HardwareAddr, error)
GetMacDetails from an interface
func (*NetworkUtilsHandler) LinkAdd ¶
func (h *NetworkUtilsHandler) LinkAdd(link netlink.Link) error
func (*NetworkUtilsHandler) LinkByName ¶
func (h *NetworkUtilsHandler) LinkByName(name string) (netlink.Link, error)
func (*NetworkUtilsHandler) LinkSetDown ¶
func (h *NetworkUtilsHandler) LinkSetDown(link netlink.Link) error
func (*NetworkUtilsHandler) LinkSetLearningOff ¶ added in v0.9.2
func (h *NetworkUtilsHandler) LinkSetLearningOff(link netlink.Link) error
func (*NetworkUtilsHandler) LinkSetUp ¶
func (h *NetworkUtilsHandler) LinkSetUp(link netlink.Link) error
func (*NetworkUtilsHandler) ParseAddr ¶
func (h *NetworkUtilsHandler) ParseAddr(s string) (*netlink.Addr, error)
func (*NetworkUtilsHandler) SetRandomMac ¶ added in v0.6.0
func (h *NetworkUtilsHandler) SetRandomMac(iface string) (net.HardwareAddr, error)
SetRandomMac changes the MAC address for a given interface to a randomly generated, preserving the vendor prefix
type PodInterface ¶ added in v0.6.0
type PodInterface struct{}
func (*PodInterface) Plug ¶ added in v0.6.0
func (l *PodInterface) Plug(iface *v1.Interface, network *v1.Network, domain *api.Domain, podInterfaceName string) error
Plug connect a Pod network device to the virtual machine
func (*PodInterface) Unplug ¶ added in v0.6.0
func (l *PodInterface) Unplug()
type SlirpPodInterface ¶ added in v0.7.0
type SlirpPodInterface struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.