Sketching out what link-state addition would look like; quite easy until we get to the distributed store.
Added unit tests to provide durable-nondurable transitions.
FIxed issue where link could be accidentally activated.
Renamed parameter.
Change-Id: I8aa19a6583ec50dbf28769995f0a8ea9be9a4daa
diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
index 95962e7..3af4f9f 100644
--- a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
+++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
@@ -95,6 +95,16 @@
LinkDescription linkDescription);
/**
+ * Removes the link, or marks it as inactive if the link is durable,
+ * based on the specified information.
+ *
+ * @param src link source
+ * @param dst link destination
+ * @return remove or update link event, or null if no change resulted
+ */
+ LinkEvent removeOrDownLink(ConnectPoint src, ConnectPoint dst);
+
+ /**
* Removes the link based on the specified information.
*
* @param src link source
@@ -103,4 +113,5 @@
*/
LinkEvent removeLink(ConnectPoint src, ConnectPoint dst);
+
}