alshabib
Committed by Gerrit Code Review

add ports back to discoverer after a device has

gone offline and come back.

Change-Id: I524e25570f9eee8870e97ed09612c423e0cf9588
...@@ -570,7 +570,7 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider { ...@@ -570,7 +570,7 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
570 case DEVICE_AVAILABILITY_CHANGED: 570 case DEVICE_AVAILABILITY_CHANGED:
571 if (deviceService.isAvailable(deviceId)) { 571 if (deviceService.isAvailable(deviceId)) {
572 log.debug("Device up {}", deviceId); 572 log.debug("Device up {}", deviceId);
573 - updateDevice(device); 573 + updateDevice(device).ifPresent(ld -> updatePorts(ld, deviceId));
574 } else { 574 } else {
575 log.debug("Device down {}", deviceId); 575 log.debug("Device down {}", deviceId);
576 removeDevice(deviceId); 576 removeDevice(deviceId);
......