Remove links when device status changed.

Discovered links should be removed immediately When device status become unavailable.

Change-Id: I6cd771716f5c232294a49484b700a1aa122f7350
diff --git a/providers/link/src/main/java/org/onosproject/provider/linkdiscovery/impl/LinkDiscoveryProvider.java b/providers/link/src/main/java/org/onosproject/provider/linkdiscovery/impl/LinkDiscoveryProvider.java
index 7f29cc5..857c2d8 100644
--- a/providers/link/src/main/java/org/onosproject/provider/linkdiscovery/impl/LinkDiscoveryProvider.java
+++ b/providers/link/src/main/java/org/onosproject/provider/linkdiscovery/impl/LinkDiscoveryProvider.java
@@ -336,6 +336,11 @@
                 case DEVICE_REMOVED:
                     evaluateLinks(device.id(), Sets.newHashSet());
                     break;
+                case DEVICE_AVAILABILITY_CHANGED:
+                    if (!deviceService.isAvailable(device.id())) {
+                        evaluateLinks(device.id(), Sets.newHashSet());
+                    }
+                    break;
                 default:
                     log.debug("No implemented action for other DeviceEvents for the device {}", device.id());
                     break;