ONOS-3633 - Adding intent event listener to PointToPointIntent virtual network
provider. Intent events will either set the virtual link state to ACTIVE or
INACTIVE.
Change-Id: I34b65b2bfff29b791e7b2eb4d7cefb2ec4e88672
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
index e08f9fc..7bafeda 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
@@ -42,7 +42,7 @@
HostLocation hostLocation, boolean isIngress,
Annotations... annotations) {
super(providerId, isIngress ? hostPoint : hostLocation,
- isIngress ? hostLocation : hostPoint, Type.EDGE, annotations);
+ isIngress ? hostLocation : hostPoint, Type.EDGE, State.ACTIVE, annotations);
checkArgument(hostPoint.elementId() instanceof HostId,
"Host point does not refer to a host ID");
this.hostId = (HostId) hostPoint.elementId();
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultLink.java b/core/api/src/main/java/org/onosproject/net/DefaultLink.java
index 9aed9c9..628d785 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultLink.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultLink.java
@@ -36,17 +36,18 @@
private final boolean isExpected;
/**
- * Creates an active infrastructure link using the supplied information.
+ * Creates an infrastructure link using the supplied information.
*
* @param providerId provider identity
* @param src link source
* @param dst link destination
* @param type link type
+ * @param state link state
* @param annotations optional key/value annotations
*/
protected DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
- Type type, Annotations... annotations) {
- this(providerId, src, dst, type, ACTIVE, false, annotations);
+ Type type, State state, Annotations... annotations) {
+ this(providerId, src, dst, type, state, false, annotations);
}
/**
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultPath.java b/core/api/src/main/java/org/onosproject/net/DefaultPath.java
index 9f0480d..e4c3d8c 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultPath.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultPath.java
@@ -44,7 +44,7 @@
*/
public DefaultPath(ProviderId providerId, List<Link> links, double cost,
Annotations... annotations) {
- super(providerId, source(links), destination(links), Type.INDIRECT, annotations);
+ super(providerId, source(links), destination(links), Type.INDIRECT, State.ACTIVE, annotations);
this.links = ImmutableList.copyOf(links);
this.cost = cost;
}