Documentation ¶
Index ¶
- Constants
- Variables
- type IPVersion
- type MockNetworkHandler
- func (_m *MockNetworkHandler) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)
- func (_m *MockNetworkHandler) EXPECT() *_MockNetworkHandlerRecorder
- func (_m *MockNetworkHandler) HasIPv4GlobalUnicastAddress(interfaceName string) (bool, error)
- func (_m *MockNetworkHandler) HasIPv6GlobalUnicastAddress(interfaceName string) (bool, error)
- func (_m *MockNetworkHandler) IsIpv4Primary() (bool, error)
- func (_m *MockNetworkHandler) LinkByName(name string) (netlink.Link, error)
- func (_m *MockNetworkHandler) LinkDel(link netlink.Link) error
- func (_m *MockNetworkHandler) ParseAddr(s string) (*netlink.Addr, error)
- func (_m *MockNetworkHandler) ReadIPAddressesFromLink(interfaceName string) (string, string, error)
- func (_m *MockNetworkHandler) RouteList(link netlink.Link, family int) ([]netlink.Route, error)
- func (_m *MockNetworkHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceName string, dhcpOptions *v1.DHCPOptions) error
- type NetworkHandler
- type NetworkUtilsHandler
- func (h *NetworkUtilsHandler) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)
- func (h *NetworkUtilsHandler) HasIPv4GlobalUnicastAddress(interfaceName string) (bool, error)
- func (h *NetworkUtilsHandler) HasIPv6GlobalUnicastAddress(interfaceName string) (bool, error)
- func (h *NetworkUtilsHandler) IsIpv4Primary() (bool, error)
- func (h *NetworkUtilsHandler) LinkByName(name string) (netlink.Link, error)
- func (h *NetworkUtilsHandler) LinkDel(link netlink.Link) error
- func (h *NetworkUtilsHandler) ParseAddr(s string) (*netlink.Addr, error)
- func (h *NetworkUtilsHandler) ReadIPAddressesFromLink(interfaceName string) (string, string, error)
- func (h *NetworkUtilsHandler) RouteList(link netlink.Link, family int) ([]netlink.Route, error)
- func (h *NetworkUtilsHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceName string, dhcpOptions *v1.DHCPOptions) error
Constants ¶
View Source
const (
LibvirtUserAndGroupId = "0"
)
Variables ¶
View Source
var DHCPServer = dhcpserver.SingleClientDHCPServer
Allow mocking for tests
View Source
var DHCPv6Server = dhcpserverv6.SingleClientDHCPv6Server
Functions ¶
This section is empty.
Types ¶
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) HasIPv4GlobalUnicastAddress ¶ added in v0.52.0
func (_m *MockNetworkHandler) HasIPv4GlobalUnicastAddress(interfaceName string) (bool, error)
func (*MockNetworkHandler) HasIPv6GlobalUnicastAddress ¶ added in v0.52.0
func (_m *MockNetworkHandler) HasIPv6GlobalUnicastAddress(interfaceName string) (bool, error)
func (*MockNetworkHandler) IsIpv4Primary ¶
func (_m *MockNetworkHandler) IsIpv4Primary() (bool, error)
func (*MockNetworkHandler) LinkByName ¶
func (_m *MockNetworkHandler) LinkByName(name string) (netlink.Link, error)
func (*MockNetworkHandler) LinkDel ¶ added in v1.0.0
func (_m *MockNetworkHandler) LinkDel(link netlink.Link) error
func (*MockNetworkHandler) ParseAddr ¶
func (_m *MockNetworkHandler) ParseAddr(s string) (*netlink.Addr, error)
func (*MockNetworkHandler) ReadIPAddressesFromLink ¶
func (_m *MockNetworkHandler) ReadIPAddressesFromLink(interfaceName string) (string, string, error)
func (*MockNetworkHandler) StartDHCP ¶
func (_m *MockNetworkHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceName string, dhcpOptions *v1.DHCPOptions) error
type NetworkHandler ¶
type NetworkHandler interface { LinkByName(name string) (netlink.Link, error) AddrList(link netlink.Link, family int) ([]netlink.Addr, error) ReadIPAddressesFromLink(interfaceName string) (string, string, error) RouteList(link netlink.Link, family int) ([]netlink.Route, error) LinkDel(link netlink.Link) error ParseAddr(s string) (*netlink.Addr, error) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceName string, dhcpOptions *v1.DHCPOptions) error HasIPv4GlobalUnicastAddress(interfaceName string) (bool, error) HasIPv6GlobalUnicastAddress(interfaceName string) (bool, error) IsIpv4Primary() (bool, error) }
type NetworkUtilsHandler ¶
type NetworkUtilsHandler struct{}
func (*NetworkUtilsHandler) HasIPv4GlobalUnicastAddress ¶ added in v0.52.0
func (h *NetworkUtilsHandler) HasIPv4GlobalUnicastAddress(interfaceName string) (bool, error)
func (*NetworkUtilsHandler) HasIPv6GlobalUnicastAddress ¶ added in v0.52.0
func (h *NetworkUtilsHandler) HasIPv6GlobalUnicastAddress(interfaceName string) (bool, error)
func (*NetworkUtilsHandler) IsIpv4Primary ¶
func (h *NetworkUtilsHandler) IsIpv4Primary() (bool, error)
func (*NetworkUtilsHandler) LinkByName ¶
func (h *NetworkUtilsHandler) LinkByName(name string) (netlink.Link, error)
func (*NetworkUtilsHandler) LinkDel ¶ added in v1.0.0
func (h *NetworkUtilsHandler) LinkDel(link netlink.Link) error
func (*NetworkUtilsHandler) ParseAddr ¶
func (h *NetworkUtilsHandler) ParseAddr(s string) (*netlink.Addr, error)
func (*NetworkUtilsHandler) ReadIPAddressesFromLink ¶
func (h *NetworkUtilsHandler) ReadIPAddressesFromLink(interfaceName string) (string, string, error)
func (*NetworkUtilsHandler) StartDHCP ¶
func (h *NetworkUtilsHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceName string, dhcpOptions *v1.DHCPOptions) error
Click to show internal directories.
Click to hide internal directories.