Reworked intent states to the new set of states.
Separate intent state from intent event type.
Implemented new state transitions in IntentManager.
Implemented ObjectiveTracker.
Re-route now works.
diff --git a/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java b/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java
index 4c86bae..7b7c18a 100644
--- a/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java
+++ b/core/api/src/main/java/org/onlab/onos/net/intent/PointToPointIntent.java
@@ -14,27 +14,27 @@
*/
public class PointToPointIntent extends ConnectivityIntent {
- private final ConnectPoint ingressPort;
- private final ConnectPoint egressPort;
+ private final ConnectPoint ingressPoint;
+ private final ConnectPoint egressPoint;
/**
* Creates a new point-to-point intent with the supplied ingress/egress
* ports.
*
- * @param id intent identifier
- * @param selector traffic selector
- * @param treatment treatment
- * @param ingressPort ingress port
- * @param egressPort egress port
- * @throws NullPointerException if {@code ingressPort} or {@code egressPort} is null.
+ * @param id intent identifier
+ * @param selector traffic selector
+ * @param treatment treatment
+ * @param ingressPoint ingress port
+ * @param egressPoint egress port
+ * @throws NullPointerException if {@code ingressPoint} or {@code egressPoints} is null.
*/
public PointToPointIntent(IntentId id, TrafficSelector selector,
TrafficTreatment treatment,
- ConnectPoint ingressPort,
- ConnectPoint egressPort) {
+ ConnectPoint ingressPoint,
+ ConnectPoint egressPoint) {
super(id, selector, treatment);
- this.ingressPort = checkNotNull(ingressPort);
- this.egressPort = checkNotNull(egressPort);
+ this.ingressPoint = checkNotNull(ingressPoint);
+ this.egressPoint = checkNotNull(egressPoint);
}
/**
@@ -42,8 +42,8 @@
*/
protected PointToPointIntent() {
super();
- this.ingressPort = null;
- this.egressPort = null;
+ this.ingressPoint = null;
+ this.egressPoint = null;
}
/**
@@ -52,8 +52,8 @@
*
* @return ingress port
*/
- public ConnectPoint getIngressPort() {
- return ingressPort;
+ public ConnectPoint ingressPoint() {
+ return ingressPoint;
}
/**
@@ -61,8 +61,8 @@
*
* @return egress port
*/
- public ConnectPoint getEgressPort() {
- return egressPort;
+ public ConnectPoint egressPoint() {
+ return egressPoint;
}
@Override
@@ -78,23 +78,23 @@
}
PointToPointIntent that = (PointToPointIntent) o;
- return Objects.equals(this.ingressPort, that.ingressPort)
- && Objects.equals(this.egressPort, that.egressPort);
+ return Objects.equals(this.ingressPoint, that.ingressPoint)
+ && Objects.equals(this.egressPoint, that.egressPoint);
}
@Override
public int hashCode() {
- return Objects.hash(super.hashCode(), ingressPort, egressPort);
+ return Objects.hash(super.hashCode(), ingressPoint, egressPoint);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(getClass())
- .add("id", getId())
- .add("match", getTrafficSelector())
- .add("action", getTrafficTreatment())
- .add("ingressPort", ingressPort)
- .add("egressPort", egressPort)
+ .add("id", id())
+ .add("match", selector())
+ .add("action", treatment())
+ .add("ingressPoint", ingressPoint)
+ .add("egressPoints", egressPoint)
.toString();
}