This commit fixes a few issues:
1) The number of arguments to decode in a request to the simulated
OLT was incorrect
2) Adapter type was not set properly when a device is loaded from
DB
Change-Id: I7aa9a5314bd167565372138b0819df9aa744c41b
diff --git a/adapters/simulated_olt/adaptercore/simulated_olt.go b/adapters/simulated_olt/adaptercore/simulated_olt.go
index 2dd7c67..edf3135 100644
--- a/adapters/simulated_olt/adaptercore/simulated_olt.go
+++ b/adapters/simulated_olt/adaptercore/simulated_olt.go
@@ -126,7 +126,9 @@
func (so *SimulatedOLT) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) {
log.Infow("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
if handler := so.getDeviceHandler(device.Id); handler != nil {
- return handler.GetOfpDeviceInfo(device)
+ info, err := handler.GetOfpDeviceInfo(device)
+ log.Infow("Get_ofp_device_info-resp", log.Fields{"switch": info})
+ return info, err
}
log.Errorw("device-handler-not-set", log.Fields{"deviceId": device.Id})
return nil, errors.New("device-handler-not-set")