github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/worker/provisioner/mocks/lxdprofileinstancebroker_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/juju/juju/worker/provisioner (interfaces: LXDProfileInstanceBroker) 3 // 4 // Generated by this command: 5 // 6 // mockgen -package mocks -destination mocks/lxdprofileinstancebroker_mock.go github.com/juju/juju/worker/provisioner LXDProfileInstanceBroker 7 // 8 9 // Package mocks is a generated GoMock package. 10 package mocks 11 12 import ( 13 reflect "reflect" 14 15 instance "github.com/juju/juju/core/instance" 16 lxdprofile "github.com/juju/juju/core/lxdprofile" 17 environs "github.com/juju/juju/environs" 18 context "github.com/juju/juju/environs/context" 19 instances "github.com/juju/juju/environs/instances" 20 gomock "go.uber.org/mock/gomock" 21 ) 22 23 // MockLXDProfileInstanceBroker is a mock of LXDProfileInstanceBroker interface. 24 type MockLXDProfileInstanceBroker struct { 25 ctrl *gomock.Controller 26 recorder *MockLXDProfileInstanceBrokerMockRecorder 27 } 28 29 // MockLXDProfileInstanceBrokerMockRecorder is the mock recorder for MockLXDProfileInstanceBroker. 30 type MockLXDProfileInstanceBrokerMockRecorder struct { 31 mock *MockLXDProfileInstanceBroker 32 } 33 34 // NewMockLXDProfileInstanceBroker creates a new mock instance. 35 func NewMockLXDProfileInstanceBroker(ctrl *gomock.Controller) *MockLXDProfileInstanceBroker { 36 mock := &MockLXDProfileInstanceBroker{ctrl: ctrl} 37 mock.recorder = &MockLXDProfileInstanceBrokerMockRecorder{mock} 38 return mock 39 } 40 41 // EXPECT returns an object that allows the caller to indicate expected use. 42 func (m *MockLXDProfileInstanceBroker) EXPECT() *MockLXDProfileInstanceBrokerMockRecorder { 43 return m.recorder 44 } 45 46 // AllInstances mocks base method. 47 func (m *MockLXDProfileInstanceBroker) AllInstances(arg0 context.ProviderCallContext) ([]instances.Instance, error) { 48 m.ctrl.T.Helper() 49 ret := m.ctrl.Call(m, "AllInstances", arg0) 50 ret0, _ := ret[0].([]instances.Instance) 51 ret1, _ := ret[1].(error) 52 return ret0, ret1 53 } 54 55 // AllInstances indicates an expected call of AllInstances. 56 func (mr *MockLXDProfileInstanceBrokerMockRecorder) AllInstances(arg0 any) *gomock.Call { 57 mr.mock.ctrl.T.Helper() 58 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllInstances", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).AllInstances), arg0) 59 } 60 61 // AllRunningInstances mocks base method. 62 func (m *MockLXDProfileInstanceBroker) AllRunningInstances(arg0 context.ProviderCallContext) ([]instances.Instance, error) { 63 m.ctrl.T.Helper() 64 ret := m.ctrl.Call(m, "AllRunningInstances", arg0) 65 ret0, _ := ret[0].([]instances.Instance) 66 ret1, _ := ret[1].(error) 67 return ret0, ret1 68 } 69 70 // AllRunningInstances indicates an expected call of AllRunningInstances. 71 func (mr *MockLXDProfileInstanceBrokerMockRecorder) AllRunningInstances(arg0 any) *gomock.Call { 72 mr.mock.ctrl.T.Helper() 73 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllRunningInstances", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).AllRunningInstances), arg0) 74 } 75 76 // AssignLXDProfiles mocks base method. 77 func (m *MockLXDProfileInstanceBroker) AssignLXDProfiles(arg0 string, arg1 []string, arg2 []lxdprofile.ProfilePost) ([]string, error) { 78 m.ctrl.T.Helper() 79 ret := m.ctrl.Call(m, "AssignLXDProfiles", arg0, arg1, arg2) 80 ret0, _ := ret[0].([]string) 81 ret1, _ := ret[1].(error) 82 return ret0, ret1 83 } 84 85 // AssignLXDProfiles indicates an expected call of AssignLXDProfiles. 86 func (mr *MockLXDProfileInstanceBrokerMockRecorder) AssignLXDProfiles(arg0, arg1, arg2 any) *gomock.Call { 87 mr.mock.ctrl.T.Helper() 88 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignLXDProfiles", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).AssignLXDProfiles), arg0, arg1, arg2) 89 } 90 91 // LXDProfileNames mocks base method. 92 func (m *MockLXDProfileInstanceBroker) LXDProfileNames(arg0 string) ([]string, error) { 93 m.ctrl.T.Helper() 94 ret := m.ctrl.Call(m, "LXDProfileNames", arg0) 95 ret0, _ := ret[0].([]string) 96 ret1, _ := ret[1].(error) 97 return ret0, ret1 98 } 99 100 // LXDProfileNames indicates an expected call of LXDProfileNames. 101 func (mr *MockLXDProfileInstanceBrokerMockRecorder) LXDProfileNames(arg0 any) *gomock.Call { 102 mr.mock.ctrl.T.Helper() 103 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LXDProfileNames", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).LXDProfileNames), arg0) 104 } 105 106 // MaybeWriteLXDProfile mocks base method. 107 func (m *MockLXDProfileInstanceBroker) MaybeWriteLXDProfile(arg0 string, arg1 lxdprofile.Profile) error { 108 m.ctrl.T.Helper() 109 ret := m.ctrl.Call(m, "MaybeWriteLXDProfile", arg0, arg1) 110 ret0, _ := ret[0].(error) 111 return ret0 112 } 113 114 // MaybeWriteLXDProfile indicates an expected call of MaybeWriteLXDProfile. 115 func (mr *MockLXDProfileInstanceBrokerMockRecorder) MaybeWriteLXDProfile(arg0, arg1 any) *gomock.Call { 116 mr.mock.ctrl.T.Helper() 117 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybeWriteLXDProfile", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).MaybeWriteLXDProfile), arg0, arg1) 118 } 119 120 // StartInstance mocks base method. 121 func (m *MockLXDProfileInstanceBroker) StartInstance(arg0 context.ProviderCallContext, arg1 environs.StartInstanceParams) (*environs.StartInstanceResult, error) { 122 m.ctrl.T.Helper() 123 ret := m.ctrl.Call(m, "StartInstance", arg0, arg1) 124 ret0, _ := ret[0].(*environs.StartInstanceResult) 125 ret1, _ := ret[1].(error) 126 return ret0, ret1 127 } 128 129 // StartInstance indicates an expected call of StartInstance. 130 func (mr *MockLXDProfileInstanceBrokerMockRecorder) StartInstance(arg0, arg1 any) *gomock.Call { 131 mr.mock.ctrl.T.Helper() 132 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstance", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).StartInstance), arg0, arg1) 133 } 134 135 // StopInstances mocks base method. 136 func (m *MockLXDProfileInstanceBroker) StopInstances(arg0 context.ProviderCallContext, arg1 ...instance.Id) error { 137 m.ctrl.T.Helper() 138 varargs := []any{arg0} 139 for _, a := range arg1 { 140 varargs = append(varargs, a) 141 } 142 ret := m.ctrl.Call(m, "StopInstances", varargs...) 143 ret0, _ := ret[0].(error) 144 return ret0 145 } 146 147 // StopInstances indicates an expected call of StopInstances. 148 func (mr *MockLXDProfileInstanceBrokerMockRecorder) StopInstances(arg0 any, arg1 ...any) *gomock.Call { 149 mr.mock.ctrl.T.Helper() 150 varargs := append([]any{arg0}, arg1...) 151 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopInstances", reflect.TypeOf((*MockLXDProfileInstanceBroker)(nil).StopInstances), varargs...) 152 }