blob: 7ce44141fb4a9ddc95c70949d8af2b5f625185d1 [file] [log] [blame]
khenaidood2b6df92018-12-13 16:37:20 -05001/*
2 * Copyright 2018-present Open Networking Foundation
3
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 */
16package common
17
18import (
19 "errors"
20 "github.com/golang/protobuf/ptypes"
21 "github.com/golang/protobuf/ptypes/empty"
22 "github.com/opencord/voltha-go/adapters"
23 "github.com/opencord/voltha-go/common/log"
khenaidoo6d055132019-02-12 16:51:19 -050024 "github.com/opencord/voltha-go/kafka"
William Kurkiandaa6bb22019-03-07 12:26:28 -050025 ic "github.com/opencord/voltha-protos/go/inter_container"
khenaidoo2c6a0992019-04-29 13:46:56 -040026 "github.com/opencord/voltha-protos/go/openflow_13"
William Kurkiandaa6bb22019-03-07 12:26:28 -050027 "github.com/opencord/voltha-protos/go/voltha"
khenaidood2b6df92018-12-13 16:37:20 -050028 "google.golang.org/grpc/codes"
29 "google.golang.org/grpc/status"
30)
31
32type RequestHandlerProxy struct {
33 TestMode bool
34 coreInstanceId string
35 adapter adapters.IAdapter
khenaidoo2c6a0992019-04-29 13:46:56 -040036 coreProxy *CoreProxy
khenaidood2b6df92018-12-13 16:37:20 -050037}
38
khenaidoo54e0ddf2019-02-27 16:21:33 -050039func NewRequestHandlerProxy(coreInstanceId string, iadapter adapters.IAdapter, cProxy *CoreProxy) *RequestHandlerProxy {
khenaidood2b6df92018-12-13 16:37:20 -050040 var proxy RequestHandlerProxy
41 proxy.coreInstanceId = coreInstanceId
42 proxy.adapter = iadapter
khenaidoo54e0ddf2019-02-27 16:21:33 -050043 proxy.coreProxy = cProxy
khenaidood2b6df92018-12-13 16:37:20 -050044 return &proxy
45}
46
47func (rhp *RequestHandlerProxy) Adapter_descriptor() (*empty.Empty, error) {
48 return new(empty.Empty), nil
49}
50
51func (rhp *RequestHandlerProxy) Device_types() (*voltha.DeviceTypes, error) {
52 return nil, nil
53}
54
55func (rhp *RequestHandlerProxy) Health() (*voltha.HealthStatus, error) {
56 return nil, nil
57}
58
59func (rhp *RequestHandlerProxy) Adopt_device(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo54e0ddf2019-02-27 16:21:33 -050060 if len(args) < 3 {
khenaidood2b6df92018-12-13 16:37:20 -050061 log.Warn("invalid-number-of-args", log.Fields{"args": args})
62 err := errors.New("invalid-number-of-args")
63 return nil, err
64 }
65 device := &voltha.Device{}
khenaidoo6d055132019-02-12 16:51:19 -050066 transactionID := &ic.StrType{}
khenaidoo54e0ddf2019-02-27 16:21:33 -050067 fromTopic := &ic.StrType{}
khenaidoo6d055132019-02-12 16:51:19 -050068 for _, arg := range args {
69 switch arg.Key {
70 case "device":
71 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
72 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
73 return nil, err
74 }
75 case kafka.TransactionKey:
76 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
77 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
78 return nil, err
79 }
khenaidoo54e0ddf2019-02-27 16:21:33 -050080 case kafka.FromTopic:
81 if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
82 log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
83 return nil, err
84 }
khenaidoo6d055132019-02-12 16:51:19 -050085 }
khenaidood2b6df92018-12-13 16:37:20 -050086 }
khenaidoo6d055132019-02-12 16:51:19 -050087
khenaidood2b6df92018-12-13 16:37:20 -050088 log.Debugw("Adopt_device", log.Fields{"deviceId": device.Id})
89
khenaidoo54e0ddf2019-02-27 16:21:33 -050090 //Update the core reference for that device
91 rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
92
khenaidood2b6df92018-12-13 16:37:20 -050093 //Invoke the adopt device on the adapter
94 if err := rhp.adapter.Adopt_device(device); err != nil {
95 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
96 }
97
98 return new(empty.Empty), nil
99}
100
101func (rhp *RequestHandlerProxy) Reconcile_device(args []*ic.Argument) (*empty.Empty, error) {
102 return new(empty.Empty), nil
103}
104
105func (rhp *RequestHandlerProxy) Abandon_device(args []*ic.Argument) (*empty.Empty, error) {
106 return new(empty.Empty), nil
107}
108
109func (rhp *RequestHandlerProxy) Disable_device(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo3ab34882019-05-02 21:33:30 -0400110 if len(args) < 3 {
111 log.Warn("invalid-number-of-args", log.Fields{"args": args})
112 err := errors.New("invalid-number-of-args")
113 return nil, err
114 }
115
116 device := &voltha.Device{}
117 transactionID := &ic.StrType{}
118 fromTopic := &ic.StrType{}
119 for _, arg := range args {
120 switch arg.Key {
121 case "device":
122 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
123 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
124 return nil, err
125 }
126 case kafka.TransactionKey:
127 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
128 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
129 return nil, err
130 }
131 case kafka.FromTopic:
132 if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
133 log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
134 return nil, err
135 }
136 }
137 }
138 //Update the core reference for that device
139 rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
140 //Invoke the Disable_device API on the adapter
141 if err := rhp.adapter.Disable_device(device); err != nil {
142 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
143 }
khenaidood2b6df92018-12-13 16:37:20 -0500144 return new(empty.Empty), nil
145}
146
147func (rhp *RequestHandlerProxy) Reenable_device(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo3ab34882019-05-02 21:33:30 -0400148 if len(args) < 3 {
149 log.Warn("invalid-number-of-args", log.Fields{"args": args})
150 err := errors.New("invalid-number-of-args")
151 return nil, err
152 }
153
154 device := &voltha.Device{}
155 transactionID := &ic.StrType{}
156 fromTopic := &ic.StrType{}
157 for _, arg := range args {
158 switch arg.Key {
159 case "device":
160 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
161 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
162 return nil, err
163 }
164 case kafka.TransactionKey:
165 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
166 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
167 return nil, err
168 }
169 case kafka.FromTopic:
170 if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
171 log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
172 return nil, err
173 }
174 }
175 }
176 //Update the core reference for that device
177 rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
178 //Invoke the Reenable_device API on the adapter
179 if err := rhp.adapter.Reenable_device(device); err != nil {
180 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
181 }
khenaidood2b6df92018-12-13 16:37:20 -0500182 return new(empty.Empty), nil
183}
184
185func (rhp *RequestHandlerProxy) Reboot_device(args []*ic.Argument) (*empty.Empty, error) {
Girish Gowdru894d97d2019-05-28 05:07:18 -0400186 if len(args) < 3 {
187 log.Warn("invalid-number-of-args", log.Fields{"args": args})
188 err := errors.New("invalid-number-of-args")
189 return nil, err
190 }
191
192 device := &voltha.Device{}
193 transactionID := &ic.StrType{}
194 fromTopic := &ic.StrType{}
195 for _, arg := range args {
196 switch arg.Key {
197 case "device":
198 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
199 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
200 return nil, err
201 }
202 case kafka.TransactionKey:
203 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
204 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
205 return nil, err
206 }
207 case kafka.FromTopic:
208 if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
209 log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
210 return nil, err
211 }
212 }
213 }
214 //Update the core reference for that device
215 rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
216 //Invoke the Reboot_device API on the adapter
217 if err := rhp.adapter.Reboot_device(device); err != nil {
218 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
219 }
khenaidood2b6df92018-12-13 16:37:20 -0500220 return new(empty.Empty), nil
Girish Gowdru894d97d2019-05-28 05:07:18 -0400221
khenaidood2b6df92018-12-13 16:37:20 -0500222}
223
224func (rhp *RequestHandlerProxy) Self_test_device(args []*ic.Argument) (*empty.Empty, error) {
225 return new(empty.Empty), nil
226}
227
228func (rhp *RequestHandlerProxy) Delete_device(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo0a822f92019-05-08 15:15:57 -0400229 if len(args) < 3 {
230 log.Warn("invalid-number-of-args", log.Fields{"args": args})
231 err := errors.New("invalid-number-of-args")
232 return nil, err
233 }
234
235 device := &voltha.Device{}
236 transactionID := &ic.StrType{}
237 fromTopic := &ic.StrType{}
238 for _, arg := range args {
239 switch arg.Key {
240 case "device":
241 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
242 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
243 return nil, err
244 }
245 case kafka.TransactionKey:
246 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
247 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
248 return nil, err
249 }
250 case kafka.FromTopic:
251 if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
252 log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
253 return nil, err
254 }
255 }
256 }
257 //Update the core reference for that device
258 rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
259 //Invoke the Disable_device API on the adapter
260 if err := rhp.adapter.Delete_device(device); err != nil {
261 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
262 }
khenaidood2b6df92018-12-13 16:37:20 -0500263 return new(empty.Empty), nil
264}
265
266func (rhp *RequestHandlerProxy) Get_device_details(args []*ic.Argument) (*empty.Empty, error) {
267 return new(empty.Empty), nil
268}
269
270func (rhp *RequestHandlerProxy) Update_flows_bulk(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo0458db62019-06-20 08:50:36 -0400271 log.Debug("Update_flows_bulk")
272 if len(args) < 4 {
273 log.Warn("Update_flows_bulk-invalid-number-of-args", log.Fields{"args": args})
274 err := errors.New("invalid-number-of-args")
275 return nil, err
276 }
277 device := &voltha.Device{}
278 transactionID := &ic.StrType{}
279 flows := &voltha.Flows{}
280 groups := &voltha.FlowGroups{}
281 for _, arg := range args {
282 switch arg.Key {
283 case "device":
284 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
285 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
286 return nil, err
287 }
288 case "flows":
289 if err := ptypes.UnmarshalAny(arg.Value, flows); err != nil {
290 log.Warnw("cannot-unmarshal-flows", log.Fields{"error": err})
291 return nil, err
292 }
293 case "groups":
294 if err := ptypes.UnmarshalAny(arg.Value, groups); err != nil {
295 log.Warnw("cannot-unmarshal-groups", log.Fields{"error": err})
296 return nil, err
297 }
298 case kafka.TransactionKey:
299 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
300 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
301 return nil, err
302 }
303 }
304 }
305 log.Debugw("Update_flows_bulk", log.Fields{"flows": flows, "groups": groups})
306 //Invoke the adopt device on the adapter
307 if err := rhp.adapter.Update_flows_bulk(device, flows, groups); err != nil {
308 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
309 }
khenaidood2b6df92018-12-13 16:37:20 -0500310 return new(empty.Empty), nil
311}
312
313func (rhp *RequestHandlerProxy) Update_flows_incrementally(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo2c6a0992019-04-29 13:46:56 -0400314 log.Debug("Update_flows_incrementally")
mkoodali252f7672019-03-25 12:13:12 +0530315 if len(args) < 3 {
316 log.Warn("Update_flows_incrementally-invalid-number-of-args", log.Fields{"args": args})
317 err := errors.New("invalid-number-of-args")
318 return nil, err
319 }
320 device := &voltha.Device{}
321 transactionID := &ic.StrType{}
khenaidoo2c6a0992019-04-29 13:46:56 -0400322 flows := &openflow_13.FlowChanges{}
323 groups := &openflow_13.FlowGroupChanges{}
mkoodali252f7672019-03-25 12:13:12 +0530324 for _, arg := range args {
325 switch arg.Key {
326 case "device":
327 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
328 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
329 return nil, err
330 }
331 case "flow_changes":
332 if err := ptypes.UnmarshalAny(arg.Value, flows); err != nil {
333 log.Warnw("cannot-unmarshal-flows", log.Fields{"error": err})
334 return nil, err
335 }
336 case "group_changes":
337 if err := ptypes.UnmarshalAny(arg.Value, groups); err != nil {
338 log.Warnw("cannot-unmarshal-groups", log.Fields{"error": err})
339 return nil, err
340 }
341 case kafka.TransactionKey:
342 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
343 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
344 return nil, err
345 }
346 }
347 }
khenaidoo2c6a0992019-04-29 13:46:56 -0400348 log.Debugw("Update_flows_incrementally", log.Fields{"flows": flows, "groups": groups})
349 //Invoke the adopt device on the adapter
350 if err := rhp.adapter.Update_flows_incrementally(device, flows, groups); err != nil {
351 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
352 }
khenaidood2b6df92018-12-13 16:37:20 -0500353 return new(empty.Empty), nil
354}
355
356func (rhp *RequestHandlerProxy) Update_pm_config(args []*ic.Argument) (*empty.Empty, error) {
357 return new(empty.Empty), nil
358}
359
360func (rhp *RequestHandlerProxy) Receive_packet_out(args []*ic.Argument) (*empty.Empty, error) {
manikkaraj k6c9689d2019-05-09 12:59:52 -0400361 log.Debugw("Receive_packet_out", log.Fields{"args": args})
362 if len(args) < 3 {
363 log.Warn("Receive_packet_out-invalid-number-of-args", log.Fields{"args": args})
364 err := errors.New("invalid-number-of-args")
365 return nil, err
366 }
367 deviceId := &ic.StrType{}
368 egressPort := &ic.IntType{}
369 packet := &openflow_13.OfpPacketOut{}
370 transactionID := &ic.StrType{}
371 for _, arg := range args {
372 switch arg.Key {
373 case "deviceId":
374 if err := ptypes.UnmarshalAny(arg.Value, deviceId); err != nil {
375 log.Warnw("cannot-unmarshal-deviceId", log.Fields{"error": err})
376 return nil, err
377 }
378 case "outPort":
379 if err := ptypes.UnmarshalAny(arg.Value, egressPort); err != nil {
380 log.Warnw("cannot-unmarshal-egressPort", log.Fields{"error": err})
381 return nil, err
382 }
383 case "packet":
384 if err := ptypes.UnmarshalAny(arg.Value, packet); err != nil {
385 log.Warnw("cannot-unmarshal-packet", log.Fields{"error": err})
386 return nil, err
387 }
388 case kafka.TransactionKey:
389 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
390 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
391 return nil, err
392 }
393 }
394 }
395 log.Debugw("Receive_packet_out", log.Fields{"deviceId": deviceId.Val, "outPort": egressPort, "packet": packet})
396 //Invoke the adopt device on the adapter
397 if err := rhp.adapter.Receive_packet_out(deviceId.Val, int(egressPort.Val), packet); err != nil {
398 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
399 }
khenaidood2b6df92018-12-13 16:37:20 -0500400 return new(empty.Empty), nil
401}
402
403func (rhp *RequestHandlerProxy) Suppress_alarm(args []*ic.Argument) (*empty.Empty, error) {
404 return new(empty.Empty), nil
405}
406
407func (rhp *RequestHandlerProxy) Unsuppress_alarm(args []*ic.Argument) (*empty.Empty, error) {
408 return new(empty.Empty), nil
409}
410
411func (rhp *RequestHandlerProxy) Get_ofp_device_info(args []*ic.Argument) (*ic.SwitchCapability, error) {
khenaidoo54e0ddf2019-02-27 16:21:33 -0500412 if len(args) < 2 {
khenaidood2b6df92018-12-13 16:37:20 -0500413 log.Warn("invalid-number-of-args", log.Fields{"args": args})
414 err := errors.New("invalid-number-of-args")
415 return nil, err
416 }
417 device := &voltha.Device{}
khenaidoo6d055132019-02-12 16:51:19 -0500418 transactionID := &ic.StrType{}
419 for _, arg := range args {
420 switch arg.Key {
421 case "device":
422 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
423 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
424 return nil, err
425 }
426 case kafka.TransactionKey:
427 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
428 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
429 return nil, err
430 }
431 }
khenaidood2b6df92018-12-13 16:37:20 -0500432 }
khenaidoo6d055132019-02-12 16:51:19 -0500433
khenaidood2b6df92018-12-13 16:37:20 -0500434 log.Debugw("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
435
436 var cap *ic.SwitchCapability
437 var err error
438 if cap, err = rhp.adapter.Get_ofp_device_info(device); err != nil {
439 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
440 }
khenaidoo6d055132019-02-12 16:51:19 -0500441 log.Debugw("Get_ofp_device_info", log.Fields{"cap": cap})
khenaidood2b6df92018-12-13 16:37:20 -0500442 return cap, nil
443}
444
445func (rhp *RequestHandlerProxy) Get_ofp_port_info(args []*ic.Argument) (*ic.PortCapability, error) {
khenaidoo54e0ddf2019-02-27 16:21:33 -0500446 if len(args) < 3 {
khenaidood2b6df92018-12-13 16:37:20 -0500447 log.Warn("invalid-number-of-args", log.Fields{"args": args})
448 err := errors.New("invalid-number-of-args")
449 return nil, err
450 }
451 device := &voltha.Device{}
452 pNo := &ic.IntType{}
khenaidoo6d055132019-02-12 16:51:19 -0500453 transactionID := &ic.StrType{}
khenaidood2b6df92018-12-13 16:37:20 -0500454 for _, arg := range args {
455 switch arg.Key {
456 case "device":
457 if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
458 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
459 return nil, err
460 }
461 case "port_no":
462 if err := ptypes.UnmarshalAny(arg.Value, pNo); err != nil {
463 log.Warnw("cannot-unmarshal-port-no", log.Fields{"error": err})
464 return nil, err
465 }
khenaidoo6d055132019-02-12 16:51:19 -0500466 case kafka.TransactionKey:
467 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
468 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
469 return nil, err
470 }
khenaidood2b6df92018-12-13 16:37:20 -0500471 }
472 }
473 log.Debugw("Get_ofp_port_info", log.Fields{"deviceId": device.Id, "portNo": pNo.Val})
474 var cap *ic.PortCapability
475 var err error
476 if cap, err = rhp.adapter.Get_ofp_port_info(device, pNo.Val); err != nil {
477 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
478 }
479 return cap, nil
480}
481
482func (rhp *RequestHandlerProxy) Process_inter_adapter_message(args []*ic.Argument) (*empty.Empty, error) {
khenaidoo54e0ddf2019-02-27 16:21:33 -0500483 if len(args) < 2 {
khenaidood2b6df92018-12-13 16:37:20 -0500484 log.Warn("invalid-number-of-args", log.Fields{"args": args})
485 err := errors.New("invalid-number-of-args")
486 return nil, err
487 }
488 iaMsg := &ic.InterAdapterMessage{}
khenaidoo6d055132019-02-12 16:51:19 -0500489 transactionID := &ic.StrType{}
490 for _, arg := range args {
491 switch arg.Key {
492 case "msg":
493 if err := ptypes.UnmarshalAny(arg.Value, iaMsg); err != nil {
494 log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
495 return nil, err
496 }
497 case kafka.TransactionKey:
498 if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
499 log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
500 return nil, err
501 }
502 }
khenaidood2b6df92018-12-13 16:37:20 -0500503 }
504
505 log.Debugw("Process_inter_adapter_message", log.Fields{"msgId": iaMsg.Header.Id})
506
507 //Invoke the inter adapter API on the handler
508 if err := rhp.adapter.Process_inter_adapter_message(iaMsg); err != nil {
509 return nil, status.Errorf(codes.NotFound, "%s", err.Error())
510 }
511
512 return new(empty.Empty), nil
513}
514
khenaidoof5a5bfa2019-01-23 22:20:29 -0500515func (rhp *RequestHandlerProxy) Download_image(args []*ic.Argument) (*voltha.ImageDownload, error) {
516 return &voltha.ImageDownload{}, nil
khenaidood2b6df92018-12-13 16:37:20 -0500517}
518
khenaidoof5a5bfa2019-01-23 22:20:29 -0500519func (rhp *RequestHandlerProxy) Get_image_download_status(args []*ic.Argument) (*voltha.ImageDownload, error) {
520 return &voltha.ImageDownload{}, nil
khenaidood2b6df92018-12-13 16:37:20 -0500521}
522
khenaidoof5a5bfa2019-01-23 22:20:29 -0500523func (rhp *RequestHandlerProxy) Cancel_image_download(args []*ic.Argument) (*voltha.ImageDownload, error) {
524 return &voltha.ImageDownload{}, nil
khenaidood2b6df92018-12-13 16:37:20 -0500525}
526
khenaidoof5a5bfa2019-01-23 22:20:29 -0500527func (rhp *RequestHandlerProxy) Activate_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
528 return &voltha.ImageDownload{}, nil
khenaidood2b6df92018-12-13 16:37:20 -0500529}
530
khenaidoof5a5bfa2019-01-23 22:20:29 -0500531func (rhp *RequestHandlerProxy) Revert_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
532 return &voltha.ImageDownload{}, nil
khenaidood2b6df92018-12-13 16:37:20 -0500533}