Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupNetworkFakeHelper ¶
func SetupNetworkFakeHelper()
func SetupNetworkHelper ¶
func SetupNetworkHelper()
Types ¶
type NetworkUtils ¶
type NetworkUtils struct { }
func (NetworkUtils) CleanupNicNetwork ¶
func (n NetworkUtils) CleanupNicNetwork(nic *rpc.HostNic) error
After the Response is uninstalled, the relevant routes are cleared, so you only need to delete the rule.
func (NetworkUtils) IsNSorErr ¶
func (n NetworkUtils) IsNSorErr(nspath string) error
func (NetworkUtils) LinkByMacAddr ¶
func (n NetworkUtils) LinkByMacAddr(macAddr string) (netlink.Link, error)
should check result, maybe empty
func (NetworkUtils) SetupNicNetwork ¶
func (n NetworkUtils) SetupNicNetwork(nic *rpc.HostNic) error
Note: setup NetworkManager to disable dhcp on nic SetupNicNetwork adds default route to route table (nic-<nic_table>)
type NetworkUtilsFake ¶
type NetworkUtilsFake struct { Links map[string]netlink.Link Rules map[string]netlink.Rule Routes map[int][]netlink.Route }
func (NetworkUtilsFake) CleanupNicNetwork ¶
func (n NetworkUtilsFake) CleanupNicNetwork(nic *rpc.HostNic) error
func (NetworkUtilsFake) IsNSorErr ¶
func (n NetworkUtilsFake) IsNSorErr(nspath string) error
func (NetworkUtilsFake) LinkByMacAddr ¶
func (n NetworkUtilsFake) LinkByMacAddr(macAddr string) (netlink.Link, error)
func (NetworkUtilsFake) SetupNicNetwork ¶
func (n NetworkUtilsFake) SetupNicNetwork(nic *rpc.HostNic) error
Click to show internal directories.
Click to hide internal directories.