blob: a2c4060e7aee54ae041ac84e962fb8917eab4c31 [file] [log] [blame]
Matteo Scandolo256266d2020-06-01 13:44:07 -07001/*
Joey Armstrong9bc3fa52023-01-03 14:10:07 -05002 * Copyright 2018-2023 Open Networking Foundation (ONF) and the ONF Contributors
Matteo Scandolo256266d2020-06-01 13:44:07 -07003
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package mock
18
19import (
20 "context"
Kent Hagerman9b0ac0a2020-06-08 11:48:16 -040021
Matteo Scandolo256266d2020-06-01 13:44:07 -070022 . "github.com/golang/protobuf/ptypes/empty"
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000023 "github.com/opencord/voltha-protos/v5/go/common"
khenaidoofcf0b8d2021-10-19 17:57:30 -040024 "github.com/opencord/voltha-protos/v5/go/extension"
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000025 "github.com/opencord/voltha-protos/v5/go/omci"
26 "github.com/opencord/voltha-protos/v5/go/openflow_13"
Mahir Gunyel82f98dd2023-07-24 10:29:49 +030027 "github.com/opencord/voltha-protos/v5/go/voip_system_profile"
28 "github.com/opencord/voltha-protos/v5/go/voip_user_profile"
David K. Bainbridgee05cf0c2021-08-19 03:16:50 +000029 . "github.com/opencord/voltha-protos/v5/go/voltha"
Matteo Scandolo256266d2020-06-01 13:44:07 -070030 "google.golang.org/grpc"
31)
32
33type MockVolthaClient struct {
34 LogicalDeviceFlows openflow_13.Flows
35 LogicalPorts LogicalPorts
Matteo Scandolo256266d2020-06-01 13:44:07 -070036}
37
Matteo Scandolo256266d2020-06-01 13:44:07 -070038func (c MockVolthaClient) GetVoltha(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Voltha, error) {
39 return &Voltha{}, nil
40}
41
42func (c MockVolthaClient) ListCoreInstances(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CoreInstances, error) {
43 return &CoreInstances{}, nil
44}
45
46func (c MockVolthaClient) GetCoreInstance(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*CoreInstance, error) {
47 return &CoreInstance{}, nil
48}
49
50func (c MockVolthaClient) ListAdapters(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Adapters, error) {
51 return &Adapters{}, nil
52}
53
54func (c MockVolthaClient) ListLogicalDevices(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*LogicalDevices, error) {
55 return &LogicalDevices{}, nil
56}
57
58func (c MockVolthaClient) GetLogicalDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalDevice, error) {
Kent Hagerman9b0ac0a2020-06-08 11:48:16 -040059 return &LogicalDevice{}, nil
Matteo Scandolo256266d2020-06-01 13:44:07 -070060}
61
62func (c MockVolthaClient) ListLogicalDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalPorts, error) {
63 return &c.LogicalPorts, nil
64}
65
66func (c MockVolthaClient) GetLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*LogicalPort, error) {
67 return &LogicalPort{}, nil
68}
69
70func (c MockVolthaClient) EnableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*Empty, error) {
71 return &Empty{}, nil
72}
73
74func (c MockVolthaClient) DisableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*Empty, error) {
75 return &Empty{}, nil
76}
77
78func (c MockVolthaClient) ListLogicalDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error) {
79 return &c.LogicalDeviceFlows, nil
80}
81
82func (c MockVolthaClient) UpdateLogicalDeviceFlowTable(ctx context.Context, in *openflow_13.FlowTableUpdate, opts ...grpc.CallOption) (*Empty, error) {
83 return &Empty{}, nil
84}
85
86func (c MockVolthaClient) UpdateLogicalDeviceMeterTable(ctx context.Context, in *openflow_13.MeterModUpdate, opts ...grpc.CallOption) (*Empty, error) {
87 return &Empty{}, nil
88}
89
90func (c MockVolthaClient) ListLogicalDeviceMeters(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Meters, error) {
91 return &openflow_13.Meters{}, nil
92}
93
94func (c MockVolthaClient) ListLogicalDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error) {
95 return &openflow_13.FlowGroups{}, nil
96}
97
98func (c MockVolthaClient) UpdateLogicalDeviceFlowGroupTable(ctx context.Context, in *openflow_13.FlowGroupTableUpdate, opts ...grpc.CallOption) (*Empty, error) {
99 return &Empty{}, nil
100}
101
102func (c MockVolthaClient) ListDevices(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Devices, error) {
103 return &Devices{}, nil
104}
105
106func (c MockVolthaClient) ListDeviceIds(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*common.IDs, error) {
107 return &common.IDs{}, nil
108}
109
110func (c MockVolthaClient) ReconcileDevices(ctx context.Context, in *common.IDs, opts ...grpc.CallOption) (*Empty, error) {
111 return &Empty{}, nil
112}
113
114func (c MockVolthaClient) GetDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Device, error) {
115 return &Device{}, nil
116}
117
118func (c MockVolthaClient) CreateDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*Device, error) {
119 return &Device{}, nil
120}
121
122func (c MockVolthaClient) EnableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
123 return &Empty{}, nil
124}
125
126func (c MockVolthaClient) DisableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
127 return &Empty{}, nil
128}
129
130func (c MockVolthaClient) RebootDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
131 return &Empty{}, nil
132}
133
134func (c MockVolthaClient) DeleteDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
135 return &Empty{}, nil
136}
137
138func (c MockVolthaClient) DownloadImage(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
139 return &common.OperationResp{}, nil
140}
141
142func (c MockVolthaClient) GetImageDownloadStatus(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error) {
143 return &ImageDownload{}, nil
144}
145
146func (c MockVolthaClient) GetImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error) {
147 return &ImageDownload{}, nil
148}
149
150func (c MockVolthaClient) ListImageDownloads(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*ImageDownloads, error) {
151 return &ImageDownloads{}, nil
152}
153
154func (c MockVolthaClient) CancelImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
155 return &common.OperationResp{}, nil
156}
157
158func (c MockVolthaClient) ActivateImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
159 return &common.OperationResp{}, nil
160}
161
162func (c MockVolthaClient) RevertImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
163 return &common.OperationResp{}, nil
164}
165
166func (c MockVolthaClient) ListDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Ports, error) {
167 return &Ports{}, nil
168}
169
170func (c MockVolthaClient) ListDevicePmConfigs(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*PmConfigs, error) {
171 return &PmConfigs{}, nil
172}
173
174func (c MockVolthaClient) UpdateDevicePmConfigs(ctx context.Context, in *PmConfigs, opts ...grpc.CallOption) (*Empty, error) {
175 return &Empty{}, nil
176}
177
178func (c MockVolthaClient) ListDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error) {
179 return &openflow_13.Flows{}, nil
180}
181
182func (c MockVolthaClient) ListDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error) {
183 return &openflow_13.FlowGroups{}, nil
184}
185
186func (c MockVolthaClient) ListDeviceTypes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DeviceTypes, error) {
187 return &DeviceTypes{}, nil
188}
189
190func (c MockVolthaClient) GetDeviceType(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*DeviceType, error) {
191 return &DeviceType{}, nil
192}
193
Matteo Scandolo256266d2020-06-01 13:44:07 -0700194func (c MockVolthaClient) StreamPacketsOut(ctx context.Context, opts ...grpc.CallOption) (VolthaService_StreamPacketsOutClient, error) {
195 return nil, nil
196}
197
198func (c MockVolthaClient) ReceivePacketsIn(ctx context.Context, in *Empty, opts ...grpc.CallOption) (VolthaService_ReceivePacketsInClient, error) {
199 return nil, nil
200}
201
202func (c MockVolthaClient) ReceiveChangeEvents(ctx context.Context, in *Empty, opts ...grpc.CallOption) (VolthaService_ReceiveChangeEventsClient, error) {
203 return nil, nil
204}
205
Matteo Scandolo256266d2020-06-01 13:44:07 -0700206func (c MockVolthaClient) CreateEventFilter(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*EventFilter, error) {
207 return &EventFilter{}, nil
208}
209
210func (c MockVolthaClient) GetEventFilter(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*EventFilters, error) {
211 return &EventFilters{}, nil
212}
213
214func (c MockVolthaClient) UpdateEventFilter(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*EventFilter, error) {
215 return &EventFilter{}, nil
216}
217
218func (c MockVolthaClient) DeleteEventFilter(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (*Empty, error) {
219 return &Empty{}, nil
220}
221
222func (c MockVolthaClient) ListEventFilters(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*EventFilters, error) {
223 return &EventFilters{}, nil
224}
225
226func (c MockVolthaClient) GetImages(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Images, error) {
227 return &Images{}, nil
228}
229
230func (c MockVolthaClient) SelfTest(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*SelfTestResponse, error) {
231 return &SelfTestResponse{}, nil
232}
233
234func (c MockVolthaClient) GetMibDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.MibDeviceData, error) {
235 return &omci.MibDeviceData{}, nil
236}
237
238func (c MockVolthaClient) GetAlarmDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.AlarmDeviceData, error) {
239 return &omci.AlarmDeviceData{}, nil
240}
241
242func (c MockVolthaClient) SimulateAlarm(ctx context.Context, in *SimulateAlarmRequest, opts ...grpc.CallOption) (*common.OperationResp, error) {
243 return &common.OperationResp{}, nil
244}
245
Matteo Scandolo256266d2020-06-01 13:44:07 -0700246func (c MockVolthaClient) EnablePort(ctx context.Context, in *Port, opts ...grpc.CallOption) (*Empty, error) {
247 return &Empty{}, nil
248}
249
250func (c MockVolthaClient) DisablePort(ctx context.Context, in *Port, opts ...grpc.CallOption) (*Empty, error) {
251 return &Empty{}, nil
252}
253
khenaidoofcf0b8d2021-10-19 17:57:30 -0400254func (c MockVolthaClient) GetExtValue(ctx context.Context, in *extension.ValueSpecifier, opts ...grpc.CallOption) (*extension.ReturnValues, error) {
255 return &extension.ReturnValues{}, nil
Matteo Scandolo256266d2020-06-01 13:44:07 -0700256}
257
khenaidoofcf0b8d2021-10-19 17:57:30 -0400258func (c MockVolthaClient) StartOmciTestAction(ctx context.Context, in *omci.OmciTestRequest, opts ...grpc.CallOption) (*omci.TestResponse, error) {
259 return &omci.TestResponse{}, nil
Matteo Scandolo256266d2020-06-01 13:44:07 -0700260}
Maninder12b909f2020-10-23 14:23:36 +0530261
262func (c MockVolthaClient) ForceDeleteDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
263 return &Empty{}, nil
264}
265
khenaidoofcf0b8d2021-10-19 17:57:30 -0400266func (c MockVolthaClient) SetExtValue(ctx context.Context, in *extension.ValueSet, opts ...grpc.CallOption) (*Empty, error) {
Maninder12b909f2020-10-23 14:23:36 +0530267 return &Empty{}, nil
268}
Andrea Campanella18448bc2021-07-08 18:47:22 +0200269
270func (c MockVolthaClient) AbortImageUpgradeToDevice(ctx context.Context, imageRequest *DeviceImageRequest, opts ...grpc.CallOption) (*DeviceImageResponse, error) {
271 return &DeviceImageResponse{}, nil
272}
273
274func (c MockVolthaClient) ActivateImage(ctx context.Context, imageRequest *DeviceImageRequest, opts ...grpc.CallOption) (*DeviceImageResponse, error) {
275 return &DeviceImageResponse{}, nil
276}
277
278func (c MockVolthaClient) CommitImage(ctx context.Context, imageRequest *DeviceImageRequest, opts ...grpc.CallOption) (*DeviceImageResponse, error) {
279 return &DeviceImageResponse{}, nil
280}
281
282func (c MockVolthaClient) DownloadImageToDevice(ctx context.Context, imageRequest *DeviceImageDownloadRequest, opts ...grpc.CallOption) (*DeviceImageResponse, error) {
283 return &DeviceImageResponse{}, nil
284}
285
286func (c MockVolthaClient) GetImageStatus(ctx context.Context, imageRequest *DeviceImageRequest, opts ...grpc.CallOption) (*DeviceImageResponse, error) {
287 return &DeviceImageResponse{}, nil
288}
289
290func (c MockVolthaClient) GetOnuImages(ctx context.Context, id *common.ID, opts ...grpc.CallOption) (*OnuImages, error) {
291 return &OnuImages{}, nil
292}
Mahir Gunyel82f98dd2023-07-24 10:29:49 +0300293
294func (c MockVolthaClient) PutVoipSystemProfile(ctx context.Context, in *voip_system_profile.VoipSystemProfileRequest, opts ...grpc.CallOption) (*Empty, error) {
295
296 return nil, nil
297}
298
299func (c MockVolthaClient) DeleteVoipSystemProfile(ctx context.Context, in *common.Key, opts ...grpc.CallOption) (*Empty, error) {
300
301 return nil, nil
302}
303
304func (c MockVolthaClient) PutVoipUserProfile(ctx context.Context, in *voip_user_profile.VoipUserProfileRequest, opts ...grpc.CallOption) (*Empty, error) {
305
306 return nil, nil
307}
308
309func (c MockVolthaClient) DeleteVoipUserProfile(ctx context.Context, in *common.Key, opts ...grpc.CallOption) (*Empty, error) {
310 return nil, nil
311}