commit | 9daf208313ac70301cf0fe29339ba0f044d30f64 | [log] [tgz] |
---|---|---|
author | senthil <s.senthil@samsung.com> | Wed Feb 14 17:05:36 2024 +0900 |
committer | senthil <s.senthil@samsung.com> | Wed Feb 14 17:05:36 2024 +0900 |
tree | 52c4136d8904621ad655b4fd5bd2f41603ddd949 | |
parent | ffafca2daa1c05726977f24ad18f10dde9445d9b [diff] |
Initiate link discovery when device status is available Based on device status links will be removed (device status: offline) or initiate link discovery (device status: available) Change-Id: Ibb6fbb8e8740fcae616090b1d13fe0088d29a7b4
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 857c2d8..799b5b5 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
@@ -337,7 +337,9 @@ evaluateLinks(device.id(), Sets.newHashSet()); break; case DEVICE_AVAILABILITY_CHANGED: - if (!deviceService.isAvailable(device.id())) { + if (deviceService.isAvailable(device.id())) { + executor.execute(() -> discoverLinks(device)); + } else { evaluateLinks(device.id(), Sets.newHashSet()); } break;