From 8b7d6dc83e79b30ab0305f1dcb094a87b576ab2d Mon Sep 17 00:00:00 2001 From: Yury Kulazhenkov Date: Tue, 16 Jan 2024 09:59:41 +0200 Subject: [PATCH] Generate mock for host.HostManagerInterface interface Signed-off-by: Yury Kulazhenkov --- pkg/host/manager.go | 2 + pkg/host/mock/mock_host.go | 897 +++++++++++++++++++++++++++++++++++++ 2 files changed, 899 insertions(+) create mode 100644 pkg/host/mock/mock_host.go diff --git a/pkg/host/manager.go b/pkg/host/manager.go index 3b0f790e95..3983fa9b6e 100644 --- a/pkg/host/manager.go +++ b/pkg/host/manager.go @@ -11,6 +11,8 @@ import ( ) // Contains all the host manipulation functions +// +//go:generate ../../bin/mockgen -destination mock/mock_host.go -source manager.go type HostManagerInterface interface { types.KernelInterface types.NetworkInterface diff --git a/pkg/host/mock/mock_host.go b/pkg/host/mock/mock_host.go new file mode 100644 index 0000000000..0f61750b31 --- /dev/null +++ b/pkg/host/mock/mock_host.go @@ -0,0 +1,897 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: manager.go + +// Package mock_host is a generated GoMock package. +package mock_host + +import ( + reflect "reflect" + + unit "github.com/coreos/go-systemd/v22/unit" + gomock "github.com/golang/mock/gomock" + ghw "github.com/jaypipes/ghw" + v1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1" + store "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/store" + types "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/types" + netlink "github.com/vishvananda/netlink" +) + +// MockHostManagerInterface is a mock of HostManagerInterface interface. +type MockHostManagerInterface struct { + ctrl *gomock.Controller + recorder *MockHostManagerInterfaceMockRecorder +} + +// MockHostManagerInterfaceMockRecorder is the mock recorder for MockHostManagerInterface. +type MockHostManagerInterfaceMockRecorder struct { + mock *MockHostManagerInterface +} + +// NewMockHostManagerInterface creates a new mock instance. +func NewMockHostManagerInterface(ctrl *gomock.Controller) *MockHostManagerInterface { + mock := &MockHostManagerInterface{ctrl: ctrl} + mock.recorder = &MockHostManagerInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockHostManagerInterface) EXPECT() *MockHostManagerInterfaceMockRecorder { + return m.recorder +} + +// AddUdevRule mocks base method. +func (m *MockHostManagerInterface) AddUdevRule(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddUdevRule", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// AddUdevRule indicates an expected call of AddUdevRule. +func (mr *MockHostManagerInterfaceMockRecorder) AddUdevRule(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUdevRule", reflect.TypeOf((*MockHostManagerInterface)(nil).AddUdevRule), arg0) +} + +// BindDefaultDriver mocks base method. +func (m *MockHostManagerInterface) BindDefaultDriver(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BindDefaultDriver", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// BindDefaultDriver indicates an expected call of BindDefaultDriver. +func (mr *MockHostManagerInterfaceMockRecorder) BindDefaultDriver(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BindDefaultDriver", reflect.TypeOf((*MockHostManagerInterface)(nil).BindDefaultDriver), arg0) +} + +// BindDpdkDriver mocks base method. +func (m *MockHostManagerInterface) BindDpdkDriver(arg0, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BindDpdkDriver", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// BindDpdkDriver indicates an expected call of BindDpdkDriver. +func (mr *MockHostManagerInterfaceMockRecorder) BindDpdkDriver(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BindDpdkDriver", reflect.TypeOf((*MockHostManagerInterface)(nil).BindDpdkDriver), arg0, arg1) +} + +// CompareServices mocks base method. +func (m *MockHostManagerInterface) CompareServices(serviceA, serviceB *types.Service) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CompareServices", serviceA, serviceB) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CompareServices indicates an expected call of CompareServices. +func (mr *MockHostManagerInterfaceMockRecorder) CompareServices(serviceA, serviceB interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompareServices", reflect.TypeOf((*MockHostManagerInterface)(nil).CompareServices), serviceA, serviceB) +} + +// ConfigSriovDevice mocks base method. +func (m *MockHostManagerInterface) ConfigSriovDevice(iface *v1.Interface, ifaceStatus *v1.InterfaceExt) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConfigSriovDevice", iface, ifaceStatus) + ret0, _ := ret[0].(error) + return ret0 +} + +// ConfigSriovDevice indicates an expected call of ConfigSriovDevice. +func (mr *MockHostManagerInterfaceMockRecorder) ConfigSriovDevice(iface, ifaceStatus interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSriovDevice", reflect.TypeOf((*MockHostManagerInterface)(nil).ConfigSriovDevice), iface, ifaceStatus) +} + +// ConfigSriovDeviceVirtual mocks base method. +func (m *MockHostManagerInterface) ConfigSriovDeviceVirtual(iface *v1.Interface) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConfigSriovDeviceVirtual", iface) + ret0, _ := ret[0].(error) + return ret0 +} + +// ConfigSriovDeviceVirtual indicates an expected call of ConfigSriovDeviceVirtual. +func (mr *MockHostManagerInterfaceMockRecorder) ConfigSriovDeviceVirtual(iface interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSriovDeviceVirtual", reflect.TypeOf((*MockHostManagerInterface)(nil).ConfigSriovDeviceVirtual), iface) +} + +// ConfigSriovInterfaces mocks base method. +func (m *MockHostManagerInterface) ConfigSriovInterfaces(arg0 store.StoreManagerInterface, arg1 []v1.Interface, arg2 []v1.InterfaceExt, arg3 map[string]bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConfigSriovInterfaces", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(error) + return ret0 +} + +// ConfigSriovInterfaces indicates an expected call of ConfigSriovInterfaces. +func (mr *MockHostManagerInterfaceMockRecorder) ConfigSriovInterfaces(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigSriovInterfaces", reflect.TypeOf((*MockHostManagerInterface)(nil).ConfigSriovInterfaces), arg0, arg1, arg2, arg3) +} + +// DiscoverSriovDevices mocks base method. +func (m *MockHostManagerInterface) DiscoverSriovDevices(arg0 store.StoreManagerInterface) ([]v1.InterfaceExt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DiscoverSriovDevices", arg0) + ret0, _ := ret[0].([]v1.InterfaceExt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DiscoverSriovDevices indicates an expected call of DiscoverSriovDevices. +func (mr *MockHostManagerInterfaceMockRecorder) DiscoverSriovDevices(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoverSriovDevices", reflect.TypeOf((*MockHostManagerInterface)(nil).DiscoverSriovDevices), arg0) +} + +// EnableRDMA mocks base method. +func (m *MockHostManagerInterface) EnableRDMA(arg0, arg1, arg2 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EnableRDMA", arg0, arg1, arg2) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EnableRDMA indicates an expected call of EnableRDMA. +func (mr *MockHostManagerInterfaceMockRecorder) EnableRDMA(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableRDMA", reflect.TypeOf((*MockHostManagerInterface)(nil).EnableRDMA), arg0, arg1, arg2) +} + +// EnableRDMAOnRHELMachine mocks base method. +func (m *MockHostManagerInterface) EnableRDMAOnRHELMachine() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EnableRDMAOnRHELMachine") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EnableRDMAOnRHELMachine indicates an expected call of EnableRDMAOnRHELMachine. +func (mr *MockHostManagerInterfaceMockRecorder) EnableRDMAOnRHELMachine() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableRDMAOnRHELMachine", reflect.TypeOf((*MockHostManagerInterface)(nil).EnableRDMAOnRHELMachine)) +} + +// EnableService mocks base method. +func (m *MockHostManagerInterface) EnableService(service *types.Service) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EnableService", service) + ret0, _ := ret[0].(error) + return ret0 +} + +// EnableService indicates an expected call of EnableService. +func (mr *MockHostManagerInterfaceMockRecorder) EnableService(service interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableService", reflect.TypeOf((*MockHostManagerInterface)(nil).EnableService), service) +} + +// GetCurrentKernelArgs mocks base method. +func (m *MockHostManagerInterface) GetCurrentKernelArgs() (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCurrentKernelArgs") + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCurrentKernelArgs indicates an expected call of GetCurrentKernelArgs. +func (mr *MockHostManagerInterfaceMockRecorder) GetCurrentKernelArgs() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentKernelArgs", reflect.TypeOf((*MockHostManagerInterface)(nil).GetCurrentKernelArgs)) +} + +// GetLinkType mocks base method. +func (m *MockHostManagerInterface) GetLinkType(arg0 v1.InterfaceExt) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetLinkType", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// GetLinkType indicates an expected call of GetLinkType. +func (mr *MockHostManagerInterfaceMockRecorder) GetLinkType(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLinkType", reflect.TypeOf((*MockHostManagerInterface)(nil).GetLinkType), arg0) +} + +// GetNetDevLinkSpeed mocks base method. +func (m *MockHostManagerInterface) GetNetDevLinkSpeed(arg0 string) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNetDevLinkSpeed", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// GetNetDevLinkSpeed indicates an expected call of GetNetDevLinkSpeed. +func (mr *MockHostManagerInterfaceMockRecorder) GetNetDevLinkSpeed(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetDevLinkSpeed", reflect.TypeOf((*MockHostManagerInterface)(nil).GetNetDevLinkSpeed), arg0) +} + +// GetNetDevMac mocks base method. +func (m *MockHostManagerInterface) GetNetDevMac(arg0 string) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNetDevMac", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// GetNetDevMac indicates an expected call of GetNetDevMac. +func (mr *MockHostManagerInterfaceMockRecorder) GetNetDevMac(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetDevMac", reflect.TypeOf((*MockHostManagerInterface)(nil).GetNetDevMac), arg0) +} + +// GetNetdevMTU mocks base method. +func (m *MockHostManagerInterface) GetNetdevMTU(arg0 string) int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNetdevMTU", arg0) + ret0, _ := ret[0].(int) + return ret0 +} + +// GetNetdevMTU indicates an expected call of GetNetdevMTU. +func (mr *MockHostManagerInterfaceMockRecorder) GetNetdevMTU(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetdevMTU", reflect.TypeOf((*MockHostManagerInterface)(nil).GetNetdevMTU), arg0) +} + +// GetNicSriovMode mocks base method. +func (m *MockHostManagerInterface) GetNicSriovMode(arg0 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNicSriovMode", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetNicSriovMode indicates an expected call of GetNicSriovMode. +func (mr *MockHostManagerInterfaceMockRecorder) GetNicSriovMode(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNicSriovMode", reflect.TypeOf((*MockHostManagerInterface)(nil).GetNicSriovMode), arg0) +} + +// GetOSPrettyName mocks base method. +func (m *MockHostManagerInterface) GetOSPrettyName() (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOSPrettyName") + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOSPrettyName indicates an expected call of GetOSPrettyName. +func (mr *MockHostManagerInterfaceMockRecorder) GetOSPrettyName() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOSPrettyName", reflect.TypeOf((*MockHostManagerInterface)(nil).GetOSPrettyName)) +} + +// GetPhysPortName mocks base method. +func (m *MockHostManagerInterface) GetPhysPortName(arg0 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPhysPortName", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPhysPortName indicates an expected call of GetPhysPortName. +func (mr *MockHostManagerInterfaceMockRecorder) GetPhysPortName(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPhysPortName", reflect.TypeOf((*MockHostManagerInterface)(nil).GetPhysPortName), arg0) +} + +// GetPhysSwitchID mocks base method. +func (m *MockHostManagerInterface) GetPhysSwitchID(arg0 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPhysSwitchID", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPhysSwitchID indicates an expected call of GetPhysSwitchID. +func (mr *MockHostManagerInterfaceMockRecorder) GetPhysSwitchID(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPhysSwitchID", reflect.TypeOf((*MockHostManagerInterface)(nil).GetPhysSwitchID), arg0) +} + +// GetVfInfo mocks base method. +func (m *MockHostManagerInterface) GetVfInfo(arg0 string, arg1 []*ghw.PCIDevice) v1.VirtualFunction { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVfInfo", arg0, arg1) + ret0, _ := ret[0].(v1.VirtualFunction) + return ret0 +} + +// GetVfInfo indicates an expected call of GetVfInfo. +func (mr *MockHostManagerInterfaceMockRecorder) GetVfInfo(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVfInfo", reflect.TypeOf((*MockHostManagerInterface)(nil).GetVfInfo), arg0, arg1) +} + +// HasDriver mocks base method. +func (m *MockHostManagerInterface) HasDriver(arg0 string) (bool, string) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HasDriver", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(string) + return ret0, ret1 +} + +// HasDriver indicates an expected call of HasDriver. +func (mr *MockHostManagerInterfaceMockRecorder) HasDriver(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasDriver", reflect.TypeOf((*MockHostManagerInterface)(nil).HasDriver), arg0) +} + +// InstallRDMA mocks base method. +func (m *MockHostManagerInterface) InstallRDMA(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "InstallRDMA", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// InstallRDMA indicates an expected call of InstallRDMA. +func (mr *MockHostManagerInterfaceMockRecorder) InstallRDMA(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallRDMA", reflect.TypeOf((*MockHostManagerInterface)(nil).InstallRDMA), arg0) +} + +// IsCoreOS mocks base method. +func (m *MockHostManagerInterface) IsCoreOS() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsCoreOS") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsCoreOS indicates an expected call of IsCoreOS. +func (mr *MockHostManagerInterfaceMockRecorder) IsCoreOS() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCoreOS", reflect.TypeOf((*MockHostManagerInterface)(nil).IsCoreOS)) +} + +// IsKernelArgsSet mocks base method. +func (m *MockHostManagerInterface) IsKernelArgsSet(arg0, arg1 string) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsKernelArgsSet", arg0, arg1) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsKernelArgsSet indicates an expected call of IsKernelArgsSet. +func (mr *MockHostManagerInterfaceMockRecorder) IsKernelArgsSet(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsKernelArgsSet", reflect.TypeOf((*MockHostManagerInterface)(nil).IsKernelArgsSet), arg0, arg1) +} + +// IsKernelLockdownMode mocks base method. +func (m *MockHostManagerInterface) IsKernelLockdownMode() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsKernelLockdownMode") + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsKernelLockdownMode indicates an expected call of IsKernelLockdownMode. +func (mr *MockHostManagerInterfaceMockRecorder) IsKernelLockdownMode() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsKernelLockdownMode", reflect.TypeOf((*MockHostManagerInterface)(nil).IsKernelLockdownMode)) +} + +// IsKernelModuleLoaded mocks base method. +func (m *MockHostManagerInterface) IsKernelModuleLoaded(arg0 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsKernelModuleLoaded", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsKernelModuleLoaded indicates an expected call of IsKernelModuleLoaded. +func (mr *MockHostManagerInterfaceMockRecorder) IsKernelModuleLoaded(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsKernelModuleLoaded", reflect.TypeOf((*MockHostManagerInterface)(nil).IsKernelModuleLoaded), arg0) +} + +// IsRHELSystem mocks base method. +func (m *MockHostManagerInterface) IsRHELSystem() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsRHELSystem") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsRHELSystem indicates an expected call of IsRHELSystem. +func (mr *MockHostManagerInterfaceMockRecorder) IsRHELSystem() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRHELSystem", reflect.TypeOf((*MockHostManagerInterface)(nil).IsRHELSystem)) +} + +// IsServiceEnabled mocks base method. +func (m *MockHostManagerInterface) IsServiceEnabled(arg0 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsServiceEnabled", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsServiceEnabled indicates an expected call of IsServiceEnabled. +func (mr *MockHostManagerInterfaceMockRecorder) IsServiceEnabled(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsServiceEnabled", reflect.TypeOf((*MockHostManagerInterface)(nil).IsServiceEnabled), arg0) +} + +// IsServiceExist mocks base method. +func (m *MockHostManagerInterface) IsServiceExist(arg0 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsServiceExist", arg0) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsServiceExist indicates an expected call of IsServiceExist. +func (mr *MockHostManagerInterfaceMockRecorder) IsServiceExist(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsServiceExist", reflect.TypeOf((*MockHostManagerInterface)(nil).IsServiceExist), arg0) +} + +// IsSwitchdev mocks base method. +func (m *MockHostManagerInterface) IsSwitchdev(arg0 string) bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsSwitchdev", arg0) + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsSwitchdev indicates an expected call of IsSwitchdev. +func (mr *MockHostManagerInterfaceMockRecorder) IsSwitchdev(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSwitchdev", reflect.TypeOf((*MockHostManagerInterface)(nil).IsSwitchdev), arg0) +} + +// IsUbuntuSystem mocks base method. +func (m *MockHostManagerInterface) IsUbuntuSystem() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsUbuntuSystem") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsUbuntuSystem indicates an expected call of IsUbuntuSystem. +func (mr *MockHostManagerInterfaceMockRecorder) IsUbuntuSystem() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUbuntuSystem", reflect.TypeOf((*MockHostManagerInterface)(nil).IsUbuntuSystem)) +} + +// LoadKernelModule mocks base method. +func (m *MockHostManagerInterface) LoadKernelModule(name string, args ...string) error { + m.ctrl.T.Helper() + varargs := []interface{}{name} + for _, a := range args { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "LoadKernelModule", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// LoadKernelModule indicates an expected call of LoadKernelModule. +func (mr *MockHostManagerInterfaceMockRecorder) LoadKernelModule(name interface{}, args ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{name}, args...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadKernelModule", reflect.TypeOf((*MockHostManagerInterface)(nil).LoadKernelModule), varargs...) +} + +// PrepareNMUdevRule mocks base method. +func (m *MockHostManagerInterface) PrepareNMUdevRule(arg0 []string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PrepareNMUdevRule", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// PrepareNMUdevRule indicates an expected call of PrepareNMUdevRule. +func (mr *MockHostManagerInterfaceMockRecorder) PrepareNMUdevRule(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareNMUdevRule", reflect.TypeOf((*MockHostManagerInterface)(nil).PrepareNMUdevRule), arg0) +} + +// RdmaIsLoaded mocks base method. +func (m *MockHostManagerInterface) RdmaIsLoaded() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RdmaIsLoaded") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RdmaIsLoaded indicates an expected call of RdmaIsLoaded. +func (mr *MockHostManagerInterfaceMockRecorder) RdmaIsLoaded() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RdmaIsLoaded", reflect.TypeOf((*MockHostManagerInterface)(nil).RdmaIsLoaded)) +} + +// ReadScriptManifestFile mocks base method. +func (m *MockHostManagerInterface) ReadScriptManifestFile(path string) (*types.ScriptManifestFile, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadScriptManifestFile", path) + ret0, _ := ret[0].(*types.ScriptManifestFile) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadScriptManifestFile indicates an expected call of ReadScriptManifestFile. +func (mr *MockHostManagerInterfaceMockRecorder) ReadScriptManifestFile(path interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadScriptManifestFile", reflect.TypeOf((*MockHostManagerInterface)(nil).ReadScriptManifestFile), path) +} + +// ReadService mocks base method. +func (m *MockHostManagerInterface) ReadService(arg0 string) (*types.Service, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadService", arg0) + ret0, _ := ret[0].(*types.Service) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadService indicates an expected call of ReadService. +func (mr *MockHostManagerInterfaceMockRecorder) ReadService(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadService", reflect.TypeOf((*MockHostManagerInterface)(nil).ReadService), arg0) +} + +// ReadServiceInjectionManifestFile mocks base method. +func (m *MockHostManagerInterface) ReadServiceInjectionManifestFile(path string) (*types.Service, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadServiceInjectionManifestFile", path) + ret0, _ := ret[0].(*types.Service) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadServiceInjectionManifestFile indicates an expected call of ReadServiceInjectionManifestFile. +func (mr *MockHostManagerInterfaceMockRecorder) ReadServiceInjectionManifestFile(path interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadServiceInjectionManifestFile", reflect.TypeOf((*MockHostManagerInterface)(nil).ReadServiceInjectionManifestFile), path) +} + +// ReadServiceManifestFile mocks base method. +func (m *MockHostManagerInterface) ReadServiceManifestFile(path string) (*types.Service, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadServiceManifestFile", path) + ret0, _ := ret[0].(*types.Service) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadServiceManifestFile indicates an expected call of ReadServiceManifestFile. +func (mr *MockHostManagerInterfaceMockRecorder) ReadServiceManifestFile(path interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadServiceManifestFile", reflect.TypeOf((*MockHostManagerInterface)(nil).ReadServiceManifestFile), path) +} + +// RebindVfToDefaultDriver mocks base method. +func (m *MockHostManagerInterface) RebindVfToDefaultDriver(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RebindVfToDefaultDriver", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// RebindVfToDefaultDriver indicates an expected call of RebindVfToDefaultDriver. +func (mr *MockHostManagerInterfaceMockRecorder) RebindVfToDefaultDriver(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebindVfToDefaultDriver", reflect.TypeOf((*MockHostManagerInterface)(nil).RebindVfToDefaultDriver), arg0) +} + +// ReloadDriver mocks base method. +func (m *MockHostManagerInterface) ReloadDriver(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReloadDriver", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// ReloadDriver indicates an expected call of ReloadDriver. +func (mr *MockHostManagerInterfaceMockRecorder) ReloadDriver(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadDriver", reflect.TypeOf((*MockHostManagerInterface)(nil).ReloadDriver), arg0) +} + +// RemoveFromService mocks base method. +func (m *MockHostManagerInterface) RemoveFromService(service *types.Service, options ...*unit.UnitOption) (*types.Service, error) { + m.ctrl.T.Helper() + varargs := []interface{}{service} + for _, a := range options { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "RemoveFromService", varargs...) + ret0, _ := ret[0].(*types.Service) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RemoveFromService indicates an expected call of RemoveFromService. +func (mr *MockHostManagerInterfaceMockRecorder) RemoveFromService(service interface{}, options ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{service}, options...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveFromService", reflect.TypeOf((*MockHostManagerInterface)(nil).RemoveFromService), varargs...) +} + +// RemoveUdevRule mocks base method. +func (m *MockHostManagerInterface) RemoveUdevRule(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RemoveUdevRule", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// RemoveUdevRule indicates an expected call of RemoveUdevRule. +func (mr *MockHostManagerInterfaceMockRecorder) RemoveUdevRule(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUdevRule", reflect.TypeOf((*MockHostManagerInterface)(nil).RemoveUdevRule), arg0) +} + +// ResetSriovDevice mocks base method. +func (m *MockHostManagerInterface) ResetSriovDevice(arg0 v1.InterfaceExt) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ResetSriovDevice", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// ResetSriovDevice indicates an expected call of ResetSriovDevice. +func (mr *MockHostManagerInterfaceMockRecorder) ResetSriovDevice(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetSriovDevice", reflect.TypeOf((*MockHostManagerInterface)(nil).ResetSriovDevice), arg0) +} + +// SetNetdevMTU mocks base method. +func (m *MockHostManagerInterface) SetNetdevMTU(arg0 string, arg1 int) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetNetdevMTU", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetNetdevMTU indicates an expected call of SetNetdevMTU. +func (mr *MockHostManagerInterfaceMockRecorder) SetNetdevMTU(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNetdevMTU", reflect.TypeOf((*MockHostManagerInterface)(nil).SetNetdevMTU), arg0, arg1) +} + +// SetSriovNumVfs mocks base method. +func (m *MockHostManagerInterface) SetSriovNumVfs(arg0 string, arg1 int) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetSriovNumVfs", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetSriovNumVfs indicates an expected call of SetSriovNumVfs. +func (mr *MockHostManagerInterfaceMockRecorder) SetSriovNumVfs(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSriovNumVfs", reflect.TypeOf((*MockHostManagerInterface)(nil).SetSriovNumVfs), arg0, arg1) +} + +// SetVfAdminMac mocks base method. +func (m *MockHostManagerInterface) SetVfAdminMac(arg0 string, arg1, arg2 netlink.Link) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetVfAdminMac", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetVfAdminMac indicates an expected call of SetVfAdminMac. +func (mr *MockHostManagerInterfaceMockRecorder) SetVfAdminMac(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVfAdminMac", reflect.TypeOf((*MockHostManagerInterface)(nil).SetVfAdminMac), arg0, arg1, arg2) +} + +// SetVfGUID mocks base method. +func (m *MockHostManagerInterface) SetVfGUID(arg0 string, arg1 netlink.Link) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SetVfGUID", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SetVfGUID indicates an expected call of SetVfGUID. +func (mr *MockHostManagerInterfaceMockRecorder) SetVfGUID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVfGUID", reflect.TypeOf((*MockHostManagerInterface)(nil).SetVfGUID), arg0, arg1) +} + +// TriggerUdevEvent mocks base method. +func (m *MockHostManagerInterface) TriggerUdevEvent() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TriggerUdevEvent") + ret0, _ := ret[0].(error) + return ret0 +} + +// TriggerUdevEvent indicates an expected call of TriggerUdevEvent. +func (mr *MockHostManagerInterfaceMockRecorder) TriggerUdevEvent() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TriggerUdevEvent", reflect.TypeOf((*MockHostManagerInterface)(nil).TriggerUdevEvent)) +} + +// TryEnableRdma mocks base method. +func (m *MockHostManagerInterface) TryEnableRdma() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TryEnableRdma") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TryEnableRdma indicates an expected call of TryEnableRdma. +func (mr *MockHostManagerInterfaceMockRecorder) TryEnableRdma() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryEnableRdma", reflect.TypeOf((*MockHostManagerInterface)(nil).TryEnableRdma)) +} + +// TryEnableTun mocks base method. +func (m *MockHostManagerInterface) TryEnableTun() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "TryEnableTun") +} + +// TryEnableTun indicates an expected call of TryEnableTun. +func (mr *MockHostManagerInterfaceMockRecorder) TryEnableTun() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryEnableTun", reflect.TypeOf((*MockHostManagerInterface)(nil).TryEnableTun)) +} + +// TryEnableVhostNet mocks base method. +func (m *MockHostManagerInterface) TryEnableVhostNet() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "TryEnableVhostNet") +} + +// TryEnableVhostNet indicates an expected call of TryEnableVhostNet. +func (mr *MockHostManagerInterfaceMockRecorder) TryEnableVhostNet() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryEnableVhostNet", reflect.TypeOf((*MockHostManagerInterface)(nil).TryEnableVhostNet)) +} + +// TryGetInterfaceName mocks base method. +func (m *MockHostManagerInterface) TryGetInterfaceName(arg0 string) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TryGetInterfaceName", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// TryGetInterfaceName indicates an expected call of TryGetInterfaceName. +func (mr *MockHostManagerInterfaceMockRecorder) TryGetInterfaceName(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryGetInterfaceName", reflect.TypeOf((*MockHostManagerInterface)(nil).TryGetInterfaceName), arg0) +} + +// TryToGetVirtualInterfaceName mocks base method. +func (m *MockHostManagerInterface) TryToGetVirtualInterfaceName(arg0 string) string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TryToGetVirtualInterfaceName", arg0) + ret0, _ := ret[0].(string) + return ret0 +} + +// TryToGetVirtualInterfaceName indicates an expected call of TryToGetVirtualInterfaceName. +func (mr *MockHostManagerInterfaceMockRecorder) TryToGetVirtualInterfaceName(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryToGetVirtualInterfaceName", reflect.TypeOf((*MockHostManagerInterface)(nil).TryToGetVirtualInterfaceName), arg0) +} + +// Unbind mocks base method. +func (m *MockHostManagerInterface) Unbind(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Unbind", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Unbind indicates an expected call of Unbind. +func (mr *MockHostManagerInterfaceMockRecorder) Unbind(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unbind", reflect.TypeOf((*MockHostManagerInterface)(nil).Unbind), arg0) +} + +// UnbindDriverIfNeeded mocks base method. +func (m *MockHostManagerInterface) UnbindDriverIfNeeded(arg0 string, arg1 bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnbindDriverIfNeeded", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// UnbindDriverIfNeeded indicates an expected call of UnbindDriverIfNeeded. +func (mr *MockHostManagerInterfaceMockRecorder) UnbindDriverIfNeeded(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnbindDriverIfNeeded", reflect.TypeOf((*MockHostManagerInterface)(nil).UnbindDriverIfNeeded), arg0, arg1) +} + +// UpdateSystemService mocks base method. +func (m *MockHostManagerInterface) UpdateSystemService(serviceObj *types.Service) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateSystemService", serviceObj) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateSystemService indicates an expected call of UpdateSystemService. +func (mr *MockHostManagerInterfaceMockRecorder) UpdateSystemService(serviceObj interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSystemService", reflect.TypeOf((*MockHostManagerInterface)(nil).UpdateSystemService), serviceObj) +} + +// VFIsReady mocks base method. +func (m *MockHostManagerInterface) VFIsReady(arg0 string) (netlink.Link, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VFIsReady", arg0) + ret0, _ := ret[0].(netlink.Link) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VFIsReady indicates an expected call of VFIsReady. +func (mr *MockHostManagerInterfaceMockRecorder) VFIsReady(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VFIsReady", reflect.TypeOf((*MockHostManagerInterface)(nil).VFIsReady), arg0) +} + +// WriteSwitchdevConfFile mocks base method. +func (m *MockHostManagerInterface) WriteSwitchdevConfFile(arg0 *v1.SriovNetworkNodeState, arg1 map[string]bool) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WriteSwitchdevConfFile", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WriteSwitchdevConfFile indicates an expected call of WriteSwitchdevConfFile. +func (mr *MockHostManagerInterfaceMockRecorder) WriteSwitchdevConfFile(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSwitchdevConfFile", reflect.TypeOf((*MockHostManagerInterface)(nil).WriteSwitchdevConfFile), arg0, arg1) +}