forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_deployment.go
1431 lines (1304 loc) · 42 KB
/
fake_deployment.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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This file was generated by counterfeiter
package directorfakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/director"
)
type FakeDeployment struct {
NameStub func() string
nameMutex sync.RWMutex
nameArgsForCall []struct{}
nameReturns struct {
result1 string
}
ManifestStub func() (string, error)
manifestMutex sync.RWMutex
manifestArgsForCall []struct{}
manifestReturns struct {
result1 string
result2 error
}
CloudConfigStub func() (string, error)
cloudConfigMutex sync.RWMutex
cloudConfigArgsForCall []struct{}
cloudConfigReturns struct {
result1 string
result2 error
}
DiffStub func([]byte, bool) (director.DeploymentDiff, error)
diffMutex sync.RWMutex
diffArgsForCall []struct {
arg1 []byte
arg2 bool
}
diffReturns struct {
result1 director.DeploymentDiff
result2 error
}
ReleasesStub func() ([]director.Release, error)
releasesMutex sync.RWMutex
releasesArgsForCall []struct{}
releasesReturns struct {
result1 []director.Release
result2 error
}
ExportReleaseStub func(director.ReleaseSlug, director.OSVersionSlug) (director.ExportReleaseResult, error)
exportReleaseMutex sync.RWMutex
exportReleaseArgsForCall []struct {
arg1 director.ReleaseSlug
arg2 director.OSVersionSlug
}
exportReleaseReturns struct {
result1 director.ExportReleaseResult
result2 error
}
TeamsStub func() ([]string, error)
teamsMutex sync.RWMutex
teamsArgsForCall []struct{}
teamsReturns struct {
result1 []string
result2 error
}
StemcellsStub func() ([]director.Stemcell, error)
stemcellsMutex sync.RWMutex
stemcellsArgsForCall []struct{}
stemcellsReturns struct {
result1 []director.Stemcell
result2 error
}
VMInfosStub func() ([]director.VMInfo, error)
vMInfosMutex sync.RWMutex
vMInfosArgsForCall []struct{}
vMInfosReturns struct {
result1 []director.VMInfo
result2 error
}
InstancesStub func() ([]director.Instance, error)
instancesMutex sync.RWMutex
instancesArgsForCall []struct{}
instancesReturns struct {
result1 []director.Instance
result2 error
}
InstanceInfosStub func() ([]director.VMInfo, error)
instanceInfosMutex sync.RWMutex
instanceInfosArgsForCall []struct{}
instanceInfosReturns struct {
result1 []director.VMInfo
result2 error
}
ErrandsStub func() ([]director.Errand, error)
errandsMutex sync.RWMutex
errandsArgsForCall []struct{}
errandsReturns struct {
result1 []director.Errand
result2 error
}
RunErrandStub func(string, bool, bool) ([]director.ErrandResult, error)
runErrandMutex sync.RWMutex
runErrandArgsForCall []struct {
arg1 string
arg2 bool
arg3 bool
}
runErrandReturns struct {
result1 []director.ErrandResult
result2 error
}
ScanForProblemsStub func() ([]director.Problem, error)
scanForProblemsMutex sync.RWMutex
scanForProblemsArgsForCall []struct{}
scanForProblemsReturns struct {
result1 []director.Problem
result2 error
}
ResolveProblemsStub func([]director.ProblemAnswer) error
resolveProblemsMutex sync.RWMutex
resolveProblemsArgsForCall []struct {
arg1 []director.ProblemAnswer
}
resolveProblemsReturns struct {
result1 error
}
SnapshotsStub func() ([]director.Snapshot, error)
snapshotsMutex sync.RWMutex
snapshotsArgsForCall []struct{}
snapshotsReturns struct {
result1 []director.Snapshot
result2 error
}
TakeSnapshotsStub func() error
takeSnapshotsMutex sync.RWMutex
takeSnapshotsArgsForCall []struct{}
takeSnapshotsReturns struct {
result1 error
}
DeleteSnapshotStub func(string) error
deleteSnapshotMutex sync.RWMutex
deleteSnapshotArgsForCall []struct {
arg1 string
}
deleteSnapshotReturns struct {
result1 error
}
DeleteSnapshotsStub func() error
deleteSnapshotsMutex sync.RWMutex
deleteSnapshotsArgsForCall []struct{}
deleteSnapshotsReturns struct {
result1 error
}
DeleteVMStub func(string) error
deleteVMMutex sync.RWMutex
deleteVMArgsForCall []struct {
arg1 string
}
deleteVMReturns struct {
result1 error
}
VariablesStub func() ([]director.VariableResult, error)
variablesMutex sync.RWMutex
variablesArgsForCall []struct{}
variablesReturns struct {
result1 []director.VariableResult
result2 error
}
StartStub func(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.StartOpts) error
startMutex sync.RWMutex
startArgsForCall []struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.StartOpts
}
startReturns struct {
result1 error
}
StopStub func(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.StopOpts) error
stopMutex sync.RWMutex
stopArgsForCall []struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.StopOpts
}
stopReturns struct {
result1 error
}
RestartStub func(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.RestartOpts) error
restartMutex sync.RWMutex
restartArgsForCall []struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.RestartOpts
}
restartReturns struct {
result1 error
}
RecreateStub func(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.RecreateOpts) error
recreateMutex sync.RWMutex
recreateArgsForCall []struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.RecreateOpts
}
recreateReturns struct {
result1 error
}
SetUpSSHStub func(director.AllOrInstanceGroupOrInstanceSlug, director.SSHOpts) (director.SSHResult, error)
setUpSSHMutex sync.RWMutex
setUpSSHArgsForCall []struct {
arg1 director.AllOrInstanceGroupOrInstanceSlug
arg2 director.SSHOpts
}
setUpSSHReturns struct {
result1 director.SSHResult
result2 error
}
CleanUpSSHStub func(director.AllOrInstanceGroupOrInstanceSlug, director.SSHOpts) error
cleanUpSSHMutex sync.RWMutex
cleanUpSSHArgsForCall []struct {
arg1 director.AllOrInstanceGroupOrInstanceSlug
arg2 director.SSHOpts
}
cleanUpSSHReturns struct {
result1 error
}
FetchLogsStub func(director.AllOrInstanceGroupOrInstanceSlug, []string, bool) (director.LogsResult, error)
fetchLogsMutex sync.RWMutex
fetchLogsArgsForCall []struct {
arg1 director.AllOrInstanceGroupOrInstanceSlug
arg2 []string
arg3 bool
}
fetchLogsReturns struct {
result1 director.LogsResult
result2 error
}
TakeSnapshotStub func(director.InstanceSlug) error
takeSnapshotMutex sync.RWMutex
takeSnapshotArgsForCall []struct {
arg1 director.InstanceSlug
}
takeSnapshotReturns struct {
result1 error
}
IgnoreStub func(director.InstanceSlug, bool) error
ignoreMutex sync.RWMutex
ignoreArgsForCall []struct {
arg1 director.InstanceSlug
arg2 bool
}
ignoreReturns struct {
result1 error
}
EnableResurrectionStub func(director.InstanceSlug, bool) error
enableResurrectionMutex sync.RWMutex
enableResurrectionArgsForCall []struct {
arg1 director.InstanceSlug
arg2 bool
}
enableResurrectionReturns struct {
result1 error
}
UpdateStub func(manifest []byte, opts director.UpdateOpts) error
updateMutex sync.RWMutex
updateArgsForCall []struct {
manifest []byte
opts director.UpdateOpts
}
updateReturns struct {
result1 error
}
DeleteStub func(force bool) error
deleteMutex sync.RWMutex
deleteArgsForCall []struct {
force bool
}
deleteReturns struct {
result1 error
}
AttachDiskStub func(slug director.InstanceSlug, diskCID string) error
attachDiskMutex sync.RWMutex
attachDiskArgsForCall []struct {
slug director.InstanceSlug
diskCID string
}
attachDiskReturns struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeDeployment) Name() string {
fake.nameMutex.Lock()
fake.nameArgsForCall = append(fake.nameArgsForCall, struct{}{})
fake.recordInvocation("Name", []interface{}{})
fake.nameMutex.Unlock()
if fake.NameStub != nil {
return fake.NameStub()
} else {
return fake.nameReturns.result1
}
}
func (fake *FakeDeployment) NameCallCount() int {
fake.nameMutex.RLock()
defer fake.nameMutex.RUnlock()
return len(fake.nameArgsForCall)
}
func (fake *FakeDeployment) NameReturns(result1 string) {
fake.NameStub = nil
fake.nameReturns = struct {
result1 string
}{result1}
}
func (fake *FakeDeployment) Manifest() (string, error) {
fake.manifestMutex.Lock()
fake.manifestArgsForCall = append(fake.manifestArgsForCall, struct{}{})
fake.recordInvocation("Manifest", []interface{}{})
fake.manifestMutex.Unlock()
if fake.ManifestStub != nil {
return fake.ManifestStub()
} else {
return fake.manifestReturns.result1, fake.manifestReturns.result2
}
}
func (fake *FakeDeployment) ManifestCallCount() int {
fake.manifestMutex.RLock()
defer fake.manifestMutex.RUnlock()
return len(fake.manifestArgsForCall)
}
func (fake *FakeDeployment) ManifestReturns(result1 string, result2 error) {
fake.ManifestStub = nil
fake.manifestReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) CloudConfig() (string, error) {
fake.cloudConfigMutex.Lock()
fake.cloudConfigArgsForCall = append(fake.cloudConfigArgsForCall, struct{}{})
fake.recordInvocation("CloudConfig", []interface{}{})
fake.cloudConfigMutex.Unlock()
if fake.CloudConfigStub != nil {
return fake.CloudConfigStub()
} else {
return fake.cloudConfigReturns.result1, fake.cloudConfigReturns.result2
}
}
func (fake *FakeDeployment) CloudConfigCallCount() int {
fake.cloudConfigMutex.RLock()
defer fake.cloudConfigMutex.RUnlock()
return len(fake.cloudConfigArgsForCall)
}
func (fake *FakeDeployment) CloudConfigReturns(result1 string, result2 error) {
fake.CloudConfigStub = nil
fake.cloudConfigReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Diff(arg1 []byte, arg2 bool) (director.DeploymentDiff, error) {
var arg1Copy []byte
if arg1 != nil {
arg1Copy = make([]byte, len(arg1))
copy(arg1Copy, arg1)
}
fake.diffMutex.Lock()
fake.diffArgsForCall = append(fake.diffArgsForCall, struct {
arg1 []byte
arg2 bool
}{arg1Copy, arg2})
fake.recordInvocation("Diff", []interface{}{arg1Copy, arg2})
fake.diffMutex.Unlock()
if fake.DiffStub != nil {
return fake.DiffStub(arg1, arg2)
} else {
return fake.diffReturns.result1, fake.diffReturns.result2
}
}
func (fake *FakeDeployment) DiffCallCount() int {
fake.diffMutex.RLock()
defer fake.diffMutex.RUnlock()
return len(fake.diffArgsForCall)
}
func (fake *FakeDeployment) DiffArgsForCall(i int) ([]byte, bool) {
fake.diffMutex.RLock()
defer fake.diffMutex.RUnlock()
return fake.diffArgsForCall[i].arg1, fake.diffArgsForCall[i].arg2
}
func (fake *FakeDeployment) DiffReturns(result1 director.DeploymentDiff, result2 error) {
fake.DiffStub = nil
fake.diffReturns = struct {
result1 director.DeploymentDiff
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Releases() ([]director.Release, error) {
fake.releasesMutex.Lock()
fake.releasesArgsForCall = append(fake.releasesArgsForCall, struct{}{})
fake.recordInvocation("Releases", []interface{}{})
fake.releasesMutex.Unlock()
if fake.ReleasesStub != nil {
return fake.ReleasesStub()
} else {
return fake.releasesReturns.result1, fake.releasesReturns.result2
}
}
func (fake *FakeDeployment) ReleasesCallCount() int {
fake.releasesMutex.RLock()
defer fake.releasesMutex.RUnlock()
return len(fake.releasesArgsForCall)
}
func (fake *FakeDeployment) ReleasesReturns(result1 []director.Release, result2 error) {
fake.ReleasesStub = nil
fake.releasesReturns = struct {
result1 []director.Release
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) ExportRelease(arg1 director.ReleaseSlug, arg2 director.OSVersionSlug) (director.ExportReleaseResult, error) {
fake.exportReleaseMutex.Lock()
fake.exportReleaseArgsForCall = append(fake.exportReleaseArgsForCall, struct {
arg1 director.ReleaseSlug
arg2 director.OSVersionSlug
}{arg1, arg2})
fake.recordInvocation("ExportRelease", []interface{}{arg1, arg2})
fake.exportReleaseMutex.Unlock()
if fake.ExportReleaseStub != nil {
return fake.ExportReleaseStub(arg1, arg2)
} else {
return fake.exportReleaseReturns.result1, fake.exportReleaseReturns.result2
}
}
func (fake *FakeDeployment) ExportReleaseCallCount() int {
fake.exportReleaseMutex.RLock()
defer fake.exportReleaseMutex.RUnlock()
return len(fake.exportReleaseArgsForCall)
}
func (fake *FakeDeployment) ExportReleaseArgsForCall(i int) (director.ReleaseSlug, director.OSVersionSlug) {
fake.exportReleaseMutex.RLock()
defer fake.exportReleaseMutex.RUnlock()
return fake.exportReleaseArgsForCall[i].arg1, fake.exportReleaseArgsForCall[i].arg2
}
func (fake *FakeDeployment) ExportReleaseReturns(result1 director.ExportReleaseResult, result2 error) {
fake.ExportReleaseStub = nil
fake.exportReleaseReturns = struct {
result1 director.ExportReleaseResult
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Teams() ([]string, error) {
fake.teamsMutex.Lock()
fake.teamsArgsForCall = append(fake.teamsArgsForCall, struct{}{})
fake.recordInvocation("Teams", []interface{}{})
fake.teamsMutex.Unlock()
if fake.TeamsStub != nil {
return fake.TeamsStub()
} else {
return fake.teamsReturns.result1, fake.teamsReturns.result2
}
}
func (fake *FakeDeployment) TeamsCallCount() int {
fake.teamsMutex.RLock()
defer fake.teamsMutex.RUnlock()
return len(fake.teamsArgsForCall)
}
func (fake *FakeDeployment) TeamsReturns(result1 []string, result2 error) {
fake.TeamsStub = nil
fake.teamsReturns = struct {
result1 []string
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Stemcells() ([]director.Stemcell, error) {
fake.stemcellsMutex.Lock()
fake.stemcellsArgsForCall = append(fake.stemcellsArgsForCall, struct{}{})
fake.recordInvocation("Stemcells", []interface{}{})
fake.stemcellsMutex.Unlock()
if fake.StemcellsStub != nil {
return fake.StemcellsStub()
} else {
return fake.stemcellsReturns.result1, fake.stemcellsReturns.result2
}
}
func (fake *FakeDeployment) StemcellsCallCount() int {
fake.stemcellsMutex.RLock()
defer fake.stemcellsMutex.RUnlock()
return len(fake.stemcellsArgsForCall)
}
func (fake *FakeDeployment) StemcellsReturns(result1 []director.Stemcell, result2 error) {
fake.StemcellsStub = nil
fake.stemcellsReturns = struct {
result1 []director.Stemcell
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) VMInfos() ([]director.VMInfo, error) {
fake.vMInfosMutex.Lock()
fake.vMInfosArgsForCall = append(fake.vMInfosArgsForCall, struct{}{})
fake.recordInvocation("VMInfos", []interface{}{})
fake.vMInfosMutex.Unlock()
if fake.VMInfosStub != nil {
return fake.VMInfosStub()
} else {
return fake.vMInfosReturns.result1, fake.vMInfosReturns.result2
}
}
func (fake *FakeDeployment) VMInfosCallCount() int {
fake.vMInfosMutex.RLock()
defer fake.vMInfosMutex.RUnlock()
return len(fake.vMInfosArgsForCall)
}
func (fake *FakeDeployment) VMInfosReturns(result1 []director.VMInfo, result2 error) {
fake.VMInfosStub = nil
fake.vMInfosReturns = struct {
result1 []director.VMInfo
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Instances() ([]director.Instance, error) {
fake.instancesMutex.Lock()
fake.instancesArgsForCall = append(fake.instancesArgsForCall, struct{}{})
fake.recordInvocation("Instances", []interface{}{})
fake.instancesMutex.Unlock()
if fake.InstancesStub != nil {
return fake.InstancesStub()
} else {
return fake.instancesReturns.result1, fake.instancesReturns.result2
}
}
func (fake *FakeDeployment) InstancesCallCount() int {
fake.instancesMutex.RLock()
defer fake.instancesMutex.RUnlock()
return len(fake.instancesArgsForCall)
}
func (fake *FakeDeployment) InstancesReturns(result1 []director.Instance, result2 error) {
fake.InstancesStub = nil
fake.instancesReturns = struct {
result1 []director.Instance
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) InstanceInfos() ([]director.VMInfo, error) {
fake.instanceInfosMutex.Lock()
fake.instanceInfosArgsForCall = append(fake.instanceInfosArgsForCall, struct{}{})
fake.recordInvocation("InstanceInfos", []interface{}{})
fake.instanceInfosMutex.Unlock()
if fake.InstanceInfosStub != nil {
return fake.InstanceInfosStub()
} else {
return fake.instanceInfosReturns.result1, fake.instanceInfosReturns.result2
}
}
func (fake *FakeDeployment) InstanceInfosCallCount() int {
fake.instanceInfosMutex.RLock()
defer fake.instanceInfosMutex.RUnlock()
return len(fake.instanceInfosArgsForCall)
}
func (fake *FakeDeployment) InstanceInfosReturns(result1 []director.VMInfo, result2 error) {
fake.InstanceInfosStub = nil
fake.instanceInfosReturns = struct {
result1 []director.VMInfo
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Errands() ([]director.Errand, error) {
fake.errandsMutex.Lock()
fake.errandsArgsForCall = append(fake.errandsArgsForCall, struct{}{})
fake.recordInvocation("Errands", []interface{}{})
fake.errandsMutex.Unlock()
if fake.ErrandsStub != nil {
return fake.ErrandsStub()
} else {
return fake.errandsReturns.result1, fake.errandsReturns.result2
}
}
func (fake *FakeDeployment) ErrandsCallCount() int {
fake.errandsMutex.RLock()
defer fake.errandsMutex.RUnlock()
return len(fake.errandsArgsForCall)
}
func (fake *FakeDeployment) ErrandsReturns(result1 []director.Errand, result2 error) {
fake.ErrandsStub = nil
fake.errandsReturns = struct {
result1 []director.Errand
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) RunErrand(arg1 string, arg2 bool, arg3 bool) ([]director.ErrandResult, error) {
fake.runErrandMutex.Lock()
fake.runErrandArgsForCall = append(fake.runErrandArgsForCall, struct {
arg1 string
arg2 bool
arg3 bool
}{arg1, arg2, arg3})
fake.recordInvocation("RunErrand", []interface{}{arg1, arg2, arg3})
fake.runErrandMutex.Unlock()
if fake.RunErrandStub != nil {
return fake.RunErrandStub(arg1, arg2, arg3)
} else {
return fake.runErrandReturns.result1, fake.runErrandReturns.result2
}
}
func (fake *FakeDeployment) RunErrandCallCount() int {
fake.runErrandMutex.RLock()
defer fake.runErrandMutex.RUnlock()
return len(fake.runErrandArgsForCall)
}
func (fake *FakeDeployment) RunErrandArgsForCall(i int) (string, bool, bool) {
fake.runErrandMutex.RLock()
defer fake.runErrandMutex.RUnlock()
return fake.runErrandArgsForCall[i].arg1, fake.runErrandArgsForCall[i].arg2, fake.runErrandArgsForCall[i].arg3
}
func (fake *FakeDeployment) RunErrandReturns(result1 []director.ErrandResult, result2 error) {
fake.RunErrandStub = nil
fake.runErrandReturns = struct {
result1 []director.ErrandResult
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) ScanForProblems() ([]director.Problem, error) {
fake.scanForProblemsMutex.Lock()
fake.scanForProblemsArgsForCall = append(fake.scanForProblemsArgsForCall, struct{}{})
fake.recordInvocation("ScanForProblems", []interface{}{})
fake.scanForProblemsMutex.Unlock()
if fake.ScanForProblemsStub != nil {
return fake.ScanForProblemsStub()
} else {
return fake.scanForProblemsReturns.result1, fake.scanForProblemsReturns.result2
}
}
func (fake *FakeDeployment) ScanForProblemsCallCount() int {
fake.scanForProblemsMutex.RLock()
defer fake.scanForProblemsMutex.RUnlock()
return len(fake.scanForProblemsArgsForCall)
}
func (fake *FakeDeployment) ScanForProblemsReturns(result1 []director.Problem, result2 error) {
fake.ScanForProblemsStub = nil
fake.scanForProblemsReturns = struct {
result1 []director.Problem
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) ResolveProblems(arg1 []director.ProblemAnswer) error {
var arg1Copy []director.ProblemAnswer
if arg1 != nil {
arg1Copy = make([]director.ProblemAnswer, len(arg1))
copy(arg1Copy, arg1)
}
fake.resolveProblemsMutex.Lock()
fake.resolveProblemsArgsForCall = append(fake.resolveProblemsArgsForCall, struct {
arg1 []director.ProblemAnswer
}{arg1Copy})
fake.recordInvocation("ResolveProblems", []interface{}{arg1Copy})
fake.resolveProblemsMutex.Unlock()
if fake.ResolveProblemsStub != nil {
return fake.ResolveProblemsStub(arg1)
} else {
return fake.resolveProblemsReturns.result1
}
}
func (fake *FakeDeployment) ResolveProblemsCallCount() int {
fake.resolveProblemsMutex.RLock()
defer fake.resolveProblemsMutex.RUnlock()
return len(fake.resolveProblemsArgsForCall)
}
func (fake *FakeDeployment) ResolveProblemsArgsForCall(i int) []director.ProblemAnswer {
fake.resolveProblemsMutex.RLock()
defer fake.resolveProblemsMutex.RUnlock()
return fake.resolveProblemsArgsForCall[i].arg1
}
func (fake *FakeDeployment) ResolveProblemsReturns(result1 error) {
fake.ResolveProblemsStub = nil
fake.resolveProblemsReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) Snapshots() ([]director.Snapshot, error) {
fake.snapshotsMutex.Lock()
fake.snapshotsArgsForCall = append(fake.snapshotsArgsForCall, struct{}{})
fake.recordInvocation("Snapshots", []interface{}{})
fake.snapshotsMutex.Unlock()
if fake.SnapshotsStub != nil {
return fake.SnapshotsStub()
} else {
return fake.snapshotsReturns.result1, fake.snapshotsReturns.result2
}
}
func (fake *FakeDeployment) SnapshotsCallCount() int {
fake.snapshotsMutex.RLock()
defer fake.snapshotsMutex.RUnlock()
return len(fake.snapshotsArgsForCall)
}
func (fake *FakeDeployment) SnapshotsReturns(result1 []director.Snapshot, result2 error) {
fake.SnapshotsStub = nil
fake.snapshotsReturns = struct {
result1 []director.Snapshot
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) TakeSnapshots() error {
fake.takeSnapshotsMutex.Lock()
fake.takeSnapshotsArgsForCall = append(fake.takeSnapshotsArgsForCall, struct{}{})
fake.recordInvocation("TakeSnapshots", []interface{}{})
fake.takeSnapshotsMutex.Unlock()
if fake.TakeSnapshotsStub != nil {
return fake.TakeSnapshotsStub()
} else {
return fake.takeSnapshotsReturns.result1
}
}
func (fake *FakeDeployment) TakeSnapshotsCallCount() int {
fake.takeSnapshotsMutex.RLock()
defer fake.takeSnapshotsMutex.RUnlock()
return len(fake.takeSnapshotsArgsForCall)
}
func (fake *FakeDeployment) TakeSnapshotsReturns(result1 error) {
fake.TakeSnapshotsStub = nil
fake.takeSnapshotsReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) DeleteSnapshot(arg1 string) error {
fake.deleteSnapshotMutex.Lock()
fake.deleteSnapshotArgsForCall = append(fake.deleteSnapshotArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("DeleteSnapshot", []interface{}{arg1})
fake.deleteSnapshotMutex.Unlock()
if fake.DeleteSnapshotStub != nil {
return fake.DeleteSnapshotStub(arg1)
} else {
return fake.deleteSnapshotReturns.result1
}
}
func (fake *FakeDeployment) DeleteSnapshotCallCount() int {
fake.deleteSnapshotMutex.RLock()
defer fake.deleteSnapshotMutex.RUnlock()
return len(fake.deleteSnapshotArgsForCall)
}
func (fake *FakeDeployment) DeleteSnapshotArgsForCall(i int) string {
fake.deleteSnapshotMutex.RLock()
defer fake.deleteSnapshotMutex.RUnlock()
return fake.deleteSnapshotArgsForCall[i].arg1
}
func (fake *FakeDeployment) DeleteSnapshotReturns(result1 error) {
fake.DeleteSnapshotStub = nil
fake.deleteSnapshotReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) DeleteSnapshots() error {
fake.deleteSnapshotsMutex.Lock()
fake.deleteSnapshotsArgsForCall = append(fake.deleteSnapshotsArgsForCall, struct{}{})
fake.recordInvocation("DeleteSnapshots", []interface{}{})
fake.deleteSnapshotsMutex.Unlock()
if fake.DeleteSnapshotsStub != nil {
return fake.DeleteSnapshotsStub()
} else {
return fake.deleteSnapshotsReturns.result1
}
}
func (fake *FakeDeployment) DeleteSnapshotsCallCount() int {
fake.deleteSnapshotsMutex.RLock()
defer fake.deleteSnapshotsMutex.RUnlock()
return len(fake.deleteSnapshotsArgsForCall)
}
func (fake *FakeDeployment) DeleteSnapshotsReturns(result1 error) {
fake.DeleteSnapshotsStub = nil
fake.deleteSnapshotsReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) DeleteVM(arg1 string) error {
fake.deleteVMMutex.Lock()
fake.deleteVMArgsForCall = append(fake.deleteVMArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("DeleteVM", []interface{}{arg1})
fake.deleteVMMutex.Unlock()
if fake.DeleteVMStub != nil {
return fake.DeleteVMStub(arg1)
} else {
return fake.deleteVMReturns.result1
}
}
func (fake *FakeDeployment) DeleteVMCallCount() int {
fake.deleteVMMutex.RLock()
defer fake.deleteVMMutex.RUnlock()
return len(fake.deleteVMArgsForCall)
}
func (fake *FakeDeployment) DeleteVMArgsForCall(i int) string {
fake.deleteVMMutex.RLock()
defer fake.deleteVMMutex.RUnlock()
return fake.deleteVMArgsForCall[i].arg1
}
func (fake *FakeDeployment) DeleteVMReturns(result1 error) {
fake.DeleteVMStub = nil
fake.deleteVMReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) Variables() ([]director.VariableResult, error) {
fake.variablesMutex.Lock()
fake.variablesArgsForCall = append(fake.variablesArgsForCall, struct{}{})
fake.recordInvocation("Variables", []interface{}{})
fake.variablesMutex.Unlock()
if fake.VariablesStub != nil {
return fake.VariablesStub()
} else {
return fake.variablesReturns.result1, fake.variablesReturns.result2
}
}
func (fake *FakeDeployment) VariablesCallCount() int {
fake.variablesMutex.RLock()
defer fake.variablesMutex.RUnlock()
return len(fake.variablesArgsForCall)
}
func (fake *FakeDeployment) VariablesReturns(result1 []director.VariableResult, result2 error) {
fake.VariablesStub = nil
fake.variablesReturns = struct {
result1 []director.VariableResult
result2 error
}{result1, result2}
}
func (fake *FakeDeployment) Start(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.StartOpts) error {
fake.startMutex.Lock()
fake.startArgsForCall = append(fake.startArgsForCall, struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.StartOpts
}{slug, opts})
fake.recordInvocation("Start", []interface{}{slug, opts})
fake.startMutex.Unlock()
if fake.StartStub != nil {
return fake.StartStub(slug, opts)
} else {
return fake.startReturns.result1
}
}
func (fake *FakeDeployment) StartCallCount() int {
fake.startMutex.RLock()
defer fake.startMutex.RUnlock()
return len(fake.startArgsForCall)
}
func (fake *FakeDeployment) StartArgsForCall(i int) (director.AllOrInstanceGroupOrInstanceSlug, director.StartOpts) {
fake.startMutex.RLock()
defer fake.startMutex.RUnlock()
return fake.startArgsForCall[i].slug, fake.startArgsForCall[i].opts
}
func (fake *FakeDeployment) StartReturns(result1 error) {
fake.StartStub = nil
fake.startReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) Stop(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.StopOpts) error {
fake.stopMutex.Lock()
fake.stopArgsForCall = append(fake.stopArgsForCall, struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.StopOpts
}{slug, opts})
fake.recordInvocation("Stop", []interface{}{slug, opts})
fake.stopMutex.Unlock()
if fake.StopStub != nil {
return fake.StopStub(slug, opts)
} else {
return fake.stopReturns.result1
}
}
func (fake *FakeDeployment) StopCallCount() int {
fake.stopMutex.RLock()
defer fake.stopMutex.RUnlock()
return len(fake.stopArgsForCall)
}
func (fake *FakeDeployment) StopArgsForCall(i int) (director.AllOrInstanceGroupOrInstanceSlug, director.StopOpts) {
fake.stopMutex.RLock()
defer fake.stopMutex.RUnlock()
return fake.stopArgsForCall[i].slug, fake.stopArgsForCall[i].opts
}
func (fake *FakeDeployment) StopReturns(result1 error) {
fake.StopStub = nil
fake.stopReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) Restart(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.RestartOpts) error {
fake.restartMutex.Lock()
fake.restartArgsForCall = append(fake.restartArgsForCall, struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.RestartOpts
}{slug, opts})
fake.recordInvocation("Restart", []interface{}{slug, opts})
fake.restartMutex.Unlock()
if fake.RestartStub != nil {
return fake.RestartStub(slug, opts)
} else {
return fake.restartReturns.result1
}
}
func (fake *FakeDeployment) RestartCallCount() int {
fake.restartMutex.RLock()
defer fake.restartMutex.RUnlock()
return len(fake.restartArgsForCall)
}
func (fake *FakeDeployment) RestartArgsForCall(i int) (director.AllOrInstanceGroupOrInstanceSlug, director.RestartOpts) {
fake.restartMutex.RLock()
defer fake.restartMutex.RUnlock()
return fake.restartArgsForCall[i].slug, fake.restartArgsForCall[i].opts
}
func (fake *FakeDeployment) RestartReturns(result1 error) {
fake.RestartStub = nil
fake.restartReturns = struct {
result1 error
}{result1}
}
func (fake *FakeDeployment) Recreate(slug director.AllOrInstanceGroupOrInstanceSlug, opts director.RecreateOpts) error {
fake.recreateMutex.Lock()
fake.recreateArgsForCall = append(fake.recreateArgsForCall, struct {
slug director.AllOrInstanceGroupOrInstanceSlug
opts director.RecreateOpts
}{slug, opts})
fake.recordInvocation("Recreate", []interface{}{slug, opts})