/
newlxdprofile.go
369 lines (314 loc) · 12.6 KB
/
newlxdprofile.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/juju/juju/apiserver/facades/agent/uniter (interfaces: LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2)
//
// Generated by this command:
//
// mockgen -package mocks -destination mocks/newlxdprofile.go github.com/juju/juju/apiserver/facades/agent/uniter LXDProfileBackendV2,LXDProfileMachineV2,LXDProfileUnitV2,LXDProfileCharmV2,LXDProfileModelV2
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
uniter "github.com/juju/juju/apiserver/facades/agent/uniter"
instance "github.com/juju/juju/core/instance"
lxdprofile "github.com/juju/juju/core/lxdprofile"
config "github.com/juju/juju/environs/config"
state "github.com/juju/juju/state"
names "github.com/juju/names/v5"
gomock "go.uber.org/mock/gomock"
)
// MockLXDProfileBackendV2 is a mock of LXDProfileBackendV2 interface.
type MockLXDProfileBackendV2 struct {
ctrl *gomock.Controller
recorder *MockLXDProfileBackendV2MockRecorder
}
// MockLXDProfileBackendV2MockRecorder is the mock recorder for MockLXDProfileBackendV2.
type MockLXDProfileBackendV2MockRecorder struct {
mock *MockLXDProfileBackendV2
}
// NewMockLXDProfileBackendV2 creates a new mock instance.
func NewMockLXDProfileBackendV2(ctrl *gomock.Controller) *MockLXDProfileBackendV2 {
mock := &MockLXDProfileBackendV2{ctrl: ctrl}
mock.recorder = &MockLXDProfileBackendV2MockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLXDProfileBackendV2) EXPECT() *MockLXDProfileBackendV2MockRecorder {
return m.recorder
}
// Charm mocks base method.
func (m *MockLXDProfileBackendV2) Charm(arg0 string) (uniter.LXDProfileCharmV2, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Charm", arg0)
ret0, _ := ret[0].(uniter.LXDProfileCharmV2)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Charm indicates an expected call of Charm.
func (mr *MockLXDProfileBackendV2MockRecorder) Charm(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Charm", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Charm), arg0)
}
// Machine mocks base method.
func (m *MockLXDProfileBackendV2) Machine(arg0 string) (uniter.LXDProfileMachineV2, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Machine", arg0)
ret0, _ := ret[0].(uniter.LXDProfileMachineV2)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Machine indicates an expected call of Machine.
func (mr *MockLXDProfileBackendV2MockRecorder) Machine(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Machine", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Machine), arg0)
}
// Model mocks base method.
func (m *MockLXDProfileBackendV2) Model() (uniter.LXDProfileModelV2, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Model")
ret0, _ := ret[0].(uniter.LXDProfileModelV2)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Model indicates an expected call of Model.
func (mr *MockLXDProfileBackendV2MockRecorder) Model() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Model", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Model))
}
// Unit mocks base method.
func (m *MockLXDProfileBackendV2) Unit(arg0 string) (uniter.LXDProfileUnitV2, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unit", arg0)
ret0, _ := ret[0].(uniter.LXDProfileUnitV2)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Unit indicates an expected call of Unit.
func (mr *MockLXDProfileBackendV2MockRecorder) Unit(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockLXDProfileBackendV2)(nil).Unit), arg0)
}
// MockLXDProfileMachineV2 is a mock of LXDProfileMachineV2 interface.
type MockLXDProfileMachineV2 struct {
ctrl *gomock.Controller
recorder *MockLXDProfileMachineV2MockRecorder
}
// MockLXDProfileMachineV2MockRecorder is the mock recorder for MockLXDProfileMachineV2.
type MockLXDProfileMachineV2MockRecorder struct {
mock *MockLXDProfileMachineV2
}
// NewMockLXDProfileMachineV2 creates a new mock instance.
func NewMockLXDProfileMachineV2(ctrl *gomock.Controller) *MockLXDProfileMachineV2 {
mock := &MockLXDProfileMachineV2{ctrl: ctrl}
mock.recorder = &MockLXDProfileMachineV2MockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLXDProfileMachineV2) EXPECT() *MockLXDProfileMachineV2MockRecorder {
return m.recorder
}
// CharmProfiles mocks base method.
func (m *MockLXDProfileMachineV2) CharmProfiles() ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CharmProfiles")
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CharmProfiles indicates an expected call of CharmProfiles.
func (mr *MockLXDProfileMachineV2MockRecorder) CharmProfiles() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmProfiles", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).CharmProfiles))
}
// ContainerType mocks base method.
func (m *MockLXDProfileMachineV2) ContainerType() instance.ContainerType {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerType")
ret0, _ := ret[0].(instance.ContainerType)
return ret0
}
// ContainerType indicates an expected call of ContainerType.
func (mr *MockLXDProfileMachineV2MockRecorder) ContainerType() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerType", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).ContainerType))
}
// IsManual mocks base method.
func (m *MockLXDProfileMachineV2) IsManual() (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsManual")
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// IsManual indicates an expected call of IsManual.
func (mr *MockLXDProfileMachineV2MockRecorder) IsManual() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsManual", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).IsManual))
}
// WatchInstanceData mocks base method.
func (m *MockLXDProfileMachineV2) WatchInstanceData() state.NotifyWatcher {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WatchInstanceData")
ret0, _ := ret[0].(state.NotifyWatcher)
return ret0
}
// WatchInstanceData indicates an expected call of WatchInstanceData.
func (mr *MockLXDProfileMachineV2MockRecorder) WatchInstanceData() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchInstanceData", reflect.TypeOf((*MockLXDProfileMachineV2)(nil).WatchInstanceData))
}
// MockLXDProfileUnitV2 is a mock of LXDProfileUnitV2 interface.
type MockLXDProfileUnitV2 struct {
ctrl *gomock.Controller
recorder *MockLXDProfileUnitV2MockRecorder
}
// MockLXDProfileUnitV2MockRecorder is the mock recorder for MockLXDProfileUnitV2.
type MockLXDProfileUnitV2MockRecorder struct {
mock *MockLXDProfileUnitV2
}
// NewMockLXDProfileUnitV2 creates a new mock instance.
func NewMockLXDProfileUnitV2(ctrl *gomock.Controller) *MockLXDProfileUnitV2 {
mock := &MockLXDProfileUnitV2{ctrl: ctrl}
mock.recorder = &MockLXDProfileUnitV2MockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLXDProfileUnitV2) EXPECT() *MockLXDProfileUnitV2MockRecorder {
return m.recorder
}
// ApplicationName mocks base method.
func (m *MockLXDProfileUnitV2) ApplicationName() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ApplicationName")
ret0, _ := ret[0].(string)
return ret0
}
// ApplicationName indicates an expected call of ApplicationName.
func (mr *MockLXDProfileUnitV2MockRecorder) ApplicationName() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationName", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).ApplicationName))
}
// AssignedMachineId mocks base method.
func (m *MockLXDProfileUnitV2) AssignedMachineId() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AssignedMachineId")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AssignedMachineId indicates an expected call of AssignedMachineId.
func (mr *MockLXDProfileUnitV2MockRecorder) AssignedMachineId() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignedMachineId", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).AssignedMachineId))
}
// CharmURL mocks base method.
func (m *MockLXDProfileUnitV2) CharmURL() *string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CharmURL")
ret0, _ := ret[0].(*string)
return ret0
}
// CharmURL indicates an expected call of CharmURL.
func (mr *MockLXDProfileUnitV2MockRecorder) CharmURL() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CharmURL", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).CharmURL))
}
// Name mocks base method.
func (m *MockLXDProfileUnitV2) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockLXDProfileUnitV2MockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Name))
}
// Tag mocks base method.
func (m *MockLXDProfileUnitV2) Tag() names.Tag {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tag")
ret0, _ := ret[0].(names.Tag)
return ret0
}
// Tag indicates an expected call of Tag.
func (mr *MockLXDProfileUnitV2MockRecorder) Tag() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockLXDProfileUnitV2)(nil).Tag))
}
// MockLXDProfileCharmV2 is a mock of LXDProfileCharmV2 interface.
type MockLXDProfileCharmV2 struct {
ctrl *gomock.Controller
recorder *MockLXDProfileCharmV2MockRecorder
}
// MockLXDProfileCharmV2MockRecorder is the mock recorder for MockLXDProfileCharmV2.
type MockLXDProfileCharmV2MockRecorder struct {
mock *MockLXDProfileCharmV2
}
// NewMockLXDProfileCharmV2 creates a new mock instance.
func NewMockLXDProfileCharmV2(ctrl *gomock.Controller) *MockLXDProfileCharmV2 {
mock := &MockLXDProfileCharmV2{ctrl: ctrl}
mock.recorder = &MockLXDProfileCharmV2MockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLXDProfileCharmV2) EXPECT() *MockLXDProfileCharmV2MockRecorder {
return m.recorder
}
// LXDProfile mocks base method.
func (m *MockLXDProfileCharmV2) LXDProfile() lxdprofile.Profile {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LXDProfile")
ret0, _ := ret[0].(lxdprofile.Profile)
return ret0
}
// LXDProfile indicates an expected call of LXDProfile.
func (mr *MockLXDProfileCharmV2MockRecorder) LXDProfile() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfile", reflect.TypeOf((*MockLXDProfileCharmV2)(nil).LXDProfile))
}
// MockLXDProfileModelV2 is a mock of LXDProfileModelV2 interface.
type MockLXDProfileModelV2 struct {
ctrl *gomock.Controller
recorder *MockLXDProfileModelV2MockRecorder
}
// MockLXDProfileModelV2MockRecorder is the mock recorder for MockLXDProfileModelV2.
type MockLXDProfileModelV2MockRecorder struct {
mock *MockLXDProfileModelV2
}
// NewMockLXDProfileModelV2 creates a new mock instance.
func NewMockLXDProfileModelV2(ctrl *gomock.Controller) *MockLXDProfileModelV2 {
mock := &MockLXDProfileModelV2{ctrl: ctrl}
mock.recorder = &MockLXDProfileModelV2MockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLXDProfileModelV2) EXPECT() *MockLXDProfileModelV2MockRecorder {
return m.recorder
}
// ModelConfig mocks base method.
func (m *MockLXDProfileModelV2) ModelConfig() (*config.Config, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ModelConfig")
ret0, _ := ret[0].(*config.Config)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ModelConfig indicates an expected call of ModelConfig.
func (mr *MockLXDProfileModelV2MockRecorder) ModelConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelConfig", reflect.TypeOf((*MockLXDProfileModelV2)(nil).ModelConfig))
}
// Type mocks base method.
func (m *MockLXDProfileModelV2) Type() state.ModelType {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Type")
ret0, _ := ret[0].(state.ModelType)
return ret0
}
// Type indicates an expected call of Type.
func (mr *MockLXDProfileModelV2MockRecorder) Type() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockLXDProfileModelV2)(nil).Type))
}