nvidia-container-toolkit/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go
Evan Lezar d5f6e6f868 Use nvml/mock package
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-04-18 14:53:37 +02:00

897 lines
28 KiB
Go

// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package mock
import (
"github.com/NVIDIA/go-nvml/pkg/nvml"
"sync"
)
// Ensure, that VgpuInstance does implement nvml.VgpuInstance.
// If this is not the case, regenerate this file with moq.
var _ nvml.VgpuInstance = &VgpuInstance{}
// VgpuInstance is a mock implementation of nvml.VgpuInstance.
//
// func TestSomethingThatUsesVgpuInstance(t *testing.T) {
//
// // make and configure a mocked nvml.VgpuInstance
// mockedVgpuInstance := &VgpuInstance{
// ClearAccountingPidsFunc: func() nvml.Return {
// panic("mock out the ClearAccountingPids method")
// },
// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) {
// panic("mock out the GetAccountingMode method")
// },
// GetAccountingPidsFunc: func() ([]int, nvml.Return) {
// panic("mock out the GetAccountingPids method")
// },
// GetAccountingStatsFunc: func(n int) (nvml.AccountingStats, nvml.Return) {
// panic("mock out the GetAccountingStats method")
// },
// GetEccModeFunc: func() (nvml.EnableState, nvml.Return) {
// panic("mock out the GetEccMode method")
// },
// GetEncoderCapacityFunc: func() (int, nvml.Return) {
// panic("mock out the GetEncoderCapacity method")
// },
// GetEncoderSessionsFunc: func() (int, nvml.EncoderSessionInfo, nvml.Return) {
// panic("mock out the GetEncoderSessions method")
// },
// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) {
// panic("mock out the GetEncoderStats method")
// },
// GetFBCSessionsFunc: func() (int, nvml.FBCSessionInfo, nvml.Return) {
// panic("mock out the GetFBCSessions method")
// },
// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) {
// panic("mock out the GetFBCStats method")
// },
// GetFbUsageFunc: func() (uint64, nvml.Return) {
// panic("mock out the GetFbUsage method")
// },
// GetFrameRateLimitFunc: func() (uint32, nvml.Return) {
// panic("mock out the GetFrameRateLimit method")
// },
// GetGpuInstanceIdFunc: func() (int, nvml.Return) {
// panic("mock out the GetGpuInstanceId method")
// },
// GetGpuPciIdFunc: func() (string, nvml.Return) {
// panic("mock out the GetGpuPciId method")
// },
// GetLicenseInfoFunc: func() (nvml.VgpuLicenseInfo, nvml.Return) {
// panic("mock out the GetLicenseInfo method")
// },
// GetLicenseStatusFunc: func() (int, nvml.Return) {
// panic("mock out the GetLicenseStatus method")
// },
// GetMdevUUIDFunc: func() (string, nvml.Return) {
// panic("mock out the GetMdevUUID method")
// },
// GetMetadataFunc: func() (nvml.VgpuMetadata, nvml.Return) {
// panic("mock out the GetMetadata method")
// },
// GetTypeFunc: func() (nvml.VgpuTypeId, nvml.Return) {
// panic("mock out the GetType method")
// },
// GetUUIDFunc: func() (string, nvml.Return) {
// panic("mock out the GetUUID method")
// },
// GetVmDriverVersionFunc: func() (string, nvml.Return) {
// panic("mock out the GetVmDriverVersion method")
// },
// GetVmIDFunc: func() (string, nvml.VgpuVmIdType, nvml.Return) {
// panic("mock out the GetVmID method")
// },
// SetEncoderCapacityFunc: func(n int) nvml.Return {
// panic("mock out the SetEncoderCapacity method")
// },
// }
//
// // use mockedVgpuInstance in code that requires nvml.VgpuInstance
// // and then make assertions.
//
// }
type VgpuInstance struct {
// ClearAccountingPidsFunc mocks the ClearAccountingPids method.
ClearAccountingPidsFunc func() nvml.Return
// GetAccountingModeFunc mocks the GetAccountingMode method.
GetAccountingModeFunc func() (nvml.EnableState, nvml.Return)
// GetAccountingPidsFunc mocks the GetAccountingPids method.
GetAccountingPidsFunc func() ([]int, nvml.Return)
// GetAccountingStatsFunc mocks the GetAccountingStats method.
GetAccountingStatsFunc func(n int) (nvml.AccountingStats, nvml.Return)
// GetEccModeFunc mocks the GetEccMode method.
GetEccModeFunc func() (nvml.EnableState, nvml.Return)
// GetEncoderCapacityFunc mocks the GetEncoderCapacity method.
GetEncoderCapacityFunc func() (int, nvml.Return)
// GetEncoderSessionsFunc mocks the GetEncoderSessions method.
GetEncoderSessionsFunc func() (int, nvml.EncoderSessionInfo, nvml.Return)
// GetEncoderStatsFunc mocks the GetEncoderStats method.
GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return)
// GetFBCSessionsFunc mocks the GetFBCSessions method.
GetFBCSessionsFunc func() (int, nvml.FBCSessionInfo, nvml.Return)
// GetFBCStatsFunc mocks the GetFBCStats method.
GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return)
// GetFbUsageFunc mocks the GetFbUsage method.
GetFbUsageFunc func() (uint64, nvml.Return)
// GetFrameRateLimitFunc mocks the GetFrameRateLimit method.
GetFrameRateLimitFunc func() (uint32, nvml.Return)
// GetGpuInstanceIdFunc mocks the GetGpuInstanceId method.
GetGpuInstanceIdFunc func() (int, nvml.Return)
// GetGpuPciIdFunc mocks the GetGpuPciId method.
GetGpuPciIdFunc func() (string, nvml.Return)
// GetLicenseInfoFunc mocks the GetLicenseInfo method.
GetLicenseInfoFunc func() (nvml.VgpuLicenseInfo, nvml.Return)
// GetLicenseStatusFunc mocks the GetLicenseStatus method.
GetLicenseStatusFunc func() (int, nvml.Return)
// GetMdevUUIDFunc mocks the GetMdevUUID method.
GetMdevUUIDFunc func() (string, nvml.Return)
// GetMetadataFunc mocks the GetMetadata method.
GetMetadataFunc func() (nvml.VgpuMetadata, nvml.Return)
// GetTypeFunc mocks the GetType method.
GetTypeFunc func() (nvml.VgpuTypeId, nvml.Return)
// GetUUIDFunc mocks the GetUUID method.
GetUUIDFunc func() (string, nvml.Return)
// GetVmDriverVersionFunc mocks the GetVmDriverVersion method.
GetVmDriverVersionFunc func() (string, nvml.Return)
// GetVmIDFunc mocks the GetVmID method.
GetVmIDFunc func() (string, nvml.VgpuVmIdType, nvml.Return)
// SetEncoderCapacityFunc mocks the SetEncoderCapacity method.
SetEncoderCapacityFunc func(n int) nvml.Return
// calls tracks calls to the methods.
calls struct {
// ClearAccountingPids holds details about calls to the ClearAccountingPids method.
ClearAccountingPids []struct {
}
// GetAccountingMode holds details about calls to the GetAccountingMode method.
GetAccountingMode []struct {
}
// GetAccountingPids holds details about calls to the GetAccountingPids method.
GetAccountingPids []struct {
}
// GetAccountingStats holds details about calls to the GetAccountingStats method.
GetAccountingStats []struct {
// N is the n argument value.
N int
}
// GetEccMode holds details about calls to the GetEccMode method.
GetEccMode []struct {
}
// GetEncoderCapacity holds details about calls to the GetEncoderCapacity method.
GetEncoderCapacity []struct {
}
// GetEncoderSessions holds details about calls to the GetEncoderSessions method.
GetEncoderSessions []struct {
}
// GetEncoderStats holds details about calls to the GetEncoderStats method.
GetEncoderStats []struct {
}
// GetFBCSessions holds details about calls to the GetFBCSessions method.
GetFBCSessions []struct {
}
// GetFBCStats holds details about calls to the GetFBCStats method.
GetFBCStats []struct {
}
// GetFbUsage holds details about calls to the GetFbUsage method.
GetFbUsage []struct {
}
// GetFrameRateLimit holds details about calls to the GetFrameRateLimit method.
GetFrameRateLimit []struct {
}
// GetGpuInstanceId holds details about calls to the GetGpuInstanceId method.
GetGpuInstanceId []struct {
}
// GetGpuPciId holds details about calls to the GetGpuPciId method.
GetGpuPciId []struct {
}
// GetLicenseInfo holds details about calls to the GetLicenseInfo method.
GetLicenseInfo []struct {
}
// GetLicenseStatus holds details about calls to the GetLicenseStatus method.
GetLicenseStatus []struct {
}
// GetMdevUUID holds details about calls to the GetMdevUUID method.
GetMdevUUID []struct {
}
// GetMetadata holds details about calls to the GetMetadata method.
GetMetadata []struct {
}
// GetType holds details about calls to the GetType method.
GetType []struct {
}
// GetUUID holds details about calls to the GetUUID method.
GetUUID []struct {
}
// GetVmDriverVersion holds details about calls to the GetVmDriverVersion method.
GetVmDriverVersion []struct {
}
// GetVmID holds details about calls to the GetVmID method.
GetVmID []struct {
}
// SetEncoderCapacity holds details about calls to the SetEncoderCapacity method.
SetEncoderCapacity []struct {
// N is the n argument value.
N int
}
}
lockClearAccountingPids sync.RWMutex
lockGetAccountingMode sync.RWMutex
lockGetAccountingPids sync.RWMutex
lockGetAccountingStats sync.RWMutex
lockGetEccMode sync.RWMutex
lockGetEncoderCapacity sync.RWMutex
lockGetEncoderSessions sync.RWMutex
lockGetEncoderStats sync.RWMutex
lockGetFBCSessions sync.RWMutex
lockGetFBCStats sync.RWMutex
lockGetFbUsage sync.RWMutex
lockGetFrameRateLimit sync.RWMutex
lockGetGpuInstanceId sync.RWMutex
lockGetGpuPciId sync.RWMutex
lockGetLicenseInfo sync.RWMutex
lockGetLicenseStatus sync.RWMutex
lockGetMdevUUID sync.RWMutex
lockGetMetadata sync.RWMutex
lockGetType sync.RWMutex
lockGetUUID sync.RWMutex
lockGetVmDriverVersion sync.RWMutex
lockGetVmID sync.RWMutex
lockSetEncoderCapacity sync.RWMutex
}
// ClearAccountingPids calls ClearAccountingPidsFunc.
func (mock *VgpuInstance) ClearAccountingPids() nvml.Return {
if mock.ClearAccountingPidsFunc == nil {
panic("VgpuInstance.ClearAccountingPidsFunc: method is nil but VgpuInstance.ClearAccountingPids was just called")
}
callInfo := struct {
}{}
mock.lockClearAccountingPids.Lock()
mock.calls.ClearAccountingPids = append(mock.calls.ClearAccountingPids, callInfo)
mock.lockClearAccountingPids.Unlock()
return mock.ClearAccountingPidsFunc()
}
// ClearAccountingPidsCalls gets all the calls that were made to ClearAccountingPids.
// Check the length with:
//
// len(mockedVgpuInstance.ClearAccountingPidsCalls())
func (mock *VgpuInstance) ClearAccountingPidsCalls() []struct {
} {
var calls []struct {
}
mock.lockClearAccountingPids.RLock()
calls = mock.calls.ClearAccountingPids
mock.lockClearAccountingPids.RUnlock()
return calls
}
// GetAccountingMode calls GetAccountingModeFunc.
func (mock *VgpuInstance) GetAccountingMode() (nvml.EnableState, nvml.Return) {
if mock.GetAccountingModeFunc == nil {
panic("VgpuInstance.GetAccountingModeFunc: method is nil but VgpuInstance.GetAccountingMode was just called")
}
callInfo := struct {
}{}
mock.lockGetAccountingMode.Lock()
mock.calls.GetAccountingMode = append(mock.calls.GetAccountingMode, callInfo)
mock.lockGetAccountingMode.Unlock()
return mock.GetAccountingModeFunc()
}
// GetAccountingModeCalls gets all the calls that were made to GetAccountingMode.
// Check the length with:
//
// len(mockedVgpuInstance.GetAccountingModeCalls())
func (mock *VgpuInstance) GetAccountingModeCalls() []struct {
} {
var calls []struct {
}
mock.lockGetAccountingMode.RLock()
calls = mock.calls.GetAccountingMode
mock.lockGetAccountingMode.RUnlock()
return calls
}
// GetAccountingPids calls GetAccountingPidsFunc.
func (mock *VgpuInstance) GetAccountingPids() ([]int, nvml.Return) {
if mock.GetAccountingPidsFunc == nil {
panic("VgpuInstance.GetAccountingPidsFunc: method is nil but VgpuInstance.GetAccountingPids was just called")
}
callInfo := struct {
}{}
mock.lockGetAccountingPids.Lock()
mock.calls.GetAccountingPids = append(mock.calls.GetAccountingPids, callInfo)
mock.lockGetAccountingPids.Unlock()
return mock.GetAccountingPidsFunc()
}
// GetAccountingPidsCalls gets all the calls that were made to GetAccountingPids.
// Check the length with:
//
// len(mockedVgpuInstance.GetAccountingPidsCalls())
func (mock *VgpuInstance) GetAccountingPidsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetAccountingPids.RLock()
calls = mock.calls.GetAccountingPids
mock.lockGetAccountingPids.RUnlock()
return calls
}
// GetAccountingStats calls GetAccountingStatsFunc.
func (mock *VgpuInstance) GetAccountingStats(n int) (nvml.AccountingStats, nvml.Return) {
if mock.GetAccountingStatsFunc == nil {
panic("VgpuInstance.GetAccountingStatsFunc: method is nil but VgpuInstance.GetAccountingStats was just called")
}
callInfo := struct {
N int
}{
N: n,
}
mock.lockGetAccountingStats.Lock()
mock.calls.GetAccountingStats = append(mock.calls.GetAccountingStats, callInfo)
mock.lockGetAccountingStats.Unlock()
return mock.GetAccountingStatsFunc(n)
}
// GetAccountingStatsCalls gets all the calls that were made to GetAccountingStats.
// Check the length with:
//
// len(mockedVgpuInstance.GetAccountingStatsCalls())
func (mock *VgpuInstance) GetAccountingStatsCalls() []struct {
N int
} {
var calls []struct {
N int
}
mock.lockGetAccountingStats.RLock()
calls = mock.calls.GetAccountingStats
mock.lockGetAccountingStats.RUnlock()
return calls
}
// GetEccMode calls GetEccModeFunc.
func (mock *VgpuInstance) GetEccMode() (nvml.EnableState, nvml.Return) {
if mock.GetEccModeFunc == nil {
panic("VgpuInstance.GetEccModeFunc: method is nil but VgpuInstance.GetEccMode was just called")
}
callInfo := struct {
}{}
mock.lockGetEccMode.Lock()
mock.calls.GetEccMode = append(mock.calls.GetEccMode, callInfo)
mock.lockGetEccMode.Unlock()
return mock.GetEccModeFunc()
}
// GetEccModeCalls gets all the calls that were made to GetEccMode.
// Check the length with:
//
// len(mockedVgpuInstance.GetEccModeCalls())
func (mock *VgpuInstance) GetEccModeCalls() []struct {
} {
var calls []struct {
}
mock.lockGetEccMode.RLock()
calls = mock.calls.GetEccMode
mock.lockGetEccMode.RUnlock()
return calls
}
// GetEncoderCapacity calls GetEncoderCapacityFunc.
func (mock *VgpuInstance) GetEncoderCapacity() (int, nvml.Return) {
if mock.GetEncoderCapacityFunc == nil {
panic("VgpuInstance.GetEncoderCapacityFunc: method is nil but VgpuInstance.GetEncoderCapacity was just called")
}
callInfo := struct {
}{}
mock.lockGetEncoderCapacity.Lock()
mock.calls.GetEncoderCapacity = append(mock.calls.GetEncoderCapacity, callInfo)
mock.lockGetEncoderCapacity.Unlock()
return mock.GetEncoderCapacityFunc()
}
// GetEncoderCapacityCalls gets all the calls that were made to GetEncoderCapacity.
// Check the length with:
//
// len(mockedVgpuInstance.GetEncoderCapacityCalls())
func (mock *VgpuInstance) GetEncoderCapacityCalls() []struct {
} {
var calls []struct {
}
mock.lockGetEncoderCapacity.RLock()
calls = mock.calls.GetEncoderCapacity
mock.lockGetEncoderCapacity.RUnlock()
return calls
}
// GetEncoderSessions calls GetEncoderSessionsFunc.
func (mock *VgpuInstance) GetEncoderSessions() (int, nvml.EncoderSessionInfo, nvml.Return) {
if mock.GetEncoderSessionsFunc == nil {
panic("VgpuInstance.GetEncoderSessionsFunc: method is nil but VgpuInstance.GetEncoderSessions was just called")
}
callInfo := struct {
}{}
mock.lockGetEncoderSessions.Lock()
mock.calls.GetEncoderSessions = append(mock.calls.GetEncoderSessions, callInfo)
mock.lockGetEncoderSessions.Unlock()
return mock.GetEncoderSessionsFunc()
}
// GetEncoderSessionsCalls gets all the calls that were made to GetEncoderSessions.
// Check the length with:
//
// len(mockedVgpuInstance.GetEncoderSessionsCalls())
func (mock *VgpuInstance) GetEncoderSessionsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetEncoderSessions.RLock()
calls = mock.calls.GetEncoderSessions
mock.lockGetEncoderSessions.RUnlock()
return calls
}
// GetEncoderStats calls GetEncoderStatsFunc.
func (mock *VgpuInstance) GetEncoderStats() (int, uint32, uint32, nvml.Return) {
if mock.GetEncoderStatsFunc == nil {
panic("VgpuInstance.GetEncoderStatsFunc: method is nil but VgpuInstance.GetEncoderStats was just called")
}
callInfo := struct {
}{}
mock.lockGetEncoderStats.Lock()
mock.calls.GetEncoderStats = append(mock.calls.GetEncoderStats, callInfo)
mock.lockGetEncoderStats.Unlock()
return mock.GetEncoderStatsFunc()
}
// GetEncoderStatsCalls gets all the calls that were made to GetEncoderStats.
// Check the length with:
//
// len(mockedVgpuInstance.GetEncoderStatsCalls())
func (mock *VgpuInstance) GetEncoderStatsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetEncoderStats.RLock()
calls = mock.calls.GetEncoderStats
mock.lockGetEncoderStats.RUnlock()
return calls
}
// GetFBCSessions calls GetFBCSessionsFunc.
func (mock *VgpuInstance) GetFBCSessions() (int, nvml.FBCSessionInfo, nvml.Return) {
if mock.GetFBCSessionsFunc == nil {
panic("VgpuInstance.GetFBCSessionsFunc: method is nil but VgpuInstance.GetFBCSessions was just called")
}
callInfo := struct {
}{}
mock.lockGetFBCSessions.Lock()
mock.calls.GetFBCSessions = append(mock.calls.GetFBCSessions, callInfo)
mock.lockGetFBCSessions.Unlock()
return mock.GetFBCSessionsFunc()
}
// GetFBCSessionsCalls gets all the calls that were made to GetFBCSessions.
// Check the length with:
//
// len(mockedVgpuInstance.GetFBCSessionsCalls())
func (mock *VgpuInstance) GetFBCSessionsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetFBCSessions.RLock()
calls = mock.calls.GetFBCSessions
mock.lockGetFBCSessions.RUnlock()
return calls
}
// GetFBCStats calls GetFBCStatsFunc.
func (mock *VgpuInstance) GetFBCStats() (nvml.FBCStats, nvml.Return) {
if mock.GetFBCStatsFunc == nil {
panic("VgpuInstance.GetFBCStatsFunc: method is nil but VgpuInstance.GetFBCStats was just called")
}
callInfo := struct {
}{}
mock.lockGetFBCStats.Lock()
mock.calls.GetFBCStats = append(mock.calls.GetFBCStats, callInfo)
mock.lockGetFBCStats.Unlock()
return mock.GetFBCStatsFunc()
}
// GetFBCStatsCalls gets all the calls that were made to GetFBCStats.
// Check the length with:
//
// len(mockedVgpuInstance.GetFBCStatsCalls())
func (mock *VgpuInstance) GetFBCStatsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetFBCStats.RLock()
calls = mock.calls.GetFBCStats
mock.lockGetFBCStats.RUnlock()
return calls
}
// GetFbUsage calls GetFbUsageFunc.
func (mock *VgpuInstance) GetFbUsage() (uint64, nvml.Return) {
if mock.GetFbUsageFunc == nil {
panic("VgpuInstance.GetFbUsageFunc: method is nil but VgpuInstance.GetFbUsage was just called")
}
callInfo := struct {
}{}
mock.lockGetFbUsage.Lock()
mock.calls.GetFbUsage = append(mock.calls.GetFbUsage, callInfo)
mock.lockGetFbUsage.Unlock()
return mock.GetFbUsageFunc()
}
// GetFbUsageCalls gets all the calls that were made to GetFbUsage.
// Check the length with:
//
// len(mockedVgpuInstance.GetFbUsageCalls())
func (mock *VgpuInstance) GetFbUsageCalls() []struct {
} {
var calls []struct {
}
mock.lockGetFbUsage.RLock()
calls = mock.calls.GetFbUsage
mock.lockGetFbUsage.RUnlock()
return calls
}
// GetFrameRateLimit calls GetFrameRateLimitFunc.
func (mock *VgpuInstance) GetFrameRateLimit() (uint32, nvml.Return) {
if mock.GetFrameRateLimitFunc == nil {
panic("VgpuInstance.GetFrameRateLimitFunc: method is nil but VgpuInstance.GetFrameRateLimit was just called")
}
callInfo := struct {
}{}
mock.lockGetFrameRateLimit.Lock()
mock.calls.GetFrameRateLimit = append(mock.calls.GetFrameRateLimit, callInfo)
mock.lockGetFrameRateLimit.Unlock()
return mock.GetFrameRateLimitFunc()
}
// GetFrameRateLimitCalls gets all the calls that were made to GetFrameRateLimit.
// Check the length with:
//
// len(mockedVgpuInstance.GetFrameRateLimitCalls())
func (mock *VgpuInstance) GetFrameRateLimitCalls() []struct {
} {
var calls []struct {
}
mock.lockGetFrameRateLimit.RLock()
calls = mock.calls.GetFrameRateLimit
mock.lockGetFrameRateLimit.RUnlock()
return calls
}
// GetGpuInstanceId calls GetGpuInstanceIdFunc.
func (mock *VgpuInstance) GetGpuInstanceId() (int, nvml.Return) {
if mock.GetGpuInstanceIdFunc == nil {
panic("VgpuInstance.GetGpuInstanceIdFunc: method is nil but VgpuInstance.GetGpuInstanceId was just called")
}
callInfo := struct {
}{}
mock.lockGetGpuInstanceId.Lock()
mock.calls.GetGpuInstanceId = append(mock.calls.GetGpuInstanceId, callInfo)
mock.lockGetGpuInstanceId.Unlock()
return mock.GetGpuInstanceIdFunc()
}
// GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId.
// Check the length with:
//
// len(mockedVgpuInstance.GetGpuInstanceIdCalls())
func (mock *VgpuInstance) GetGpuInstanceIdCalls() []struct {
} {
var calls []struct {
}
mock.lockGetGpuInstanceId.RLock()
calls = mock.calls.GetGpuInstanceId
mock.lockGetGpuInstanceId.RUnlock()
return calls
}
// GetGpuPciId calls GetGpuPciIdFunc.
func (mock *VgpuInstance) GetGpuPciId() (string, nvml.Return) {
if mock.GetGpuPciIdFunc == nil {
panic("VgpuInstance.GetGpuPciIdFunc: method is nil but VgpuInstance.GetGpuPciId was just called")
}
callInfo := struct {
}{}
mock.lockGetGpuPciId.Lock()
mock.calls.GetGpuPciId = append(mock.calls.GetGpuPciId, callInfo)
mock.lockGetGpuPciId.Unlock()
return mock.GetGpuPciIdFunc()
}
// GetGpuPciIdCalls gets all the calls that were made to GetGpuPciId.
// Check the length with:
//
// len(mockedVgpuInstance.GetGpuPciIdCalls())
func (mock *VgpuInstance) GetGpuPciIdCalls() []struct {
} {
var calls []struct {
}
mock.lockGetGpuPciId.RLock()
calls = mock.calls.GetGpuPciId
mock.lockGetGpuPciId.RUnlock()
return calls
}
// GetLicenseInfo calls GetLicenseInfoFunc.
func (mock *VgpuInstance) GetLicenseInfo() (nvml.VgpuLicenseInfo, nvml.Return) {
if mock.GetLicenseInfoFunc == nil {
panic("VgpuInstance.GetLicenseInfoFunc: method is nil but VgpuInstance.GetLicenseInfo was just called")
}
callInfo := struct {
}{}
mock.lockGetLicenseInfo.Lock()
mock.calls.GetLicenseInfo = append(mock.calls.GetLicenseInfo, callInfo)
mock.lockGetLicenseInfo.Unlock()
return mock.GetLicenseInfoFunc()
}
// GetLicenseInfoCalls gets all the calls that were made to GetLicenseInfo.
// Check the length with:
//
// len(mockedVgpuInstance.GetLicenseInfoCalls())
func (mock *VgpuInstance) GetLicenseInfoCalls() []struct {
} {
var calls []struct {
}
mock.lockGetLicenseInfo.RLock()
calls = mock.calls.GetLicenseInfo
mock.lockGetLicenseInfo.RUnlock()
return calls
}
// GetLicenseStatus calls GetLicenseStatusFunc.
func (mock *VgpuInstance) GetLicenseStatus() (int, nvml.Return) {
if mock.GetLicenseStatusFunc == nil {
panic("VgpuInstance.GetLicenseStatusFunc: method is nil but VgpuInstance.GetLicenseStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetLicenseStatus.Lock()
mock.calls.GetLicenseStatus = append(mock.calls.GetLicenseStatus, callInfo)
mock.lockGetLicenseStatus.Unlock()
return mock.GetLicenseStatusFunc()
}
// GetLicenseStatusCalls gets all the calls that were made to GetLicenseStatus.
// Check the length with:
//
// len(mockedVgpuInstance.GetLicenseStatusCalls())
func (mock *VgpuInstance) GetLicenseStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetLicenseStatus.RLock()
calls = mock.calls.GetLicenseStatus
mock.lockGetLicenseStatus.RUnlock()
return calls
}
// GetMdevUUID calls GetMdevUUIDFunc.
func (mock *VgpuInstance) GetMdevUUID() (string, nvml.Return) {
if mock.GetMdevUUIDFunc == nil {
panic("VgpuInstance.GetMdevUUIDFunc: method is nil but VgpuInstance.GetMdevUUID was just called")
}
callInfo := struct {
}{}
mock.lockGetMdevUUID.Lock()
mock.calls.GetMdevUUID = append(mock.calls.GetMdevUUID, callInfo)
mock.lockGetMdevUUID.Unlock()
return mock.GetMdevUUIDFunc()
}
// GetMdevUUIDCalls gets all the calls that were made to GetMdevUUID.
// Check the length with:
//
// len(mockedVgpuInstance.GetMdevUUIDCalls())
func (mock *VgpuInstance) GetMdevUUIDCalls() []struct {
} {
var calls []struct {
}
mock.lockGetMdevUUID.RLock()
calls = mock.calls.GetMdevUUID
mock.lockGetMdevUUID.RUnlock()
return calls
}
// GetMetadata calls GetMetadataFunc.
func (mock *VgpuInstance) GetMetadata() (nvml.VgpuMetadata, nvml.Return) {
if mock.GetMetadataFunc == nil {
panic("VgpuInstance.GetMetadataFunc: method is nil but VgpuInstance.GetMetadata was just called")
}
callInfo := struct {
}{}
mock.lockGetMetadata.Lock()
mock.calls.GetMetadata = append(mock.calls.GetMetadata, callInfo)
mock.lockGetMetadata.Unlock()
return mock.GetMetadataFunc()
}
// GetMetadataCalls gets all the calls that were made to GetMetadata.
// Check the length with:
//
// len(mockedVgpuInstance.GetMetadataCalls())
func (mock *VgpuInstance) GetMetadataCalls() []struct {
} {
var calls []struct {
}
mock.lockGetMetadata.RLock()
calls = mock.calls.GetMetadata
mock.lockGetMetadata.RUnlock()
return calls
}
// GetType calls GetTypeFunc.
func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, nvml.Return) {
if mock.GetTypeFunc == nil {
panic("VgpuInstance.GetTypeFunc: method is nil but VgpuInstance.GetType was just called")
}
callInfo := struct {
}{}
mock.lockGetType.Lock()
mock.calls.GetType = append(mock.calls.GetType, callInfo)
mock.lockGetType.Unlock()
return mock.GetTypeFunc()
}
// GetTypeCalls gets all the calls that were made to GetType.
// Check the length with:
//
// len(mockedVgpuInstance.GetTypeCalls())
func (mock *VgpuInstance) GetTypeCalls() []struct {
} {
var calls []struct {
}
mock.lockGetType.RLock()
calls = mock.calls.GetType
mock.lockGetType.RUnlock()
return calls
}
// GetUUID calls GetUUIDFunc.
func (mock *VgpuInstance) GetUUID() (string, nvml.Return) {
if mock.GetUUIDFunc == nil {
panic("VgpuInstance.GetUUIDFunc: method is nil but VgpuInstance.GetUUID was just called")
}
callInfo := struct {
}{}
mock.lockGetUUID.Lock()
mock.calls.GetUUID = append(mock.calls.GetUUID, callInfo)
mock.lockGetUUID.Unlock()
return mock.GetUUIDFunc()
}
// GetUUIDCalls gets all the calls that were made to GetUUID.
// Check the length with:
//
// len(mockedVgpuInstance.GetUUIDCalls())
func (mock *VgpuInstance) GetUUIDCalls() []struct {
} {
var calls []struct {
}
mock.lockGetUUID.RLock()
calls = mock.calls.GetUUID
mock.lockGetUUID.RUnlock()
return calls
}
// GetVmDriverVersion calls GetVmDriverVersionFunc.
func (mock *VgpuInstance) GetVmDriverVersion() (string, nvml.Return) {
if mock.GetVmDriverVersionFunc == nil {
panic("VgpuInstance.GetVmDriverVersionFunc: method is nil but VgpuInstance.GetVmDriverVersion was just called")
}
callInfo := struct {
}{}
mock.lockGetVmDriverVersion.Lock()
mock.calls.GetVmDriverVersion = append(mock.calls.GetVmDriverVersion, callInfo)
mock.lockGetVmDriverVersion.Unlock()
return mock.GetVmDriverVersionFunc()
}
// GetVmDriverVersionCalls gets all the calls that were made to GetVmDriverVersion.
// Check the length with:
//
// len(mockedVgpuInstance.GetVmDriverVersionCalls())
func (mock *VgpuInstance) GetVmDriverVersionCalls() []struct {
} {
var calls []struct {
}
mock.lockGetVmDriverVersion.RLock()
calls = mock.calls.GetVmDriverVersion
mock.lockGetVmDriverVersion.RUnlock()
return calls
}
// GetVmID calls GetVmIDFunc.
func (mock *VgpuInstance) GetVmID() (string, nvml.VgpuVmIdType, nvml.Return) {
if mock.GetVmIDFunc == nil {
panic("VgpuInstance.GetVmIDFunc: method is nil but VgpuInstance.GetVmID was just called")
}
callInfo := struct {
}{}
mock.lockGetVmID.Lock()
mock.calls.GetVmID = append(mock.calls.GetVmID, callInfo)
mock.lockGetVmID.Unlock()
return mock.GetVmIDFunc()
}
// GetVmIDCalls gets all the calls that were made to GetVmID.
// Check the length with:
//
// len(mockedVgpuInstance.GetVmIDCalls())
func (mock *VgpuInstance) GetVmIDCalls() []struct {
} {
var calls []struct {
}
mock.lockGetVmID.RLock()
calls = mock.calls.GetVmID
mock.lockGetVmID.RUnlock()
return calls
}
// SetEncoderCapacity calls SetEncoderCapacityFunc.
func (mock *VgpuInstance) SetEncoderCapacity(n int) nvml.Return {
if mock.SetEncoderCapacityFunc == nil {
panic("VgpuInstance.SetEncoderCapacityFunc: method is nil but VgpuInstance.SetEncoderCapacity was just called")
}
callInfo := struct {
N int
}{
N: n,
}
mock.lockSetEncoderCapacity.Lock()
mock.calls.SetEncoderCapacity = append(mock.calls.SetEncoderCapacity, callInfo)
mock.lockSetEncoderCapacity.Unlock()
return mock.SetEncoderCapacityFunc(n)
}
// SetEncoderCapacityCalls gets all the calls that were made to SetEncoderCapacity.
// Check the length with:
//
// len(mockedVgpuInstance.SetEncoderCapacityCalls())
func (mock *VgpuInstance) SetEncoderCapacityCalls() []struct {
N int
} {
var calls []struct {
N int
}
mock.lockSetEncoderCapacity.RLock()
calls = mock.calls.SetEncoderCapacity
mock.lockSetEncoderCapacity.RUnlock()
return calls
}