alshabib
Committed by Gerrit Code Review

fixing events in the olt when olt availability changes

Change-Id: I1db2bb120463766d984e33743667ee187cb1378b
...@@ -406,9 +406,20 @@ public class Olt ...@@ -406,9 +406,20 @@ public class Olt
406 AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId, 406 AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId,
407 null, null)); 407 null, null));
408 break; 408 break;
409 + case DEVICE_AVAILABILITY_CHANGED:
410 + if (deviceService.isAvailable(devId)) {
411 + post(new AccessDeviceEvent(
412 + AccessDeviceEvent.Type.DEVICE_CONNECTED, devId,
413 + null, null));
414 + } else {
415 + post(new AccessDeviceEvent(
416 + AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId,
417 + null, null));
418 + }
419 + break;
409 case DEVICE_UPDATED: 420 case DEVICE_UPDATED:
410 case DEVICE_SUSPENDED: 421 case DEVICE_SUSPENDED:
411 - case DEVICE_AVAILABILITY_CHANGED: 422 +
412 case PORT_STATS_UPDATED: 423 case PORT_STATS_UPDATED:
413 default: 424 default:
414 return; 425 return;
......