Implement host probing retry with major refactoring
- Implement probe retry
- Switch to typical core/provider design pattern for HostProbingService
and as a result decoupling the dependency between SR and HostLocationProvider
Change-Id: I33a15af580677ea376b421ac3e26f9821dcca844
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java b/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java
index d9aeff5..f3dc7ab 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostProviderService.java
@@ -15,12 +15,12 @@
*/
package org.onosproject.net.host;
+import org.apache.commons.lang3.NotImplementedException;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.HostId;
import org.onosproject.net.HostLocation;
-import org.onosproject.net.host.HostLocationProbingService.ProbeMode;
import org.onosproject.net.provider.ProviderService;
/**
@@ -54,6 +54,16 @@
void removeIpFromHost(HostId hostId, IpAddress ipAddress);
/**
+ * Notifies the core when a location is associated with a host.
+ *
+ * @param hostId id of the host
+ * @param location location of host that gets discovered
+ */
+ default void addLocationToHost(HostId hostId, HostLocation location) {
+ throw new NotImplementedException("addLocationToHost is not implemented");
+ }
+
+ /**
* Notifies the core when a location is no longer associated with a host.
*
* @param hostId id of the host
@@ -69,7 +79,9 @@
* @param connectPoint the connect point that is under verification
* @param probeMode probe mode
* @return probeMac, the source MAC address ONOS uses to probe the host
+ * @deprecated in ONOS 1.12, replaced by {@link HostProbingProviderService}
*/
+ @Deprecated
default MacAddress addPendingHostLocation(HostId hostId, ConnectPoint connectPoint, ProbeMode probeMode) {
return MacAddress.NONE;
}
@@ -78,6 +90,8 @@
* Notifies HostProviderService the end of pending host location verification.
*
* @param probeMac the source MAC address ONOS uses to probe the host
+ * @deprecated in ONOS 1.12, replaced by {@link HostProbingProviderService}
*/
+ @Deprecated
default void removePendingHostLocation(MacAddress probeMac) {}
}