Adding a component config to take down single homed host ports when all uplinks are lost.
In addition:
- handle port updates that may be lost if mastership changes at same time
- fix javadoc in DeviceService
Change-Id: I032909e8ab9564cf9c978b1d66abd3ab32c814d7
diff --git a/core/api/src/main/java/org/onosproject/net/device/DeviceService.java b/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
index f86a98a..86d9025 100644
--- a/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
+++ b/core/api/src/main/java/org/onosproject/net/device/DeviceService.java
@@ -187,11 +187,11 @@
/**
- * Indicates how long ago the device connected or disconnected from this
- * controller instance as a time offset.
+ * Indicates the time at which the given device connected or disconnected
+ * from this controller instance.
*
* @param deviceId device identifier
- * @return time offset in miliseconds
+ * @return time offset in miliseconds from Epoch
*/
long getLastUpdatedInstant(DeviceId deviceId);
diff --git a/core/api/src/main/java/org/onosproject/net/intf/InterfaceService.java b/core/api/src/main/java/org/onosproject/net/intf/InterfaceService.java
index 00adb78..b7f5ea8 100644
--- a/core/api/src/main/java/org/onosproject/net/intf/InterfaceService.java
+++ b/core/api/src/main/java/org/onosproject/net/intf/InterfaceService.java
@@ -127,4 +127,13 @@
default VlanId getNativeVlanId(ConnectPoint connectPoint) {
return null;
}
+
+ /**
+ * Returns true if given connectPoint has an IP address or vlan configured
+ * on any of its interfaces.
+ *
+ * @param connectPoint the port on a device
+ * @return true if connectpoint has a configured interface
+ */
+ boolean isConfigured(ConnectPoint connectPoint);
}