Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 1 | /* |
| 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 Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 16 | |
| 17 | //Package adaptercore provides the utility for olt devices, flows and statistics |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 18 | package adaptercore |
| 19 | |
| 20 | import ( |
| 21 | "context" |
| 22 | "errors" |
| 23 | "fmt" |
| 24 | "sync" |
| 25 | |
| 26 | com "github.com/opencord/voltha-go/adapters/common" |
| 27 | "github.com/opencord/voltha-go/common/log" |
| 28 | "github.com/opencord/voltha-go/kafka" |
| 29 | ic "github.com/opencord/voltha-protos/go/inter_container" |
| 30 | "github.com/opencord/voltha-protos/go/openflow_13" |
| 31 | "github.com/opencord/voltha-protos/go/voltha" |
| 32 | ) |
| 33 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 34 | //OpenOLT structure holds the OLT information |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 35 | type OpenOLT struct { |
| 36 | deviceHandlers map[string]*DeviceHandler |
| 37 | coreProxy *com.CoreProxy |
| 38 | adapterProxy *com.AdapterProxy |
| 39 | kafkaICProxy *kafka.InterContainerProxy |
| 40 | numOnus int |
| 41 | KVStoreHost string |
| 42 | KVStorePort int |
| 43 | KVStoreType string |
| 44 | exitChannel chan int |
| 45 | lockDeviceHandlersMap sync.RWMutex |
| 46 | } |
| 47 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 48 | //NewOpenOLT returns a new instance of OpenOLT |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 49 | func NewOpenOLT(ctx context.Context, kafkaICProxy *kafka.InterContainerProxy, coreProxy *com.CoreProxy, adapterProxy *com.AdapterProxy, onuNumber int, kvStoreHost string, kvStorePort int, KVStoreType string) *OpenOLT { |
| 50 | var openOLT OpenOLT |
| 51 | openOLT.exitChannel = make(chan int, 1) |
| 52 | openOLT.deviceHandlers = make(map[string]*DeviceHandler) |
| 53 | openOLT.kafkaICProxy = kafkaICProxy |
| 54 | openOLT.numOnus = onuNumber |
| 55 | openOLT.coreProxy = coreProxy |
| 56 | openOLT.adapterProxy = adapterProxy |
| 57 | openOLT.KVStoreHost = kvStoreHost |
| 58 | openOLT.KVStorePort = kvStorePort |
| 59 | openOLT.KVStoreType = KVStoreType |
| 60 | openOLT.lockDeviceHandlersMap = sync.RWMutex{} |
| 61 | return &openOLT |
| 62 | } |
| 63 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 64 | //Start starts (logs) the device manager |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 65 | func (oo *OpenOLT) Start(ctx context.Context) error { |
| 66 | log.Info("starting-device-manager") |
| 67 | log.Info("device-manager-started") |
| 68 | return nil |
| 69 | } |
| 70 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 71 | //Stop terminates the session |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 72 | func (oo *OpenOLT) Stop(ctx context.Context) error { |
| 73 | log.Info("stopping-device-manager") |
| 74 | oo.exitChannel <- 1 |
| 75 | log.Info("device-manager-stopped") |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | func sendResponse(ctx context.Context, ch chan interface{}, result interface{}) { |
| 80 | if ctx.Err() == nil { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 81 | // Returned response only of the ctx has not been canceled/timeout/etc |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 82 | // Channel is automatically closed when a context is Done |
| 83 | ch <- result |
| 84 | log.Debugw("sendResponse", log.Fields{"result": result}) |
| 85 | } else { |
| 86 | // Should the transaction be reverted back? |
| 87 | log.Debugw("sendResponse-context-error", log.Fields{"context-error": ctx.Err()}) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func (oo *OpenOLT) addDeviceHandlerToMap(agent *DeviceHandler) { |
| 92 | oo.lockDeviceHandlersMap.Lock() |
| 93 | defer oo.lockDeviceHandlersMap.Unlock() |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 94 | if _, exist := oo.deviceHandlers[agent.deviceID]; !exist { |
| 95 | oo.deviceHandlers[agent.deviceID] = agent |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | |
| 99 | func (oo *OpenOLT) deleteDeviceHandlerToMap(agent *DeviceHandler) { |
| 100 | oo.lockDeviceHandlersMap.Lock() |
| 101 | defer oo.lockDeviceHandlersMap.Unlock() |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 102 | delete(oo.deviceHandlers, agent.deviceID) |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 103 | } |
| 104 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 105 | func (oo *OpenOLT) getDeviceHandler(deviceID string) *DeviceHandler { |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 106 | oo.lockDeviceHandlersMap.Lock() |
| 107 | defer oo.lockDeviceHandlersMap.Unlock() |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 108 | if agent, ok := oo.deviceHandlers[deviceID]; ok { |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 109 | return agent |
| 110 | } |
| 111 | return nil |
| 112 | } |
| 113 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 114 | //createDeviceTopic returns |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 115 | func (oo *OpenOLT) createDeviceTopic(device *voltha.Device) error { |
| 116 | log.Infow("create-device-topic", log.Fields{"deviceId": device.Id}) |
| 117 | deviceTopic := kafka.Topic{Name: oo.kafkaICProxy.DefaultTopic.Name + "_" + device.Id} |
| 118 | // TODO for the offset |
| 119 | if err := oo.kafkaICProxy.SubscribeWithDefaultRequestHandler(deviceTopic, 0); err != nil { |
| 120 | log.Infow("create-device-topic-failed", log.Fields{"deviceId": device.Id, "error": err}) |
| 121 | return err |
| 122 | } |
| 123 | return nil |
| 124 | } |
| 125 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 126 | // Adopt_device creates a new device handler if not present already and then adopts the device |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 127 | func (oo *OpenOLT) Adopt_device(device *voltha.Device) error { |
| 128 | if device == nil { |
| 129 | log.Warn("device-is-nil") |
| 130 | return errors.New("nil-device") |
| 131 | } |
| 132 | log.Infow("adopt-device", log.Fields{"deviceId": device.Id}) |
| 133 | var handler *DeviceHandler |
| 134 | if handler = oo.getDeviceHandler(device.Id); handler == nil { |
| 135 | handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, device, oo) |
| 136 | oo.addDeviceHandlerToMap(handler) |
| 137 | go handler.AdoptDevice(device) |
| 138 | // Launch the creation of the device topic |
| 139 | // go oo.createDeviceTopic(device) |
| 140 | } |
| 141 | return nil |
| 142 | } |
| 143 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 144 | //Get_ofp_device_info returns OFP information for the given device |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 145 | func (oo *OpenOLT) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) { |
| 146 | log.Infow("Get_ofp_device_info", log.Fields{"deviceId": device.Id}) |
| 147 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
| 148 | return handler.GetOfpDeviceInfo(device) |
| 149 | } |
| 150 | log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 151 | return nil, errors.New("device-handler-not-set") |
| 152 | } |
| 153 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 154 | //Get_ofp_port_info returns OFP port information for the given device |
| 155 | func (oo *OpenOLT) Get_ofp_port_info(device *voltha.Device, portNo int64) (*ic.PortCapability, error) { |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 156 | log.Infow("Get_ofp_port_info", log.Fields{"deviceId": device.Id}) |
| 157 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 158 | return handler.GetOfpPortInfo(device, portNo) |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 159 | } |
| 160 | log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 161 | return nil, errors.New("device-handler-not-set") |
| 162 | } |
| 163 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 164 | //Process_inter_adapter_message sends messages to a target device (between adapters) |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 165 | func (oo *OpenOLT) Process_inter_adapter_message(msg *ic.InterAdapterMessage) error { |
| 166 | log.Infow("Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id}) |
| 167 | targetDevice := msg.Header.ProxyDeviceId // Request? |
| 168 | if targetDevice == "" && msg.Header.ToDeviceId != "" { |
| 169 | // Typical response |
| 170 | targetDevice = msg.Header.ToDeviceId |
| 171 | } |
| 172 | if handler := oo.getDeviceHandler(targetDevice); handler != nil { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 173 | return handler.ProcessInterAdapterMessage(msg) |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 174 | } |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 175 | return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", targetDevice)) |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 176 | } |
| 177 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 178 | //Adapter_descriptor not implemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 179 | func (oo *OpenOLT) Adapter_descriptor() error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 180 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 181 | } |
| 182 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 183 | //Device_types unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 184 | func (oo *OpenOLT) Device_types() (*voltha.DeviceTypes, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 185 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 186 | } |
| 187 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 188 | //Health returns unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 189 | func (oo *OpenOLT) Health() (*voltha.HealthStatus, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 190 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 191 | } |
| 192 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 193 | //Reconcile_device unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 194 | func (oo *OpenOLT) Reconcile_device(device *voltha.Device) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 195 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 196 | } |
| 197 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 198 | //Abandon_device unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 199 | func (oo *OpenOLT) Abandon_device(device *voltha.Device) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 200 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 201 | } |
| 202 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 203 | //Disable_device disables the given device |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 204 | func (oo *OpenOLT) Disable_device(device *voltha.Device) error { |
Girish Gowdru | 5ba46c9 | 2019-04-25 05:00:05 -0400 | [diff] [blame] | 205 | log.Infow("disable-device", log.Fields{"deviceId": device.Id}) |
| 206 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
| 207 | return handler.DisableDevice(device) |
| 208 | } |
| 209 | log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 210 | return errors.New("device-handler-not-found") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 211 | } |
| 212 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 213 | //Reenable_device enables the olt device after disable |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 214 | func (oo *OpenOLT) Reenable_device(device *voltha.Device) error { |
Girish Gowdru | 5ba46c9 | 2019-04-25 05:00:05 -0400 | [diff] [blame] | 215 | log.Infow("reenable-device", log.Fields{"deviceId": device.Id}) |
| 216 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
| 217 | return handler.ReenableDevice(device) |
| 218 | } |
| 219 | log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 220 | return errors.New("device-handler-not-found") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 221 | } |
| 222 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 223 | //Reboot_device reboots the given device |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 224 | func (oo *OpenOLT) Reboot_device(device *voltha.Device) error { |
Girish Gowdru | 0fe5f7e | 2019-05-28 05:12:27 -0400 | [diff] [blame] | 225 | log.Infow("reboot-device", log.Fields{"deviceId": device.Id}) |
| 226 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
| 227 | return handler.RebootDevice(device) |
| 228 | } |
| 229 | log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 230 | return errors.New("device-handler-not-found") |
| 231 | |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 232 | } |
| 233 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 234 | //Self_test_device unimplented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 235 | func (oo *OpenOLT) Self_test_device(device *voltha.Device) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 236 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 237 | } |
| 238 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 239 | //Delete_device unimplemented |
manikkaraj k | 9eb6cac | 2019-05-09 12:32:03 -0400 | [diff] [blame] | 240 | func (oo *OpenOLT) Delete_device(device *voltha.Device) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 241 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 242 | } |
| 243 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 244 | //Get_device_details unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 245 | func (oo *OpenOLT) Get_device_details(device *voltha.Device) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 246 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 247 | } |
| 248 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 249 | //Update_flows_bulk returns |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 250 | func (oo *OpenOLT) Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 251 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 252 | } |
| 253 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 254 | //Update_flows_incrementally updates (add/remove) the flows on a given device |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 255 | func (oo *OpenOLT) Update_flows_incrementally(device *voltha.Device, flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges) error { |
| 256 | log.Debugw("Update_flows_incrementally", log.Fields{"deviceId": device.Id, "flows": flows}) |
| 257 | if handler := oo.getDeviceHandler(device.Id); handler != nil { |
| 258 | return handler.UpdateFlowsIncrementally(device, flows, groups) |
| 259 | } |
| 260 | log.Errorw("Update_flows_incrementally failed-device-handler-not-set", log.Fields{"deviceId": device.Id}) |
| 261 | return errors.New("device-handler-not-set") |
| 262 | } |
| 263 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 264 | //Update_pm_config returns PmConfigs nil or error |
| 265 | func (oo *OpenOLT) Update_pm_config(device *voltha.Device, pmConfigs *voltha.PmConfigs) error { |
| 266 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 267 | } |
| 268 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 269 | //Receive_packet_out sends packet out to the device |
| 270 | func (oo *OpenOLT) Receive_packet_out(deviceID string, egressPortNo int, packet *openflow_13.OfpPacketOut) error { |
| 271 | log.Debugw("Receive_packet_out", log.Fields{"deviceId": deviceID, "egress_port_no": egressPortNo, "pkt": packet}) |
| 272 | if handler := oo.getDeviceHandler(deviceID); handler != nil { |
| 273 | return handler.PacketOut(egressPortNo, packet) |
manikkaraj k | 9eb6cac | 2019-05-09 12:32:03 -0400 | [diff] [blame] | 274 | } |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 275 | log.Errorw("Receive_packet_out failed-device-handler-not-set", log.Fields{"deviceId": deviceID, "egressport": egressPortNo, "packet": packet}) |
manikkaraj k | 9eb6cac | 2019-05-09 12:32:03 -0400 | [diff] [blame] | 276 | return errors.New("device-handler-not-set") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 277 | } |
| 278 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 279 | //Suppress_alarm unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 280 | func (oo *OpenOLT) Suppress_alarm(filter *voltha.AlarmFilter) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 281 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 282 | } |
| 283 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 284 | //Unsuppress_alarm unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 285 | func (oo *OpenOLT) Unsuppress_alarm(filter *voltha.AlarmFilter) error { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 286 | return errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 287 | } |
| 288 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 289 | //Download_image unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 290 | func (oo *OpenOLT) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 291 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 292 | } |
| 293 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 294 | //Get_image_download_status unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 295 | func (oo *OpenOLT) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 296 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 297 | } |
| 298 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 299 | //Cancel_image_download unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 300 | func (oo *OpenOLT) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 301 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 302 | } |
| 303 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 304 | //Activate_image_update unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 305 | func (oo *OpenOLT) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 306 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 307 | } |
| 308 | |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 309 | //Revert_image_update unimplemented |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 310 | func (oo *OpenOLT) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) { |
Girish Gowdru | 6a80bbd | 2019-07-02 07:36:09 -0700 | [diff] [blame] | 311 | return nil, errors.New("unImplemented") |
Girish Gowdru | 0c588b2 | 2019-04-23 23:24:56 -0400 | [diff] [blame] | 312 | } |