mocks

package
v0.0.0-...-e0f77fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSOps

type DNSOps struct {
	mock.Mock
}

DNSOps is an autogenerated mock type for the DNSOps type

func NewDNSOps

func NewDNSOps(t interface {
	mock.TestingT
	Cleanup(func())
}) *DNSOps

NewDNSOps creates a new instance of DNSOps. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*DNSOps) ClientConfigFromFile

func (_m *DNSOps) ClientConfigFromFile(resolvconf string) (*dns.ClientConfig, error)

ClientConfigFromFile provides a mock function with given fields: resolvconf

func (*DNSOps) Exchange

func (_m *DNSOps) Exchange(c *dns.Client, m *dns.Msg, a string) (*dns.Msg, time.Duration, error)

Exchange provides a mock function with given fields: c, m, a

func (*DNSOps) Fqdn

func (_m *DNSOps) Fqdn(s string) string

Fqdn provides a mock function with given fields: s

func (*DNSOps) SetQuestion

func (_m *DNSOps) SetQuestion(msg *dns.Msg, z string, t uint16) *dns.Msg

SetQuestion provides a mock function with given fields: msg, z, t

type ExecRunner

type ExecRunner struct {
	mock.Mock
}

ExecRunner is an autogenerated mock type for the ExecRunner type

func NewExecRunner

func NewExecRunner(t interface {
	mock.TestingT
	Cleanup(func())
}) *ExecRunner

NewExecRunner creates a new instance of ExecRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ExecRunner) RunCmd

func (_m *ExecRunner) RunCmd(cmd exec.Cmd, cmdPath string, envVars []string, args ...string) (*bytes.Buffer, *bytes.Buffer, error)

RunCmd provides a mock function with given fields: cmd, cmdPath, envVars, args

type FileSystemOps

type FileSystemOps struct {
	mock.Mock
}

FileSystemOps is an autogenerated mock type for the FileSystemOps type

func NewFileSystemOps

func NewFileSystemOps(t interface {
	mock.TestingT
	Cleanup(func())
}) *FileSystemOps

NewFileSystemOps creates a new instance of FileSystemOps. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (_m *FileSystemOps) Readlink(path string) (string, error)

Readlink provides a mock function with given fields: path

type NetLinkOps

type NetLinkOps struct {
	mock.Mock
}

NetLinkOps is an autogenerated mock type for the NetLinkOps type

func NewNetLinkOps

func NewNetLinkOps(t interface {
	mock.TestingT
	Cleanup(func())
}) *NetLinkOps

NewNetLinkOps creates a new instance of NetLinkOps. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NetLinkOps) AddrAdd

func (_m *NetLinkOps) AddrAdd(link netlink.Link, addr *netlink.Addr) error

AddrAdd provides a mock function with given fields: link, addr

func (*NetLinkOps) AddrDel

func (_m *NetLinkOps) AddrDel(link netlink.Link, addr *netlink.Addr) error

AddrDel provides a mock function with given fields: link, addr

func (*NetLinkOps) AddrList

func (_m *NetLinkOps) AddrList(link netlink.Link, family int) ([]netlink.Addr, error)

AddrList provides a mock function with given fields: link, family

func (*NetLinkOps) ConntrackDeleteFilter

func (_m *NetLinkOps) ConntrackDeleteFilter(table netlink.ConntrackTableType, family netlink.InetFamily, filter netlink.CustomConntrackFilter) (uint, error)

ConntrackDeleteFilter provides a mock function with given fields: table, family, filter

func (*NetLinkOps) IsLinkNotFoundError

func (_m *NetLinkOps) IsLinkNotFoundError(err error) bool

IsLinkNotFoundError provides a mock function with given fields: err

func (*NetLinkOps) LinkAdd

func (_m *NetLinkOps) LinkAdd(link netlink.Link) error

LinkAdd provides a mock function with given fields: link

func (*NetLinkOps) LinkByIndex

func (_m *NetLinkOps) LinkByIndex(index int) (netlink.Link, error)

LinkByIndex provides a mock function with given fields: index

func (*NetLinkOps) LinkByName

func (_m *NetLinkOps) LinkByName(ifaceName string) (netlink.Link, error)

LinkByName provides a mock function with given fields: ifaceName

func (*NetLinkOps) LinkDelete

func (_m *NetLinkOps) LinkDelete(link netlink.Link) error

LinkDelete provides a mock function with given fields: link

func (_m *NetLinkOps) LinkList() ([]netlink.Link, error)

LinkList provides a mock function with given fields:

func (*NetLinkOps) LinkSetDown

func (_m *NetLinkOps) LinkSetDown(link netlink.Link) error

LinkSetDown provides a mock function with given fields: link

func (*NetLinkOps) LinkSetHardwareAddr

func (_m *NetLinkOps) LinkSetHardwareAddr(link netlink.Link, hwaddr net.HardwareAddr) error

LinkSetHardwareAddr provides a mock function with given fields: link, hwaddr

func (*NetLinkOps) LinkSetMTU

func (_m *NetLinkOps) LinkSetMTU(link netlink.Link, mtu int) error

LinkSetMTU provides a mock function with given fields: link, mtu

func (*NetLinkOps) LinkSetMaster

func (_m *NetLinkOps) LinkSetMaster(link netlink.Link, master netlink.Link) error

LinkSetMaster provides a mock function with given fields: link, master

func (*NetLinkOps) LinkSetName

func (_m *NetLinkOps) LinkSetName(link netlink.Link, newName string) error

LinkSetName provides a mock function with given fields: link, newName

func (*NetLinkOps) LinkSetNoMaster

func (_m *NetLinkOps) LinkSetNoMaster(link netlink.Link) error

LinkSetNoMaster provides a mock function with given fields: link

func (*NetLinkOps) LinkSetNsFd

func (_m *NetLinkOps) LinkSetNsFd(link netlink.Link, fd int) error

LinkSetNsFd provides a mock function with given fields: link, fd

func (*NetLinkOps) LinkSetTxQLen

func (_m *NetLinkOps) LinkSetTxQLen(link netlink.Link, qlen int) error

LinkSetTxQLen provides a mock function with given fields: link, qlen

func (*NetLinkOps) LinkSetUp

func (_m *NetLinkOps) LinkSetUp(link netlink.Link) error

LinkSetUp provides a mock function with given fields: link

func (*NetLinkOps) LinkSetVfHardwareAddr

func (_m *NetLinkOps) LinkSetVfHardwareAddr(pfLink netlink.Link, vfIndex int, hwaddr net.HardwareAddr) error

LinkSetVfHardwareAddr provides a mock function with given fields: pfLink, vfIndex, hwaddr

func (*NetLinkOps) NeighAdd

func (_m *NetLinkOps) NeighAdd(neigh *netlink.Neigh) error

NeighAdd provides a mock function with given fields: neigh

func (*NetLinkOps) NeighDel

func (_m *NetLinkOps) NeighDel(neigh *netlink.Neigh) error

NeighDel provides a mock function with given fields: neigh

func (*NetLinkOps) NeighList

func (_m *NetLinkOps) NeighList(linkIndex int, family int) ([]netlink.Neigh, error)

NeighList provides a mock function with given fields: linkIndex, family

func (*NetLinkOps) RouteAdd

func (_m *NetLinkOps) RouteAdd(route *netlink.Route) error

RouteAdd provides a mock function with given fields: route

func (*NetLinkOps) RouteDel

func (_m *NetLinkOps) RouteDel(route *netlink.Route) error

RouteDel provides a mock function with given fields: route

func (*NetLinkOps) RouteList

func (_m *NetLinkOps) RouteList(link netlink.Link, family int) ([]netlink.Route, error)

RouteList provides a mock function with given fields: link, family

func (*NetLinkOps) RouteListFiltered

func (_m *NetLinkOps) RouteListFiltered(family int, filter *netlink.Route, filterMask uint64) ([]netlink.Route, error)

RouteListFiltered provides a mock function with given fields: family, filter, filterMask

func (*NetLinkOps) RouteReplace

func (_m *NetLinkOps) RouteReplace(route *netlink.Route) error

RouteReplace provides a mock function with given fields: route

func (*NetLinkOps) RuleListFiltered

func (_m *NetLinkOps) RuleListFiltered(family int, filter *netlink.Rule, filterMask uint64) ([]netlink.Rule, error)

RuleListFiltered provides a mock function with given fields: family, filter, filterMask

type SriovnetOps

type SriovnetOps struct {
	mock.Mock
}

SriovnetOps is an autogenerated mock type for the SriovnetOps type

func NewSriovnetOps

func NewSriovnetOps(t interface {
	mock.TestingT
	Cleanup(func())
}) *SriovnetOps

NewSriovnetOps creates a new instance of SriovnetOps. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SriovnetOps) GetNetDevicesFromAux

func (_m *SriovnetOps) GetNetDevicesFromAux(auxDev string) ([]string, error)

GetNetDevicesFromAux provides a mock function with given fields: auxDev

func (*SriovnetOps) GetNetDevicesFromPci

func (_m *SriovnetOps) GetNetDevicesFromPci(pciAddress string) ([]string, error)

GetNetDevicesFromPci provides a mock function with given fields: pciAddress

func (*SriovnetOps) GetPCIFromDeviceName

func (_m *SriovnetOps) GetPCIFromDeviceName(netdevName string) (string, error)

GetPCIFromDeviceName provides a mock function with given fields: netdevName

func (*SriovnetOps) GetPciFromNetDevice

func (_m *SriovnetOps) GetPciFromNetDevice(name string) (string, error)

GetPciFromNetDevice provides a mock function with given fields: name

func (*SriovnetOps) GetPfIndexByVfPciAddress

func (_m *SriovnetOps) GetPfIndexByVfPciAddress(vfPciAddress string) (int, error)

GetPfIndexByVfPciAddress provides a mock function with given fields: vfPciAddress

func (*SriovnetOps) GetPfPciFromAux

func (_m *SriovnetOps) GetPfPciFromAux(auxDev string) (string, error)

GetPfPciFromAux provides a mock function with given fields: auxDev

func (*SriovnetOps) GetPfPciFromVfPci

func (_m *SriovnetOps) GetPfPciFromVfPci(vfPciAddress string) (string, error)

GetPfPciFromVfPci provides a mock function with given fields: vfPciAddress

func (*SriovnetOps) GetPortIndexFromRepresentor

func (_m *SriovnetOps) GetPortIndexFromRepresentor(name string) (int, error)

GetPortIndexFromRepresentor provides a mock function with given fields: name

func (*SriovnetOps) GetRepresentorPeerMacAddress

func (_m *SriovnetOps) GetRepresentorPeerMacAddress(netdev string) (net.HardwareAddr, error)

GetRepresentorPeerMacAddress provides a mock function with given fields: netdev

func (*SriovnetOps) GetRepresentorPortFlavour

func (_m *SriovnetOps) GetRepresentorPortFlavour(netdev string) (sriovnet.PortFlavour, error)

GetRepresentorPortFlavour provides a mock function with given fields: netdev

func (*SriovnetOps) GetSfIndexByAuxDev

func (_m *SriovnetOps) GetSfIndexByAuxDev(auxDev string) (int, error)

GetSfIndexByAuxDev provides a mock function with given fields: auxDev

func (*SriovnetOps) GetSfRepresentor

func (_m *SriovnetOps) GetSfRepresentor(uplink string, sfIndex int) (string, error)

GetSfRepresentor provides a mock function with given fields: uplink, sfIndex

func (*SriovnetOps) GetUplinkRepresentor

func (_m *SriovnetOps) GetUplinkRepresentor(vfPciAddress string) (string, error)

GetUplinkRepresentor provides a mock function with given fields: vfPciAddress

func (*SriovnetOps) GetUplinkRepresentorFromAux

func (_m *SriovnetOps) GetUplinkRepresentorFromAux(auxDev string) (string, error)

GetUplinkRepresentorFromAux provides a mock function with given fields: auxDev

func (*SriovnetOps) GetVfIndexByPciAddress

func (_m *SriovnetOps) GetVfIndexByPciAddress(vfPciAddress string) (int, error)

GetVfIndexByPciAddress provides a mock function with given fields: vfPciAddress

func (*SriovnetOps) GetVfRepresentor

func (_m *SriovnetOps) GetVfRepresentor(uplink string, vfIndex int) (string, error)

GetVfRepresentor provides a mock function with given fields: uplink, vfIndex

func (*SriovnetOps) GetVfRepresentorDPU

func (_m *SriovnetOps) GetVfRepresentorDPU(pfID string, vfIndex string) (string, error)

GetVfRepresentorDPU provides a mock function with given fields: pfID, vfIndex

func (*SriovnetOps) IsVfPciVfioBound

func (_m *SriovnetOps) IsVfPciVfioBound(pciAddr string) bool

IsVfPciVfioBound provides a mock function with given fields: pciAddr

type VdpaDevice

type VdpaDevice struct {
	mock.Mock
}

VdpaDevice is an autogenerated mock type for the VdpaDevice type

func NewVdpaDevice

func NewVdpaDevice(t interface {
	mock.TestingT
	Cleanup(func())
}) *VdpaDevice

NewVdpaDevice creates a new instance of VdpaDevice. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*VdpaDevice) Driver

func (_m *VdpaDevice) Driver() string

Driver provides a mock function with given fields:

func (*VdpaDevice) MgmtDev

func (_m *VdpaDevice) MgmtDev() kvdpa.MgmtDev

MgmtDev provides a mock function with given fields:

func (*VdpaDevice) Name

func (_m *VdpaDevice) Name() string

Name provides a mock function with given fields:

func (*VdpaDevice) ParentDevicePath

func (_m *VdpaDevice) ParentDevicePath() (string, error)

ParentDevicePath provides a mock function with given fields:

func (*VdpaDevice) VhostVdpa

func (_m *VdpaDevice) VhostVdpa() kvdpa.VhostVdpa

VhostVdpa provides a mock function with given fields:

func (*VdpaDevice) VirtioNet

func (_m *VdpaDevice) VirtioNet() kvdpa.VirtioNet

VirtioNet provides a mock function with given fields:

type VdpaOps

type VdpaOps struct {
	mock.Mock
}

VdpaOps is an autogenerated mock type for the VdpaOps type

func NewVdpaOps

func NewVdpaOps(t interface {
	mock.TestingT
	Cleanup(func())
}) *VdpaOps

NewVdpaOps creates a new instance of VdpaOps. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*VdpaOps) GetVdpaDeviceByPci

func (_m *VdpaOps) GetVdpaDeviceByPci(pciAddress string) (kvdpa.VdpaDevice, error)

GetVdpaDeviceByPci provides a mock function with given fields: pciAddress

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL