From 781428bac1bb1894a00c89c159d29999cd8fcce8 Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Tue, 18 Oct 2022 11:41:23 +0200 Subject: [PATCH 1/4] Add method CreateGpuInstance to nvml.Device type --- pkg/nvml/device.go | 6 ++++++ pkg/nvml/types.go | 1 + 2 files changed, 7 insertions(+) diff --git a/pkg/nvml/device.go b/pkg/nvml/device.go index 3901bb7..35513d3 100644 --- a/pkg/nvml/device.go +++ b/pkg/nvml/device.go @@ -22,6 +22,12 @@ type nvmlDevice nvml.Device var _ Device = (*nvmlDevice)(nil) +// CreateGpuInstance creates a GPU instance matching the provided GpuInstanceProfileInfo. +func (d nvmlDevice) CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance, Return) { + gpuInstance, r := nvml.Device(d).CreateGpuInstance((*nvml.GpuInstanceProfileInfo)(Info)) + return nvmlGpuInstance(gpuInstance), Return(r) +} + // GetIndex returns the index of a Device func (d nvmlDevice) GetIndex() (int, Return) { i, r := nvml.Device(d).GetIndex() diff --git a/pkg/nvml/types.go b/pkg/nvml/types.go index ecbe4e6..cb49d48 100644 --- a/pkg/nvml/types.go +++ b/pkg/nvml/types.go @@ -62,6 +62,7 @@ type Device interface { GetNvLinkRemotePciInfo(int) (PciInfo, Return) GetNvLinkState(int) (EnableState, Return) GetPciInfo() (PciInfo, Return) + CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance, Return) GetSupportedEventTypes() (uint64, Return) GetTopologyCommonAncestor(Device) (GpuTopologyLevel, Return) GetUUID() (string, Return) From eed7e1d14956b44c06e00ae9b69c4ee94d46a488 Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Tue, 18 Oct 2022 12:03:31 +0200 Subject: [PATCH 2/4] Restore formatting --- pkg/nvml/device_mock.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/nvml/device_mock.go b/pkg/nvml/device_mock.go index 17dfe25..adf2b8e 100644 --- a/pkg/nvml/device_mock.go +++ b/pkg/nvml/device_mock.go @@ -413,7 +413,6 @@ func (mock *DeviceMock) GetAttributes() (DeviceAttributes, Return) { // GetAttributesCalls gets all the calls that were made to GetAttributes. // Check the length with: -// // len(mockedDevice.GetAttributesCalls()) func (mock *DeviceMock) GetAttributesCalls() []struct { } { @@ -467,7 +466,6 @@ func (mock *DeviceMock) GetComputeInstanceId() (int, Return) { // GetComputeInstanceIdCalls gets all the calls that were made to GetComputeInstanceId. // Check the length with: -// // len(mockedDevice.GetComputeInstanceIdCalls()) func (mock *DeviceMock) GetComputeInstanceIdCalls() []struct { } { @@ -494,7 +492,6 @@ func (mock *DeviceMock) GetCudaComputeCapability() (int, int, Return) { // GetCudaComputeCapabilityCalls gets all the calls that were made to GetCudaComputeCapability. // Check the length with: -// // len(mockedDevice.GetCudaComputeCapabilityCalls()) func (mock *DeviceMock) GetCudaComputeCapabilityCalls() []struct { } { @@ -521,7 +518,6 @@ func (mock *DeviceMock) GetDeviceHandleFromMigDeviceHandle() (Device, Return) { // GetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to GetDeviceHandleFromMigDeviceHandle. // Check the length with: -// // len(mockedDevice.GetDeviceHandleFromMigDeviceHandleCalls()) func (mock *DeviceMock) GetDeviceHandleFromMigDeviceHandleCalls() []struct { } { @@ -551,7 +547,6 @@ func (mock *DeviceMock) GetGpuInstanceById(ID int) (GpuInstance, Return) { // GetGpuInstanceByIdCalls gets all the calls that were made to GetGpuInstanceById. // Check the length with: -// // len(mockedDevice.GetGpuInstanceByIdCalls()) func (mock *DeviceMock) GetGpuInstanceByIdCalls() []struct { ID int @@ -580,7 +575,6 @@ func (mock *DeviceMock) GetGpuInstanceId() (int, Return) { // GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. // Check the length with: -// // len(mockedDevice.GetGpuInstanceIdCalls()) func (mock *DeviceMock) GetGpuInstanceIdCalls() []struct { } { @@ -642,7 +636,6 @@ func (mock *DeviceMock) GetGpuInstanceProfileInfo(Profile int) (GpuInstanceProfi // GetGpuInstanceProfileInfoCalls gets all the calls that were made to GetGpuInstanceProfileInfo. // Check the length with: -// // len(mockedDevice.GetGpuInstanceProfileInfoCalls()) func (mock *DeviceMock) GetGpuInstanceProfileInfoCalls() []struct { Profile int @@ -674,7 +667,6 @@ func (mock *DeviceMock) GetGpuInstances(Info *GpuInstanceProfileInfo) ([]GpuInst // GetGpuInstancesCalls gets all the calls that were made to GetGpuInstances. // Check the length with: -// // len(mockedDevice.GetGpuInstancesCalls()) func (mock *DeviceMock) GetGpuInstancesCalls() []struct { Info *GpuInstanceProfileInfo @@ -703,7 +695,6 @@ func (mock *DeviceMock) GetIndex() (int, Return) { // GetIndexCalls gets all the calls that were made to GetIndex. // Check the length with: -// // len(mockedDevice.GetIndexCalls()) func (mock *DeviceMock) GetIndexCalls() []struct { } { @@ -730,7 +721,6 @@ func (mock *DeviceMock) GetMaxMigDeviceCount() (int, Return) { // GetMaxMigDeviceCountCalls gets all the calls that were made to GetMaxMigDeviceCount. // Check the length with: -// // len(mockedDevice.GetMaxMigDeviceCountCalls()) func (mock *DeviceMock) GetMaxMigDeviceCountCalls() []struct { } { @@ -757,7 +747,6 @@ func (mock *DeviceMock) GetMemoryInfo() (Memory, Return) { // GetMemoryInfoCalls gets all the calls that were made to GetMemoryInfo. // Check the length with: -// // len(mockedDevice.GetMemoryInfoCalls()) func (mock *DeviceMock) GetMemoryInfoCalls() []struct { } { @@ -787,7 +776,6 @@ func (mock *DeviceMock) GetMigDeviceHandleByIndex(Index int) (Device, Return) { // GetMigDeviceHandleByIndexCalls gets all the calls that were made to GetMigDeviceHandleByIndex. // Check the length with: -// // len(mockedDevice.GetMigDeviceHandleByIndexCalls()) func (mock *DeviceMock) GetMigDeviceHandleByIndexCalls() []struct { Index int @@ -816,7 +804,6 @@ func (mock *DeviceMock) GetMigMode() (int, int, Return) { // GetMigModeCalls gets all the calls that were made to GetMigMode. // Check the length with: -// // len(mockedDevice.GetMigModeCalls()) func (mock *DeviceMock) GetMigModeCalls() []struct { } { @@ -843,7 +830,6 @@ func (mock *DeviceMock) GetMinorNumber() (int, Return) { // GetMinorNumberCalls gets all the calls that were made to GetMinorNumber. // Check the length with: -// // len(mockedDevice.GetMinorNumberCalls()) func (mock *DeviceMock) GetMinorNumberCalls() []struct { } { @@ -870,7 +856,6 @@ func (mock *DeviceMock) GetName() (string, Return) { // GetNameCalls gets all the calls that were made to GetName. // Check the length with: -// // len(mockedDevice.GetNameCalls()) func (mock *DeviceMock) GetNameCalls() []struct { } { @@ -961,7 +946,6 @@ func (mock *DeviceMock) GetPciInfo() (PciInfo, Return) { // GetPciInfoCalls gets all the calls that were made to GetPciInfo. // Check the length with: -// // len(mockedDevice.GetPciInfoCalls()) func (mock *DeviceMock) GetPciInfoCalls() []struct { } { @@ -988,7 +972,6 @@ func (mock *DeviceMock) GetSupportedEventTypes() (uint64, Return) { // GetSupportedEventTypesCalls gets all the calls that were made to GetSupportedEventTypes. // Check the length with: -// // len(mockedDevice.GetSupportedEventTypesCalls()) func (mock *DeviceMock) GetSupportedEventTypesCalls() []struct { } { @@ -1047,7 +1030,6 @@ func (mock *DeviceMock) GetUUID() (string, Return) { // GetUUIDCalls gets all the calls that were made to GetUUID. // Check the length with: -// // len(mockedDevice.GetUUIDCalls()) func (mock *DeviceMock) GetUUIDCalls() []struct { } { @@ -1074,7 +1056,6 @@ func (mock *DeviceMock) IsMigDeviceHandle() (bool, Return) { // IsMigDeviceHandleCalls gets all the calls that were made to IsMigDeviceHandle. // Check the length with: -// // len(mockedDevice.IsMigDeviceHandleCalls()) func (mock *DeviceMock) IsMigDeviceHandleCalls() []struct { } { @@ -1106,7 +1087,6 @@ func (mock *DeviceMock) RegisterEvents(v uint64, eventSet EventSet) Return { // RegisterEventsCalls gets all the calls that were made to RegisterEvents. // Check the length with: -// // len(mockedDevice.RegisterEventsCalls()) func (mock *DeviceMock) RegisterEventsCalls() []struct { V uint64 @@ -1140,7 +1120,6 @@ func (mock *DeviceMock) SetMigMode(Mode int) (Return, Return) { // SetMigModeCalls gets all the calls that were made to SetMigMode. // Check the length with: -// // len(mockedDevice.SetMigModeCalls()) func (mock *DeviceMock) SetMigModeCalls() []struct { Mode int From d529fa8aba468451674e5e2139ef80ffae63c914 Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Tue, 18 Oct 2022 22:15:06 +0200 Subject: [PATCH 3/4] Sort nvml.Device methods alphabetically --- pkg/nvml/device.go | 12 ++++++------ pkg/nvml/types.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/nvml/device.go b/pkg/nvml/device.go index 35513d3..81e9a85 100644 --- a/pkg/nvml/device.go +++ b/pkg/nvml/device.go @@ -28,6 +28,12 @@ func (d nvmlDevice) CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance return nvmlGpuInstance(gpuInstance), Return(r) } +// CreateGpuInstanceWithPlacement creates a GPU Instance with a specific placement +func (d nvmlDevice) CreateGpuInstanceWithPlacement(info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, Return) { + gi, r := nvml.Device(d).CreateGpuInstanceWithPlacement((*nvml.GpuInstanceProfileInfo)(info), (*nvml.GpuInstancePlacement)(placement)) + return nvmlGpuInstance(gi), Return(r) +} + // GetIndex returns the index of a Device func (d nvmlDevice) GetIndex() (int, Return) { i, r := nvml.Device(d).GetIndex() @@ -114,12 +120,6 @@ func (d nvmlDevice) GetGpuInstances(info *GpuInstanceProfileInfo) ([]GpuInstance return gis, Return(r) } -// CreateGpuInstanceWithPlacement creates a GPU Instance with a specific placement -func (d nvmlDevice) CreateGpuInstanceWithPlacement(info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, Return) { - gi, r := nvml.Device(d).CreateGpuInstanceWithPlacement((*nvml.GpuInstanceProfileInfo)(info), (*nvml.GpuInstancePlacement)(placement)) - return nvmlGpuInstance(gi), Return(r) -} - // GetMaxMigDeviceCount returns the maximum number of MIG devices that can be created on a Device func (d nvmlDevice) GetMaxMigDeviceCount() (int, Return) { m, r := nvml.Device(d).GetMaxMigDeviceCount() diff --git a/pkg/nvml/types.go b/pkg/nvml/types.go index cb49d48..e4d0c19 100644 --- a/pkg/nvml/types.go +++ b/pkg/nvml/types.go @@ -40,6 +40,7 @@ type Interface interface { // //go:generate moq -out device_mock.go . Device type Device interface { + CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance, Return) CreateGpuInstanceWithPlacement(*GpuInstanceProfileInfo, *GpuInstancePlacement) (GpuInstance, Return) GetArchitecture() (DeviceArchitecture, Return) GetAttributes() (DeviceAttributes, Return) @@ -62,7 +63,6 @@ type Device interface { GetNvLinkRemotePciInfo(int) (PciInfo, Return) GetNvLinkState(int) (EnableState, Return) GetPciInfo() (PciInfo, Return) - CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance, Return) GetSupportedEventTypes() (uint64, Return) GetTopologyCommonAncestor(Device) (GpuTopologyLevel, Return) GetUUID() (string, Return) From d1d590a14171abbaf86b81ab920957cfe299e485 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 20 Nov 2023 21:49:51 +0100 Subject: [PATCH 4/4] Regenerate device mock Signed-off-by: Evan Lezar --- pkg/nvml/device_mock.go | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/pkg/nvml/device_mock.go b/pkg/nvml/device_mock.go index adf2b8e..ba063db 100644 --- a/pkg/nvml/device_mock.go +++ b/pkg/nvml/device_mock.go @@ -17,6 +17,9 @@ var _ Device = &DeviceMock{} // // // make and configure a mocked Device // mockedDevice := &DeviceMock{ +// CreateGpuInstanceFunc: func(Info *GpuInstanceProfileInfo) (GpuInstance, Return) { +// panic("mock out the CreateGpuInstance method") +// }, // CreateGpuInstanceWithPlacementFunc: func(gpuInstanceProfileInfo *GpuInstanceProfileInfo, gpuInstancePlacement *GpuInstancePlacement) (GpuInstance, Return) { // panic("mock out the CreateGpuInstanceWithPlacement method") // }, @@ -108,6 +111,9 @@ var _ Device = &DeviceMock{} // // } type DeviceMock struct { + // CreateGpuInstanceFunc mocks the CreateGpuInstance method. + CreateGpuInstanceFunc func(Info *GpuInstanceProfileInfo) (GpuInstance, Return) + // CreateGpuInstanceWithPlacementFunc mocks the CreateGpuInstanceWithPlacement method. CreateGpuInstanceWithPlacementFunc func(gpuInstanceProfileInfo *GpuInstanceProfileInfo, gpuInstancePlacement *GpuInstancePlacement) (GpuInstance, Return) @@ -194,6 +200,11 @@ type DeviceMock struct { // calls tracks calls to the methods. calls struct { + // CreateGpuInstance holds details about calls to the CreateGpuInstance method. + CreateGpuInstance []struct { + // Info is the Info argument value. + Info *GpuInstanceProfileInfo + } // CreateGpuInstanceWithPlacement holds details about calls to the CreateGpuInstanceWithPlacement method. CreateGpuInstanceWithPlacement []struct { // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. @@ -305,6 +316,7 @@ type DeviceMock struct { Mode int } } + lockCreateGpuInstance sync.RWMutex lockCreateGpuInstanceWithPlacement sync.RWMutex lockGetArchitecture sync.RWMutex lockGetAttributes sync.RWMutex @@ -335,6 +347,38 @@ type DeviceMock struct { lockSetMigMode sync.RWMutex } +// CreateGpuInstance calls CreateGpuInstanceFunc. +func (mock *DeviceMock) CreateGpuInstance(Info *GpuInstanceProfileInfo) (GpuInstance, Return) { + if mock.CreateGpuInstanceFunc == nil { + panic("DeviceMock.CreateGpuInstanceFunc: method is nil but Device.CreateGpuInstance was just called") + } + callInfo := struct { + Info *GpuInstanceProfileInfo + }{ + Info: Info, + } + mock.lockCreateGpuInstance.Lock() + mock.calls.CreateGpuInstance = append(mock.calls.CreateGpuInstance, callInfo) + mock.lockCreateGpuInstance.Unlock() + return mock.CreateGpuInstanceFunc(Info) +} + +// CreateGpuInstanceCalls gets all the calls that were made to CreateGpuInstance. +// Check the length with: +// +// len(mockedDevice.CreateGpuInstanceCalls()) +func (mock *DeviceMock) CreateGpuInstanceCalls() []struct { + Info *GpuInstanceProfileInfo +} { + var calls []struct { + Info *GpuInstanceProfileInfo + } + mock.lockCreateGpuInstance.RLock() + calls = mock.calls.CreateGpuInstance + mock.lockCreateGpuInstance.RUnlock() + return calls +} + // CreateGpuInstanceWithPlacement calls CreateGpuInstanceWithPlacementFunc. func (mock *DeviceMock) CreateGpuInstanceWithPlacement(gpuInstanceProfileInfo *GpuInstanceProfileInfo, gpuInstancePlacement *GpuInstancePlacement) (GpuInstance, Return) { if mock.CreateGpuInstanceWithPlacementFunc == nil { @@ -413,6 +457,7 @@ func (mock *DeviceMock) GetAttributes() (DeviceAttributes, Return) { // GetAttributesCalls gets all the calls that were made to GetAttributes. // Check the length with: +// // len(mockedDevice.GetAttributesCalls()) func (mock *DeviceMock) GetAttributesCalls() []struct { } { @@ -466,6 +511,7 @@ func (mock *DeviceMock) GetComputeInstanceId() (int, Return) { // GetComputeInstanceIdCalls gets all the calls that were made to GetComputeInstanceId. // Check the length with: +// // len(mockedDevice.GetComputeInstanceIdCalls()) func (mock *DeviceMock) GetComputeInstanceIdCalls() []struct { } { @@ -492,6 +538,7 @@ func (mock *DeviceMock) GetCudaComputeCapability() (int, int, Return) { // GetCudaComputeCapabilityCalls gets all the calls that were made to GetCudaComputeCapability. // Check the length with: +// // len(mockedDevice.GetCudaComputeCapabilityCalls()) func (mock *DeviceMock) GetCudaComputeCapabilityCalls() []struct { } { @@ -518,6 +565,7 @@ func (mock *DeviceMock) GetDeviceHandleFromMigDeviceHandle() (Device, Return) { // GetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to GetDeviceHandleFromMigDeviceHandle. // Check the length with: +// // len(mockedDevice.GetDeviceHandleFromMigDeviceHandleCalls()) func (mock *DeviceMock) GetDeviceHandleFromMigDeviceHandleCalls() []struct { } { @@ -547,6 +595,7 @@ func (mock *DeviceMock) GetGpuInstanceById(ID int) (GpuInstance, Return) { // GetGpuInstanceByIdCalls gets all the calls that were made to GetGpuInstanceById. // Check the length with: +// // len(mockedDevice.GetGpuInstanceByIdCalls()) func (mock *DeviceMock) GetGpuInstanceByIdCalls() []struct { ID int @@ -575,6 +624,7 @@ func (mock *DeviceMock) GetGpuInstanceId() (int, Return) { // GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. // Check the length with: +// // len(mockedDevice.GetGpuInstanceIdCalls()) func (mock *DeviceMock) GetGpuInstanceIdCalls() []struct { } { @@ -636,6 +686,7 @@ func (mock *DeviceMock) GetGpuInstanceProfileInfo(Profile int) (GpuInstanceProfi // GetGpuInstanceProfileInfoCalls gets all the calls that were made to GetGpuInstanceProfileInfo. // Check the length with: +// // len(mockedDevice.GetGpuInstanceProfileInfoCalls()) func (mock *DeviceMock) GetGpuInstanceProfileInfoCalls() []struct { Profile int @@ -667,6 +718,7 @@ func (mock *DeviceMock) GetGpuInstances(Info *GpuInstanceProfileInfo) ([]GpuInst // GetGpuInstancesCalls gets all the calls that were made to GetGpuInstances. // Check the length with: +// // len(mockedDevice.GetGpuInstancesCalls()) func (mock *DeviceMock) GetGpuInstancesCalls() []struct { Info *GpuInstanceProfileInfo @@ -695,6 +747,7 @@ func (mock *DeviceMock) GetIndex() (int, Return) { // GetIndexCalls gets all the calls that were made to GetIndex. // Check the length with: +// // len(mockedDevice.GetIndexCalls()) func (mock *DeviceMock) GetIndexCalls() []struct { } { @@ -721,6 +774,7 @@ func (mock *DeviceMock) GetMaxMigDeviceCount() (int, Return) { // GetMaxMigDeviceCountCalls gets all the calls that were made to GetMaxMigDeviceCount. // Check the length with: +// // len(mockedDevice.GetMaxMigDeviceCountCalls()) func (mock *DeviceMock) GetMaxMigDeviceCountCalls() []struct { } { @@ -747,6 +801,7 @@ func (mock *DeviceMock) GetMemoryInfo() (Memory, Return) { // GetMemoryInfoCalls gets all the calls that were made to GetMemoryInfo. // Check the length with: +// // len(mockedDevice.GetMemoryInfoCalls()) func (mock *DeviceMock) GetMemoryInfoCalls() []struct { } { @@ -776,6 +831,7 @@ func (mock *DeviceMock) GetMigDeviceHandleByIndex(Index int) (Device, Return) { // GetMigDeviceHandleByIndexCalls gets all the calls that were made to GetMigDeviceHandleByIndex. // Check the length with: +// // len(mockedDevice.GetMigDeviceHandleByIndexCalls()) func (mock *DeviceMock) GetMigDeviceHandleByIndexCalls() []struct { Index int @@ -804,6 +860,7 @@ func (mock *DeviceMock) GetMigMode() (int, int, Return) { // GetMigModeCalls gets all the calls that were made to GetMigMode. // Check the length with: +// // len(mockedDevice.GetMigModeCalls()) func (mock *DeviceMock) GetMigModeCalls() []struct { } { @@ -830,6 +887,7 @@ func (mock *DeviceMock) GetMinorNumber() (int, Return) { // GetMinorNumberCalls gets all the calls that were made to GetMinorNumber. // Check the length with: +// // len(mockedDevice.GetMinorNumberCalls()) func (mock *DeviceMock) GetMinorNumberCalls() []struct { } { @@ -856,6 +914,7 @@ func (mock *DeviceMock) GetName() (string, Return) { // GetNameCalls gets all the calls that were made to GetName. // Check the length with: +// // len(mockedDevice.GetNameCalls()) func (mock *DeviceMock) GetNameCalls() []struct { } { @@ -946,6 +1005,7 @@ func (mock *DeviceMock) GetPciInfo() (PciInfo, Return) { // GetPciInfoCalls gets all the calls that were made to GetPciInfo. // Check the length with: +// // len(mockedDevice.GetPciInfoCalls()) func (mock *DeviceMock) GetPciInfoCalls() []struct { } { @@ -972,6 +1032,7 @@ func (mock *DeviceMock) GetSupportedEventTypes() (uint64, Return) { // GetSupportedEventTypesCalls gets all the calls that were made to GetSupportedEventTypes. // Check the length with: +// // len(mockedDevice.GetSupportedEventTypesCalls()) func (mock *DeviceMock) GetSupportedEventTypesCalls() []struct { } { @@ -1030,6 +1091,7 @@ func (mock *DeviceMock) GetUUID() (string, Return) { // GetUUIDCalls gets all the calls that were made to GetUUID. // Check the length with: +// // len(mockedDevice.GetUUIDCalls()) func (mock *DeviceMock) GetUUIDCalls() []struct { } { @@ -1056,6 +1118,7 @@ func (mock *DeviceMock) IsMigDeviceHandle() (bool, Return) { // IsMigDeviceHandleCalls gets all the calls that were made to IsMigDeviceHandle. // Check the length with: +// // len(mockedDevice.IsMigDeviceHandleCalls()) func (mock *DeviceMock) IsMigDeviceHandleCalls() []struct { } { @@ -1087,6 +1150,7 @@ func (mock *DeviceMock) RegisterEvents(v uint64, eventSet EventSet) Return { // RegisterEventsCalls gets all the calls that were made to RegisterEvents. // Check the length with: +// // len(mockedDevice.RegisterEventsCalls()) func (mock *DeviceMock) RegisterEventsCalls() []struct { V uint64 @@ -1120,6 +1184,7 @@ func (mock *DeviceMock) SetMigMode(Mode int) (Return, Return) { // SetMigModeCalls gets all the calls that were made to SetMigMode. // Check the length with: +// // len(mockedDevice.SetMigModeCalls()) func (mock *DeviceMock) SetMigModeCalls() []struct { Mode int