fixing events in the olt when olt availability changes

Change-Id: I1db2bb120463766d984e33743667ee187cb1378b
diff --git a/app/src/main/java/org/onosproject/olt/impl/Olt.java b/app/src/main/java/org/onosproject/olt/impl/Olt.java
index 0a97cca..ba3b5cf 100644
--- a/app/src/main/java/org/onosproject/olt/impl/Olt.java
+++ b/app/src/main/java/org/onosproject/olt/impl/Olt.java
@@ -406,9 +406,20 @@
                             AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId,
                             null, null));
                     break;
+                case DEVICE_AVAILABILITY_CHANGED:
+                    if (deviceService.isAvailable(devId)) {
+                        post(new AccessDeviceEvent(
+                                AccessDeviceEvent.Type.DEVICE_CONNECTED, devId,
+                                null, null));
+                    } else {
+                        post(new AccessDeviceEvent(
+                                AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId,
+                                null, null));
+                    }
+                    break;
                 case DEVICE_UPDATED:
                 case DEVICE_SUSPENDED:
-                case DEVICE_AVAILABILITY_CHANGED:
+
                 case PORT_STATS_UPDATED:
                 default:
                     return;