-
Notifications
You must be signed in to change notification settings - Fork 6
/
SriovnetProvider.go
88 lines (69 loc) · 2.1 KB
/
SriovnetProvider.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// SriovnetProvider is an autogenerated mock type for the SriovnetProvider type
type SriovnetProvider struct {
mock.Mock
}
// GetUplinkRepresentor provides a mock function with given fields: pciAddress
func (_m *SriovnetProvider) GetUplinkRepresentor(pciAddress string) (string, error) {
ret := _m.Called(pciAddress)
var r0 string
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(pciAddress)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(pciAddress)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetVfIndexByPciAddress provides a mock function with given fields: vfPciAddress
func (_m *SriovnetProvider) GetVfIndexByPciAddress(vfPciAddress string) (int, error) {
ret := _m.Called(vfPciAddress)
var r0 int
if rf, ok := ret.Get(0).(func(string) int); ok {
r0 = rf(vfPciAddress)
} else {
r0 = ret.Get(0).(int)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(vfPciAddress)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetVfRepresentor provides a mock function with given fields: uplink, vfIndex
func (_m *SriovnetProvider) GetVfRepresentor(uplink string, vfIndex int) (string, error) {
ret := _m.Called(uplink, vfIndex)
var r0 string
if rf, ok := ret.Get(0).(func(string, int) string); ok {
r0 = rf(uplink, vfIndex)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int) error); ok {
r1 = rf(uplink, vfIndex)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewSriovnetProvider interface {
mock.TestingT
Cleanup(func())
}
// NewSriovnetProvider creates a new instance of SriovnetProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewSriovnetProvider(t mockConstructorTestingTNewSriovnetProvider) *SriovnetProvider {
mock := &SriovnetProvider{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}