khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019-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 | */ |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 16 | |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 17 | package mocks |
| 18 | |
| 19 | import ( |
| 20 | "context" |
Scott Baker | 432f9be | 2020-03-26 11:56:30 -0700 | [diff] [blame] | 21 | "errors" |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 22 | "fmt" |
| 23 | "github.com/gogo/protobuf/proto" |
serkant.uluderya | 2ae470f | 2020-01-21 11:13:09 -0800 | [diff] [blame] | 24 | "github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif" |
| 25 | com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common" |
| 26 | "github.com/opencord/voltha-lib-go/v3/pkg/log" |
| 27 | ic "github.com/opencord/voltha-protos/v3/go/inter_container" |
| 28 | of "github.com/opencord/voltha-protos/v3/go/openflow_13" |
| 29 | "github.com/opencord/voltha-protos/v3/go/voltha" |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 30 | "strings" |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 31 | ) |
| 32 | |
| 33 | const ( |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 34 | numONUPerOLT = 4 |
| 35 | startingUNIPortNo = 100 |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 36 | ) |
| 37 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 38 | // OLTAdapter represent OLT adapter |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 39 | type OLTAdapter struct { |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 40 | *Adapter |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 41 | } |
| 42 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 43 | // NewOLTAdapter - creates OLT adapter instance |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 44 | func NewOLTAdapter(cp adapterif.CoreProxy) *OLTAdapter { |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 45 | return &OLTAdapter{ |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 46 | Adapter: NewAdapter(cp), |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 47 | } |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 48 | } |
| 49 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 50 | // Adopt_device creates new handler for added device |
| 51 | func (oltA *OLTAdapter) Adopt_device(device *voltha.Device) error { // nolint |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 52 | go func() { |
| 53 | d := proto.Clone(device).(*voltha.Device) |
| 54 | d.Root = true |
| 55 | d.Vendor = "olt_adapter_mock" |
| 56 | d.Model = "go-mock" |
| 57 | d.SerialNumber = com.GetRandomSerialNumber() |
| 58 | d.MacAddress = strings.ToUpper(com.GetRandomMacAddress()) |
| 59 | oltA.storeDevice(d) |
| 60 | if res := oltA.coreProxy.DeviceUpdate(context.TODO(), d); res != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 61 | logger.Fatalf("deviceUpdate-failed-%s", res) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 62 | } |
| 63 | nniPort := &voltha.Port{ |
| 64 | PortNo: 2, |
| 65 | Label: fmt.Sprintf("nni-%d", 2), |
| 66 | Type: voltha.Port_ETHERNET_NNI, |
| 67 | OperStatus: voltha.OperStatus_ACTIVE, |
| 68 | } |
| 69 | var err error |
| 70 | if err = oltA.coreProxy.PortCreated(context.TODO(), d.Id, nniPort); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 71 | logger.Fatalf("PortCreated-failed-%s", err) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | ponPort := &voltha.Port{ |
| 75 | PortNo: 1, |
| 76 | Label: fmt.Sprintf("pon-%d", 1), |
| 77 | Type: voltha.Port_PON_OLT, |
| 78 | OperStatus: voltha.OperStatus_ACTIVE, |
| 79 | } |
| 80 | if err = oltA.coreProxy.PortCreated(context.TODO(), d.Id, ponPort); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 81 | logger.Fatalf("PortCreated-failed-%s", err) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | d.ConnectStatus = voltha.ConnectStatus_REACHABLE |
| 85 | d.OperStatus = voltha.OperStatus_ACTIVE |
| 86 | |
| 87 | if err = oltA.coreProxy.DeviceStateUpdate(context.TODO(), d.Id, d.ConnectStatus, d.OperStatus); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 88 | logger.Fatalf("Device-state-update-failed-%s", err) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | //Get the latest device data from the Core |
| 92 | if d, err = oltA.coreProxy.GetDevice(context.TODO(), d.Id, d.Id); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 93 | logger.Fatalf("getting-device-failed-%s", err) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 94 | } |
| 95 | |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 96 | oltA.updateDevice(d) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 97 | |
| 98 | // Register Child devices |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 99 | initialUniPortNo := startingUNIPortNo |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 100 | for i := 0; i < numONUPerOLT; i++ { |
| 101 | go func(seqNo int) { |
| 102 | if _, err := oltA.coreProxy.ChildDeviceDetected( |
| 103 | context.TODO(), |
| 104 | d.Id, |
| 105 | 1, |
| 106 | "onu_adapter_mock", |
| 107 | initialUniPortNo+seqNo, |
| 108 | "onu_adapter_mock", |
| 109 | com.GetRandomSerialNumber(), |
| 110 | int64(seqNo)); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 111 | logger.Fatalf("failure-sending-child-device-%s", err) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 112 | } |
| 113 | }(i) |
| 114 | } |
| 115 | }() |
| 116 | return nil |
| 117 | } |
| 118 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 119 | // Get_ofp_device_info returns ofp device info |
| 120 | func (oltA *OLTAdapter) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) { // nolint |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 121 | if d := oltA.getDevice(device.Id); d == nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 122 | logger.Fatalf("device-not-found-%s", device.Id) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 123 | } |
| 124 | return &ic.SwitchCapability{ |
| 125 | Desc: &of.OfpDesc{ |
| 126 | HwDesc: "olt_adapter_mock", |
| 127 | SwDesc: "olt_adapter_mock", |
| 128 | SerialNum: "12345678", |
| 129 | }, |
| 130 | SwitchFeatures: &of.OfpSwitchFeatures{ |
| 131 | NBuffers: 256, |
| 132 | NTables: 2, |
| 133 | Capabilities: uint32(of.OfpCapabilities_OFPC_FLOW_STATS | |
| 134 | of.OfpCapabilities_OFPC_TABLE_STATS | |
| 135 | of.OfpCapabilities_OFPC_PORT_STATS | |
| 136 | of.OfpCapabilities_OFPC_GROUP_STATS), |
| 137 | }, |
| 138 | }, nil |
| 139 | } |
| 140 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 141 | // Get_ofp_port_info returns ofp port info |
| 142 | func (oltA *OLTAdapter) Get_ofp_port_info(device *voltha.Device, portNo int64) (*ic.PortCapability, error) { // nolint |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 143 | if d := oltA.getDevice(device.Id); d == nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 144 | logger.Fatalf("device-not-found-%s", device.Id) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 145 | } |
| 146 | capability := uint32(of.OfpPortFeatures_OFPPF_1GB_FD | of.OfpPortFeatures_OFPPF_FIBER) |
| 147 | return &ic.PortCapability{ |
| 148 | Port: &voltha.LogicalPort{ |
| 149 | OfpPort: &of.OfpPort{ |
| 150 | HwAddr: macAddressToUint32Array("11:22:33:44:55:66"), |
| 151 | Config: 0, |
| 152 | State: uint32(of.OfpPortState_OFPPS_LIVE), |
| 153 | Curr: capability, |
| 154 | Advertised: capability, |
| 155 | Peer: capability, |
| 156 | CurrSpeed: uint32(of.OfpPortFeatures_OFPPF_1GB_FD), |
| 157 | MaxSpeed: uint32(of.OfpPortFeatures_OFPPF_1GB_FD), |
| 158 | }, |
| 159 | DeviceId: device.Id, |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 160 | DevicePortNo: uint32(portNo), |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 161 | }, |
| 162 | }, nil |
| 163 | } |
| 164 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 165 | // GetNumONUPerOLT returns number of ONUs per OLT |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 166 | func (oltA *OLTAdapter) GetNumONUPerOLT() int { |
| 167 | return numONUPerOLT |
| 168 | } |
| 169 | |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 170 | // Returns the starting UNI port number |
| 171 | func (oltA *OLTAdapter) GetStartingUNIPortNo() int { |
| 172 | return startingUNIPortNo |
| 173 | } |
| 174 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 175 | // Disable_device disables device |
| 176 | func (oltA *OLTAdapter) Disable_device(device *voltha.Device) error { // nolint |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 177 | go func() { |
| 178 | if d := oltA.getDevice(device.Id); d == nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 179 | logger.Fatalf("device-not-found-%s", device.Id) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | cloned := proto.Clone(device).(*voltha.Device) |
| 183 | // Update the all ports state on that device to disable |
| 184 | if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_UNKNOWN); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 185 | logger.Warnw("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 186 | } |
| 187 | |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 188 | //Update the device operational state |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 189 | cloned.OperStatus = voltha.OperStatus_UNKNOWN |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 190 | // The device is still reachable after it has been disabled, so the connection status should not be changed. |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 191 | |
| 192 | if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil { |
khenaidoo | 442e7c7 | 2020-03-10 16:13:48 -0400 | [diff] [blame] | 193 | // Device may already have been deleted in the core |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 194 | logger.Warnw("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | 442e7c7 | 2020-03-10 16:13:48 -0400 | [diff] [blame] | 195 | return |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 196 | } |
| 197 | |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 198 | oltA.updateDevice(cloned) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 199 | |
| 200 | // Tell the Core that all child devices have been disabled (by default it's an action already taken by the Core |
| 201 | if err := oltA.coreProxy.ChildDevicesLost(context.TODO(), cloned.Id); err != nil { |
khenaidoo | 442e7c7 | 2020-03-10 16:13:48 -0400 | [diff] [blame] | 202 | // Device may already have been deleted in the core |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 203 | logger.Warnw("lost-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 204 | } |
| 205 | }() |
| 206 | return nil |
| 207 | } |
| 208 | |
npujar | 1d86a52 | 2019-11-14 17:11:16 +0530 | [diff] [blame] | 209 | // Reenable_device reenables device |
| 210 | func (oltA *OLTAdapter) Reenable_device(device *voltha.Device) error { // nolint |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 211 | go func() { |
| 212 | if d := oltA.getDevice(device.Id); d == nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 213 | logger.Fatalf("device-not-found-%s", device.Id) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | cloned := proto.Clone(device).(*voltha.Device) |
| 217 | // Update the all ports state on that device to enable |
| 218 | if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), cloned.Id, voltha.OperStatus_ACTIVE); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 219 | logger.Fatalf("updating-ports-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | //Update the device state |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 223 | cloned.OperStatus = voltha.OperStatus_ACTIVE |
| 224 | |
| 225 | if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), cloned.Id, cloned.ConnectStatus, cloned.OperStatus); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 226 | logger.Fatalf("device-state-update-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | // Tell the Core that all child devices have been enabled |
| 230 | if err := oltA.coreProxy.ChildDevicesDetected(context.TODO(), cloned.Id); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 231 | logger.Fatalf("detection-notif-of-child-devices-failed", log.Fields{"deviceId": device.Id, "error": err}) |
khenaidoo | ab1f7bd | 2019-11-14 14:00:27 -0500 | [diff] [blame] | 232 | } |
| 233 | }() |
| 234 | return nil |
| 235 | } |
kesavand | bc2d162 | 2020-01-21 00:42:01 -0500 | [diff] [blame] | 236 | |
| 237 | // Enable_port - |
| 238 | func (oltA *OLTAdapter) Enable_port(deviceId string, Port *voltha.Port) error { //nolint |
| 239 | go func() { |
| 240 | |
| 241 | if Port.Type == voltha.Port_PON_OLT { |
| 242 | if err := oltA.coreProxy.PortStateUpdate(context.TODO(), deviceId, voltha.Port_PON_OLT, Port.PortNo, voltha.OperStatus_ACTIVE); err != nil { |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 243 | logger.Fatalf("updating-ports-failed", log.Fields{"device-id": deviceId, "error": err}) |
kesavand | bc2d162 | 2020-01-21 00:42:01 -0500 | [diff] [blame] | 244 | } |
| 245 | } |
| 246 | |
| 247 | }() |
| 248 | return nil |
| 249 | } |
| 250 | |
| 251 | // Disable_port - |
| 252 | func (oltA *OLTAdapter) Disable_port(deviceId string, Port *voltha.Port) error { //nolint |
| 253 | go func() { |
| 254 | |
| 255 | if Port.Type == voltha.Port_PON_OLT { |
| 256 | if err := oltA.coreProxy.PortStateUpdate(context.TODO(), deviceId, voltha.Port_PON_OLT, Port.PortNo, voltha.OperStatus_DISCOVERED); err != nil { |
khenaidoo | 442e7c7 | 2020-03-10 16:13:48 -0400 | [diff] [blame] | 257 | // Corresponding device may have been deleted |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 258 | logger.Warnw("updating-ports-failed", log.Fields{"device-id": deviceId, "error": err}) |
kesavand | bc2d162 | 2020-01-21 00:42:01 -0500 | [diff] [blame] | 259 | } |
| 260 | } |
| 261 | }() |
| 262 | return nil |
| 263 | } |
Chaitrashree G S | 543df3e | 2020-02-24 22:36:54 -0500 | [diff] [blame] | 264 | |
| 265 | // Child_device_lost deletes ONU and its references |
| 266 | func (oltA *OLTAdapter) Child_device_lost(deviceID string, pPortNo uint32, onuID uint32) error { // nolint |
| 267 | return nil |
| 268 | } |
khenaidoo | 67b2215 | 2020-03-02 16:01:25 -0500 | [diff] [blame] | 269 | |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 270 | // Reboot_device - |
| 271 | func (oltA *OLTAdapter) Reboot_device(device *voltha.Device) error { // nolint |
Girish Kumar | f56a468 | 2020-03-20 20:07:46 +0000 | [diff] [blame] | 272 | logger.Infow("reboot-device", log.Fields{"deviceId": device.Id}) |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 273 | |
| 274 | go func() { |
| 275 | if err := oltA.coreProxy.DeviceStateUpdate(context.TODO(), device.Id, voltha.ConnectStatus_UNREACHABLE, voltha.OperStatus_UNKNOWN); err != nil { |
Kent Hagerman | 45a13e4 | 2020-04-13 12:23:50 -0400 | [diff] [blame] | 276 | logger.Fatalf("device-state-update-failed", log.Fields{"device-id": device.Id, "error": err}) |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 277 | } |
| 278 | if err := oltA.coreProxy.PortsStateUpdate(context.TODO(), device.Id, voltha.OperStatus_UNKNOWN); err != nil { |
khenaidoo | 8b4abbf | 2020-04-24 17:04:30 -0400 | [diff] [blame] | 279 | // Not an error as the previous command will start the process of clearing the OLT |
| 280 | logger.Infow("port-update-failed", log.Fields{"device-id": device.Id, "error": err}) |
Girish Gowdra | 408cd96 | 2020-03-11 14:31:31 -0700 | [diff] [blame] | 281 | } |
| 282 | }() |
| 283 | return nil |
| 284 | } |
| 285 | |
Scott Baker | 432f9be | 2020-03-26 11:56:30 -0700 | [diff] [blame] | 286 | // TODO: REMOVE Start_omci_test begins an omci self-test |
| 287 | func (oltA *OLTAdapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint |
| 288 | _ = device |
| 289 | return nil, errors.New("start-omci-test-not-implemented") |
| 290 | } |
| 291 | |
Dinesh Belwalkar | c1129f1 | 2020-02-27 10:41:33 -0800 | [diff] [blame] | 292 | func (oltA *OLTAdapter) Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error) { // nolint |
| 293 | _ = deviceId |
| 294 | _ = device |
| 295 | _ = valueflag |
| 296 | return nil, errors.New("get-ext-value-not-implemented") |
| 297 | } |