blob: 375b1370429d6d5049de319a71488fe667903a3c [file] [log] [blame]
Girish Gowdru0c588b22019-04-23 23:24:56 -04001/*
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 */
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070016
17//Package adaptercore provides the utility for olt devices, flows and statistics
Girish Gowdru0c588b22019-04-23 23:24:56 -040018package adaptercore
19
20import (
21 "context"
22 "errors"
23 "fmt"
24 "sync"
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053025 "time"
Girish Gowdru0c588b22019-04-23 23:24:56 -040026
Scott Baker51290152019-10-24 14:23:20 -070027 "github.com/opencord/voltha-lib-go/v2/pkg/adapters/adapterif"
28 "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
29 "github.com/opencord/voltha-lib-go/v2/pkg/log"
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053030 "github.com/opencord/voltha-openolt-adapter/config"
Scott Bakerc6e54cb2019-11-04 09:31:25 -080031 ic "github.com/opencord/voltha-protos/v2/go/inter_container"
32 "github.com/opencord/voltha-protos/v2/go/openflow_13"
33 "github.com/opencord/voltha-protos/v2/go/voltha"
Girish Gowdru0c588b22019-04-23 23:24:56 -040034)
35
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070036//OpenOLT structure holds the OLT information
Girish Gowdru0c588b22019-04-23 23:24:56 -040037type OpenOLT struct {
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053038 deviceHandlers map[string]*DeviceHandler
39 coreProxy adapterif.CoreProxy
40 adapterProxy adapterif.AdapterProxy
41 eventProxy adapterif.EventProxy
42 kafkaICProxy *kafka.InterContainerProxy
43 config *config.AdapterFlags
44 numOnus int
45 KVStoreHost string
46 KVStorePort int
47 KVStoreType string
48 exitChannel chan int
49 HeartbeatCheckInterval time.Duration
50 HeartbeatFailReportInterval time.Duration
51 GrpcTimeoutInterval time.Duration
52 lockDeviceHandlersMap sync.RWMutex
Girish Gowdru0c588b22019-04-23 23:24:56 -040053}
54
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070055//NewOpenOLT returns a new instance of OpenOLT
kdarapu381c6902019-07-31 18:23:16 +053056func NewOpenOLT(ctx context.Context, kafkaICProxy *kafka.InterContainerProxy,
57 coreProxy adapterif.CoreProxy, adapterProxy adapterif.AdapterProxy,
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053058 eventProxy adapterif.EventProxy, cfg *config.AdapterFlags) *OpenOLT {
Girish Gowdru0c588b22019-04-23 23:24:56 -040059 var openOLT OpenOLT
60 openOLT.exitChannel = make(chan int, 1)
61 openOLT.deviceHandlers = make(map[string]*DeviceHandler)
62 openOLT.kafkaICProxy = kafkaICProxy
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053063 openOLT.config = cfg
64 openOLT.numOnus = cfg.OnuNumber
Girish Gowdru0c588b22019-04-23 23:24:56 -040065 openOLT.coreProxy = coreProxy
66 openOLT.adapterProxy = adapterProxy
Devmalya Paulfb990a52019-07-09 10:01:49 -040067 openOLT.eventProxy = eventProxy
Abhilash Laxmeshwarf9942e92020-01-07 15:32:44 +053068 openOLT.KVStoreHost = cfg.KVStoreHost
69 openOLT.KVStorePort = cfg.KVStorePort
70 openOLT.KVStoreType = cfg.KVStoreType
71 openOLT.HeartbeatCheckInterval = cfg.HeartbeatCheckInterval
72 openOLT.HeartbeatFailReportInterval = cfg.HeartbeatFailReportInterval
73 openOLT.GrpcTimeoutInterval = cfg.GrpcTimeoutInterval
Girish Gowdru0c588b22019-04-23 23:24:56 -040074 openOLT.lockDeviceHandlersMap = sync.RWMutex{}
75 return &openOLT
76}
77
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070078//Start starts (logs) the device manager
Girish Gowdru0c588b22019-04-23 23:24:56 -040079func (oo *OpenOLT) Start(ctx context.Context) error {
80 log.Info("starting-device-manager")
81 log.Info("device-manager-started")
82 return nil
83}
84
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070085//Stop terminates the session
Girish Gowdru0c588b22019-04-23 23:24:56 -040086func (oo *OpenOLT) Stop(ctx context.Context) error {
87 log.Info("stopping-device-manager")
88 oo.exitChannel <- 1
89 log.Info("device-manager-stopped")
90 return nil
91}
92
93func sendResponse(ctx context.Context, ch chan interface{}, result interface{}) {
94 if ctx.Err() == nil {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070095 // Returned response only of the ctx has not been canceled/timeout/etc
Girish Gowdru0c588b22019-04-23 23:24:56 -040096 // Channel is automatically closed when a context is Done
97 ch <- result
98 log.Debugw("sendResponse", log.Fields{"result": result})
99 } else {
100 // Should the transaction be reverted back?
101 log.Debugw("sendResponse-context-error", log.Fields{"context-error": ctx.Err()})
102 }
103}
104
105func (oo *OpenOLT) addDeviceHandlerToMap(agent *DeviceHandler) {
106 oo.lockDeviceHandlersMap.Lock()
107 defer oo.lockDeviceHandlersMap.Unlock()
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700108 if _, exist := oo.deviceHandlers[agent.deviceID]; !exist {
109 oo.deviceHandlers[agent.deviceID] = agent
Girish Gowdru0c588b22019-04-23 23:24:56 -0400110 }
111}
112
113func (oo *OpenOLT) deleteDeviceHandlerToMap(agent *DeviceHandler) {
114 oo.lockDeviceHandlersMap.Lock()
115 defer oo.lockDeviceHandlersMap.Unlock()
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700116 delete(oo.deviceHandlers, agent.deviceID)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400117}
118
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700119func (oo *OpenOLT) getDeviceHandler(deviceID string) *DeviceHandler {
Girish Gowdru0c588b22019-04-23 23:24:56 -0400120 oo.lockDeviceHandlersMap.Lock()
121 defer oo.lockDeviceHandlersMap.Unlock()
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700122 if agent, ok := oo.deviceHandlers[deviceID]; ok {
Girish Gowdru0c588b22019-04-23 23:24:56 -0400123 return agent
124 }
125 return nil
126}
127
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700128//createDeviceTopic returns
Girish Gowdru0c588b22019-04-23 23:24:56 -0400129func (oo *OpenOLT) createDeviceTopic(device *voltha.Device) error {
130 log.Infow("create-device-topic", log.Fields{"deviceId": device.Id})
131 deviceTopic := kafka.Topic{Name: oo.kafkaICProxy.DefaultTopic.Name + "_" + device.Id}
132 // TODO for the offset
133 if err := oo.kafkaICProxy.SubscribeWithDefaultRequestHandler(deviceTopic, 0); err != nil {
134 log.Infow("create-device-topic-failed", log.Fields{"deviceId": device.Id, "error": err})
135 return err
136 }
137 return nil
138}
139
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700140// Adopt_device creates a new device handler if not present already and then adopts the device
Girish Gowdru0c588b22019-04-23 23:24:56 -0400141func (oo *OpenOLT) Adopt_device(device *voltha.Device) error {
142 if device == nil {
143 log.Warn("device-is-nil")
144 return errors.New("nil-device")
145 }
146 log.Infow("adopt-device", log.Fields{"deviceId": device.Id})
147 var handler *DeviceHandler
148 if handler = oo.getDeviceHandler(device.Id); handler == nil {
Devmalya Paulfb990a52019-07-09 10:01:49 -0400149 handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400150 oo.addDeviceHandlerToMap(handler)
151 go handler.AdoptDevice(device)
152 // Launch the creation of the device topic
153 // go oo.createDeviceTopic(device)
154 }
155 return nil
156}
157
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700158//Get_ofp_device_info returns OFP information for the given device
Girish Gowdru0c588b22019-04-23 23:24:56 -0400159func (oo *OpenOLT) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) {
160 log.Infow("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
161 if handler := oo.getDeviceHandler(device.Id); handler != nil {
162 return handler.GetOfpDeviceInfo(device)
163 }
164 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
165 return nil, errors.New("device-handler-not-set")
166}
167
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700168//Get_ofp_port_info returns OFP port information for the given device
169func (oo *OpenOLT) Get_ofp_port_info(device *voltha.Device, portNo int64) (*ic.PortCapability, error) {
Girish Gowdru0c588b22019-04-23 23:24:56 -0400170 log.Infow("Get_ofp_port_info", log.Fields{"deviceId": device.Id})
171 if handler := oo.getDeviceHandler(device.Id); handler != nil {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700172 return handler.GetOfpPortInfo(device, portNo)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400173 }
174 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
175 return nil, errors.New("device-handler-not-set")
176}
177
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700178//Process_inter_adapter_message sends messages to a target device (between adapters)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400179func (oo *OpenOLT) Process_inter_adapter_message(msg *ic.InterAdapterMessage) error {
180 log.Infow("Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id})
181 targetDevice := msg.Header.ProxyDeviceId // Request?
182 if targetDevice == "" && msg.Header.ToDeviceId != "" {
183 // Typical response
184 targetDevice = msg.Header.ToDeviceId
185 }
186 if handler := oo.getDeviceHandler(targetDevice); handler != nil {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700187 return handler.ProcessInterAdapterMessage(msg)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400188 }
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700189 return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", targetDevice))
Girish Gowdru0c588b22019-04-23 23:24:56 -0400190}
191
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700192//Adapter_descriptor not implemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400193func (oo *OpenOLT) Adapter_descriptor() error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700194 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400195}
196
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700197//Device_types unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400198func (oo *OpenOLT) Device_types() (*voltha.DeviceTypes, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700199 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400200}
201
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700202//Health returns unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400203func (oo *OpenOLT) Health() (*voltha.HealthStatus, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700204 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400205}
206
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700207//Reconcile_device unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400208func (oo *OpenOLT) Reconcile_device(device *voltha.Device) error {
Abhilash Laxmeshwarab0bd522019-10-21 15:05:15 +0530209 if device == nil {
210 log.Warn("device-is-nil")
211 return errors.New("nil-device")
212 }
213 log.Infow("reconcile-device", log.Fields{"deviceId": device.Id})
214 var handler *DeviceHandler
215 if handler = oo.getDeviceHandler(device.Id); handler == nil {
216 handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
217 oo.addDeviceHandlerToMap(handler)
218 handler.transitionMap = NewTransitionMap(handler)
219 handler.transitionMap.Handle(DeviceInit)
220 }
221 return nil
Girish Gowdru0c588b22019-04-23 23:24:56 -0400222}
223
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700224//Abandon_device unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400225func (oo *OpenOLT) Abandon_device(device *voltha.Device) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700226 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400227}
228
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700229//Disable_device disables the given device
Girish Gowdru0c588b22019-04-23 23:24:56 -0400230func (oo *OpenOLT) Disable_device(device *voltha.Device) error {
Girish Gowdru5ba46c92019-04-25 05:00:05 -0400231 log.Infow("disable-device", log.Fields{"deviceId": device.Id})
232 if handler := oo.getDeviceHandler(device.Id); handler != nil {
233 return handler.DisableDevice(device)
234 }
235 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
236 return errors.New("device-handler-not-found")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400237}
238
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700239//Reenable_device enables the olt device after disable
Girish Gowdru0c588b22019-04-23 23:24:56 -0400240func (oo *OpenOLT) Reenable_device(device *voltha.Device) error {
Girish Gowdru5ba46c92019-04-25 05:00:05 -0400241 log.Infow("reenable-device", log.Fields{"deviceId": device.Id})
242 if handler := oo.getDeviceHandler(device.Id); handler != nil {
243 return handler.ReenableDevice(device)
244 }
245 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
246 return errors.New("device-handler-not-found")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400247}
248
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700249//Reboot_device reboots the given device
Girish Gowdru0c588b22019-04-23 23:24:56 -0400250func (oo *OpenOLT) Reboot_device(device *voltha.Device) error {
Girish Gowdru0fe5f7e2019-05-28 05:12:27 -0400251 log.Infow("reboot-device", log.Fields{"deviceId": device.Id})
252 if handler := oo.getDeviceHandler(device.Id); handler != nil {
253 return handler.RebootDevice(device)
254 }
255 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
256 return errors.New("device-handler-not-found")
257
Girish Gowdru0c588b22019-04-23 23:24:56 -0400258}
259
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700260//Self_test_device unimplented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400261func (oo *OpenOLT) Self_test_device(device *voltha.Device) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700262 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400263}
264
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700265//Delete_device unimplemented
manikkaraj k9eb6cac2019-05-09 12:32:03 -0400266func (oo *OpenOLT) Delete_device(device *voltha.Device) error {
Devmalya Paul495b94a2019-08-27 19:42:00 -0400267 log.Infow("delete-device", log.Fields{"deviceId": device.Id})
268 if handler := oo.getDeviceHandler(device.Id); handler != nil {
269 if err := handler.DeleteDevice(device); err != nil {
270 log.Errorw("failed-to-handle-delete-device", log.Fields{"device-id": device.Id})
271 }
272 oo.deleteDeviceHandlerToMap(handler)
273 return nil
274 }
275 log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
276 return errors.New("device-handler-not-found")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400277}
278
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700279//Get_device_details unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400280func (oo *OpenOLT) Get_device_details(device *voltha.Device) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700281 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400282}
283
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700284//Update_flows_bulk returns
Manikkaraj kb1d51442019-07-23 10:41:02 -0400285func (oo *OpenOLT) Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700286 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400287}
288
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700289//Update_flows_incrementally updates (add/remove) the flows on a given device
Manikkaraj kb1d51442019-07-23 10:41:02 -0400290func (oo *OpenOLT) Update_flows_incrementally(device *voltha.Device, flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error {
291 log.Debugw("Update_flows_incrementally", log.Fields{"deviceId": device.Id, "flows": flows, "flowMetadata": flowMetadata})
Girish Gowdru0c588b22019-04-23 23:24:56 -0400292 if handler := oo.getDeviceHandler(device.Id); handler != nil {
Manikkaraj kb1d51442019-07-23 10:41:02 -0400293 return handler.UpdateFlowsIncrementally(device, flows, groups, flowMetadata)
Girish Gowdru0c588b22019-04-23 23:24:56 -0400294 }
295 log.Errorw("Update_flows_incrementally failed-device-handler-not-set", log.Fields{"deviceId": device.Id})
296 return errors.New("device-handler-not-set")
297}
298
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700299//Update_pm_config returns PmConfigs nil or error
300func (oo *OpenOLT) Update_pm_config(device *voltha.Device, pmConfigs *voltha.PmConfigs) error {
301 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400302}
303
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700304//Receive_packet_out sends packet out to the device
305func (oo *OpenOLT) Receive_packet_out(deviceID string, egressPortNo int, packet *openflow_13.OfpPacketOut) error {
306 log.Debugw("Receive_packet_out", log.Fields{"deviceId": deviceID, "egress_port_no": egressPortNo, "pkt": packet})
307 if handler := oo.getDeviceHandler(deviceID); handler != nil {
308 return handler.PacketOut(egressPortNo, packet)
manikkaraj k9eb6cac2019-05-09 12:32:03 -0400309 }
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700310 log.Errorw("Receive_packet_out failed-device-handler-not-set", log.Fields{"deviceId": deviceID, "egressport": egressPortNo, "packet": packet})
manikkaraj k9eb6cac2019-05-09 12:32:03 -0400311 return errors.New("device-handler-not-set")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400312}
313
Devmalya Pauldd23a992019-11-14 07:06:31 +0000314//Suppress_event unimplemented
315func (oo *OpenOLT) Suppress_event(filter *voltha.EventFilter) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700316 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400317}
318
Devmalya Pauldd23a992019-11-14 07:06:31 +0000319//Unsuppress_event unimplemented
320func (oo *OpenOLT) Unsuppress_event(filter *voltha.EventFilter) error {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700321 return errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400322}
323
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700324//Download_image unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400325func (oo *OpenOLT) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700326 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400327}
328
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700329//Get_image_download_status unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400330func (oo *OpenOLT) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700331 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400332}
333
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700334//Cancel_image_download unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400335func (oo *OpenOLT) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700336 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400337}
338
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700339//Activate_image_update unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400340func (oo *OpenOLT) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700341 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400342}
343
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700344//Revert_image_update unimplemented
Girish Gowdru0c588b22019-04-23 23:24:56 -0400345func (oo *OpenOLT) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Gowdru6a80bbd2019-07-02 07:36:09 -0700346 return nil, errors.New("unImplemented")
Girish Gowdru0c588b22019-04-23 23:24:56 -0400347}