Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetNetlinkOps ¶
func SetNetlinkOps(nlops NetlinkOps)
SetNetlinkOps sets NetlinkOps interface (to be used by unit tests)
Types ¶
type NetlinkOps ¶
type NetlinkOps interface { // LinkByName gets link by netdev name LinkByName(name string) (netlink.Link, error) // LinkSetUp sets Link state to up LinkSetUp(link netlink.Link) error // LinkSetVfHardwareAddr sets VF hardware address LinkSetVfHardwareAddr(link netlink.Link, vf int, hwaddr net.HardwareAddr) error // LinkSetVfVlan sets VF vlan LinkSetVfVlan(link netlink.Link, vf, vlan int) error // LinkSetVfNodeGUID sets VF Node GUID LinkSetVfNodeGUID(link netlink.Link, vf int, nodeguid net.HardwareAddr) error // LinkSetVfPortGUID sets VF Port GUID LinkSetVfPortGUID(link netlink.Link, vf int, portguid net.HardwareAddr) error // LinkSetVfTrust sets VF trust for the given VF LinkSetVfTrust(link netlink.Link, vf int, state bool) error // LinkSetVfSpoofchk sets VF spoofchk for the given VF LinkSetVfSpoofchk(link netlink.Link, vf int, check bool) error // DevLinkGetAllPortList gets all devlink ports DevLinkGetAllPortList() ([]*netlink.DevlinkPort, error) // DevLinkGetPortByNetdevName gets devlink port by netdev name DevLinkGetPortByNetdevName(netdev string) (*netlink.DevlinkPort, error) }
NetlinkOps is an interface wrapping netlink to be used by sriovnet
Click to show internal directories.
Click to hide internal directories.