Update the Flow classes.
- Changed all Flow classes to use FlowId object on its constructor for their ID.
- Implement equals() and hashCode() for all Flow classes based on FlowId.
- Changed SingleDstTreeFlow class to accept the list of Action objects on its constructor.
- Updated the Tree class's constructor to accept the list of links.
- This task is a part of ONOS-1841, ONOS-1694, ONOS-1741.
Change-Id: I930007ce7f92b5bbde4efef9eb9ab893c356abf1
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
index 64b7e2e..4018a7c 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
@@ -4,6 +4,8 @@
import net.onrc.onos.core.matchaction.MatchActionOperations;
import net.onrc.onos.core.matchaction.action.Action;
+import net.onrc.onos.core.matchaction.match.PacketMatch;
+import net.onrc.onos.core.matchaction.match.PacketMatchBuilder;
import net.onrc.onos.core.util.PortNumber;
/**
@@ -11,30 +13,42 @@
* <p>
* TODO: Think this: How do we deal the optical path flow going through the
* regenerators? Can we express it with multiple OpticalPathFlow objects?
+ * <p>
+ * NOTE: This class is not fully supported for the August release.
*/
public class OpticalPathFlow extends PathFlow {
- protected int lambda;
+ private final int lambda;
/**
* Constructor.
*
- * @param id ID for this new Flow object.
- * @param inPort Ingress port number at the ingress edge node.
- * @param path Path between ingress and egress edge node.
- * @param actions The list of Action objects at the egress edge node.
- * @param lambda The lambda to be used throughout the path.
+ * @param id the ID for this new Flow object
+ * @param ingressPort the Ingress port number at the ingress edge node
+ * @param path the Path between ingress and egress edge node
+ * @param egressActions the list of Action objects at the egress edge node
+ * @param lambda the lambda to be used throughout the path
*/
- public OpticalPathFlow(String id,
- PortNumber inPort, Path path, List<Action> actions, int lambda) {
- super(id, null, inPort, path, actions);
+ public OpticalPathFlow(FlowId id,
+ PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) {
+ super(id, ingressPort, path, egressActions);
this.lambda = lambda;
- // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Gets traffic filter for this flow.
+ * <p>
+ * This method only returns wildcard match, because the ingress transponder
+ * port does not have filtering functionality.
+ */
+ @Override
+ public PacketMatch getMatch() {
+ return (new PacketMatchBuilder()).build();
}
/**
* Gets lambda which is used throughout the path.
*
- * @return lambda which is used throughout the path.
+ * @return lambda which is used throughout the path
*/
public int getLambda() {
return lambda;
@@ -43,6 +57,6 @@
@Override
public MatchActionOperations compile() {
// TODO Auto-generated method stub
- return super.compile();
+ return null;
}
}