-
Notifications
You must be signed in to change notification settings - Fork 4
/
mock_netlink.go
408 lines (349 loc) · 13.9 KB
/
mock_netlink.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/baidubce/baiducloud-cce-cni-driver/pkg/wrapper/netlink (interfaces: Interface)
// Package testing is a generated GoMock package.
package testing
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
netlink "github.com/vishvananda/netlink"
)
// MockInterface is a mock of Interface interface.
type MockInterface struct {
ctrl *gomock.Controller
recorder *MockInterfaceMockRecorder
}
// MockInterfaceMockRecorder is the mock recorder for MockInterface.
type MockInterfaceMockRecorder struct {
mock *MockInterface
}
// NewMockInterface creates a new mock instance.
func NewMockInterface(ctrl *gomock.Controller) *MockInterface {
mock := &MockInterface{ctrl: ctrl}
mock.recorder = &MockInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
// AddrAdd mocks base method.
func (m *MockInterface) AddrAdd(arg0 netlink.Link, arg1 *netlink.Addr) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddrAdd", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddrAdd indicates an expected call of AddrAdd.
func (mr *MockInterfaceMockRecorder) AddrAdd(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddrAdd", reflect.TypeOf((*MockInterface)(nil).AddrAdd), arg0, arg1)
}
// AddrDel mocks base method.
func (m *MockInterface) AddrDel(arg0 netlink.Link, arg1 *netlink.Addr) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddrDel", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddrDel indicates an expected call of AddrDel.
func (mr *MockInterfaceMockRecorder) AddrDel(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddrDel", reflect.TypeOf((*MockInterface)(nil).AddrDel), arg0, arg1)
}
// AddrList mocks base method.
func (m *MockInterface) AddrList(arg0 netlink.Link, arg1 int) ([]netlink.Addr, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddrList", arg0, arg1)
ret0, _ := ret[0].([]netlink.Addr)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddrList indicates an expected call of AddrList.
func (mr *MockInterfaceMockRecorder) AddrList(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddrList", reflect.TypeOf((*MockInterface)(nil).AddrList), arg0, arg1)
}
// LinkAdd mocks base method.
func (m *MockInterface) LinkAdd(arg0 netlink.Link) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkAdd", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// LinkAdd indicates an expected call of LinkAdd.
func (mr *MockInterfaceMockRecorder) LinkAdd(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkAdd", reflect.TypeOf((*MockInterface)(nil).LinkAdd), arg0)
}
// LinkByIndex mocks base method.
func (m *MockInterface) LinkByIndex(arg0 int) (netlink.Link, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkByIndex", arg0)
ret0, _ := ret[0].(netlink.Link)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LinkByIndex indicates an expected call of LinkByIndex.
func (mr *MockInterfaceMockRecorder) LinkByIndex(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkByIndex", reflect.TypeOf((*MockInterface)(nil).LinkByIndex), arg0)
}
// LinkByName mocks base method.
func (m *MockInterface) LinkByName(arg0 string) (netlink.Link, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkByName", arg0)
ret0, _ := ret[0].(netlink.Link)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LinkByName indicates an expected call of LinkByName.
func (mr *MockInterfaceMockRecorder) LinkByName(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkByName", reflect.TypeOf((*MockInterface)(nil).LinkByName), arg0)
}
// LinkDel mocks base method.
func (m *MockInterface) LinkDel(arg0 netlink.Link) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkDel", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// LinkDel indicates an expected call of LinkDel.
func (mr *MockInterfaceMockRecorder) LinkDel(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkDel", reflect.TypeOf((*MockInterface)(nil).LinkDel), arg0)
}
// LinkList mocks base method.
func (m *MockInterface) LinkList() ([]netlink.Link, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkList")
ret0, _ := ret[0].([]netlink.Link)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LinkList indicates an expected call of LinkList.
func (mr *MockInterfaceMockRecorder) LinkList() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkList", reflect.TypeOf((*MockInterface)(nil).LinkList))
}
// LinkSetDown mocks base method.
func (m *MockInterface) LinkSetDown(arg0 netlink.Link) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkSetDown", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// LinkSetDown indicates an expected call of LinkSetDown.
func (mr *MockInterfaceMockRecorder) LinkSetDown(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkSetDown", reflect.TypeOf((*MockInterface)(nil).LinkSetDown), arg0)
}
// LinkSetMTU mocks base method.
func (m *MockInterface) LinkSetMTU(arg0 netlink.Link, arg1 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkSetMTU", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LinkSetMTU indicates an expected call of LinkSetMTU.
func (mr *MockInterfaceMockRecorder) LinkSetMTU(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkSetMTU", reflect.TypeOf((*MockInterface)(nil).LinkSetMTU), arg0, arg1)
}
// LinkSetName mocks base method.
func (m *MockInterface) LinkSetName(arg0 netlink.Link, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkSetName", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LinkSetName indicates an expected call of LinkSetName.
func (mr *MockInterfaceMockRecorder) LinkSetName(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkSetName", reflect.TypeOf((*MockInterface)(nil).LinkSetName), arg0, arg1)
}
// LinkSetNsFd mocks base method.
func (m *MockInterface) LinkSetNsFd(arg0 netlink.Link, arg1 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkSetNsFd", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LinkSetNsFd indicates an expected call of LinkSetNsFd.
func (mr *MockInterfaceMockRecorder) LinkSetNsFd(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkSetNsFd", reflect.TypeOf((*MockInterface)(nil).LinkSetNsFd), arg0, arg1)
}
// LinkSetUp mocks base method.
func (m *MockInterface) LinkSetUp(arg0 netlink.Link) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkSetUp", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// LinkSetUp indicates an expected call of LinkSetUp.
func (mr *MockInterfaceMockRecorder) LinkSetUp(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkSetUp", reflect.TypeOf((*MockInterface)(nil).LinkSetUp), arg0)
}
// NeighAdd mocks base method.
func (m *MockInterface) NeighAdd(arg0 *netlink.Neigh) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NeighAdd", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// NeighAdd indicates an expected call of NeighAdd.
func (mr *MockInterfaceMockRecorder) NeighAdd(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeighAdd", reflect.TypeOf((*MockInterface)(nil).NeighAdd), arg0)
}
// NeighDel mocks base method.
func (m *MockInterface) NeighDel(arg0 *netlink.Neigh) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NeighDel", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// NeighDel indicates an expected call of NeighDel.
func (mr *MockInterfaceMockRecorder) NeighDel(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeighDel", reflect.TypeOf((*MockInterface)(nil).NeighDel), arg0)
}
// NeighList mocks base method.
func (m *MockInterface) NeighList(arg0, arg1 int) ([]netlink.Neigh, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NeighList", arg0, arg1)
ret0, _ := ret[0].([]netlink.Neigh)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NeighList indicates an expected call of NeighList.
func (mr *MockInterfaceMockRecorder) NeighList(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeighList", reflect.TypeOf((*MockInterface)(nil).NeighList), arg0, arg1)
}
// NewRule mocks base method.
func (m *MockInterface) NewRule() *netlink.Rule {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewRule")
ret0, _ := ret[0].(*netlink.Rule)
return ret0
}
// NewRule indicates an expected call of NewRule.
func (mr *MockInterfaceMockRecorder) NewRule() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRule", reflect.TypeOf((*MockInterface)(nil).NewRule))
}
// ParseAddr mocks base method.
func (m *MockInterface) ParseAddr(arg0 string) (*netlink.Addr, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ParseAddr", arg0)
ret0, _ := ret[0].(*netlink.Addr)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ParseAddr indicates an expected call of ParseAddr.
func (mr *MockInterfaceMockRecorder) ParseAddr(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseAddr", reflect.TypeOf((*MockInterface)(nil).ParseAddr), arg0)
}
// RouteAdd mocks base method.
func (m *MockInterface) RouteAdd(arg0 *netlink.Route) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteAdd", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RouteAdd indicates an expected call of RouteAdd.
func (mr *MockInterfaceMockRecorder) RouteAdd(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteAdd", reflect.TypeOf((*MockInterface)(nil).RouteAdd), arg0)
}
// RouteDel mocks base method.
func (m *MockInterface) RouteDel(arg0 *netlink.Route) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteDel", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RouteDel indicates an expected call of RouteDel.
func (mr *MockInterfaceMockRecorder) RouteDel(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteDel", reflect.TypeOf((*MockInterface)(nil).RouteDel), arg0)
}
// RouteList mocks base method.
func (m *MockInterface) RouteList(arg0 netlink.Link, arg1 int) ([]netlink.Route, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteList", arg0, arg1)
ret0, _ := ret[0].([]netlink.Route)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RouteList indicates an expected call of RouteList.
func (mr *MockInterfaceMockRecorder) RouteList(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteList", reflect.TypeOf((*MockInterface)(nil).RouteList), arg0, arg1)
}
// RouteListFiltered mocks base method.
func (m *MockInterface) RouteListFiltered(arg0 int, arg1 *netlink.Route, arg2 uint64) ([]netlink.Route, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteListFiltered", arg0, arg1, arg2)
ret0, _ := ret[0].([]netlink.Route)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RouteListFiltered indicates an expected call of RouteListFiltered.
func (mr *MockInterfaceMockRecorder) RouteListFiltered(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteListFiltered", reflect.TypeOf((*MockInterface)(nil).RouteListFiltered), arg0, arg1, arg2)
}
// RouteReplace mocks base method.
func (m *MockInterface) RouteReplace(arg0 *netlink.Route) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteReplace", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RouteReplace indicates an expected call of RouteReplace.
func (mr *MockInterfaceMockRecorder) RouteReplace(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteReplace", reflect.TypeOf((*MockInterface)(nil).RouteReplace), arg0)
}
// RuleAdd mocks base method.
func (m *MockInterface) RuleAdd(arg0 *netlink.Rule) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RuleAdd", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RuleAdd indicates an expected call of RuleAdd.
func (mr *MockInterfaceMockRecorder) RuleAdd(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuleAdd", reflect.TypeOf((*MockInterface)(nil).RuleAdd), arg0)
}
// RuleDel mocks base method.
func (m *MockInterface) RuleDel(arg0 *netlink.Rule) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RuleDel", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RuleDel indicates an expected call of RuleDel.
func (mr *MockInterfaceMockRecorder) RuleDel(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuleDel", reflect.TypeOf((*MockInterface)(nil).RuleDel), arg0)
}
// RuleList mocks base method.
func (m *MockInterface) RuleList(arg0 int) ([]netlink.Rule, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RuleList", arg0)
ret0, _ := ret[0].([]netlink.Rule)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RuleList indicates an expected call of RuleList.
func (mr *MockInterfaceMockRecorder) RuleList(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuleList", reflect.TypeOf((*MockInterface)(nil).RuleList), arg0)
}