Polatis netconf: fix the default device

Change-Id: Ib466a8e71a3f25d859b5dffeefc0d1bfc46674f1
This commit is contained in:
Laszlo Papp 2017-10-14 08:25:55 +01:00 committed by Andrea Campanella
parent fc88978ee1
commit 4e3780ef25

View File

@ -33,6 +33,7 @@ import org.onosproject.net.driver.AbstractHandlerBehaviour;
import static org.onosproject.net.optical.device.OmsPortHelper.omsPortDescription;
import org.onlab.packet.ChassisId;
import org.onlab.util.Frequency;
import org.onlab.util.Spectrum;
@ -95,10 +96,10 @@ public class PolatisDeviceDescription extends AbstractHandlerBehaviour
DeviceId devid = handler().data().deviceId();
Device dev = devsvc.getDevice(devid);
if (dev == null) {
return new DefaultDeviceDescription(dev.id().uri(), FIBER_SWITCH,
return new DefaultDeviceDescription(devid.uri(), FIBER_SWITCH,
DEFAULT_MANUFACTURER, DEFAULT_DESCRIPTION_DATA,
DEFAULT_DESCRIPTION_DATA, DEFAULT_DESCRIPTION_DATA,
dev.chassisId());
new ChassisId());
}
String reply = netconfGet(handler(), getProductInformationFilter());
HierarchicalConfiguration cfg = configAt(reply, KEY_DATA_PRODINF);