Update compile method's interface for Flow objects.
- The compile method of Flow objects requires:
-- MatchActionIdGenerator
-- MatchActionOperationsIdGenerator
- This task is a preparation for ONOS-1741, ONOS-1841, ONOS-1690 and ONOS-1692.
Change-Id: Iaa6919c5accf943763ff0ad11f2d089912f08a0a
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/Flow.java b/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
index ae3cb7e..202511d 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/Flow.java
@@ -5,7 +5,9 @@
import java.util.List;
import net.onrc.onos.api.batchoperation.BatchOperationTarget;
+import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
import net.onrc.onos.core.matchaction.MatchActionOperations;
+import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
import net.onrc.onos.core.matchaction.match.Match;
/**
@@ -46,10 +48,19 @@
* This method is called by FlowManagerModule to create MatchAction
* operations.
*
- * @param op FlowBatchOperation.Operator to be used for compiling this object
- * @return a list of MatchActionOperations objects to realize this flow
+ * @param op {@link FlowBatchOperation}'s operator to be used for compiling
+ * this object
+ * @param maIdGenerator ID generator to be used for generating MatchAction
+ * objects.
+ * @param maoIdGenerator ID generator to be used for generating
+ * {@link MatchActionOperations} objects.
+ * @return a list of {@link MatchActionOperations} objects to realize this
+ * flow
*/
- public abstract List<MatchActionOperations> compile(FlowBatchOperation.Operator op);
+ public abstract List<MatchActionOperations> compile(
+ FlowBatchOperation.Operator op,
+ MatchActionIdGenerator maIdGenerator,
+ MatchActionOperationsIdGenerator maoIdGenerator);
/**
* Generates a hash code using the FlowId.
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 6b94472..46bf4e7 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/OpticalPathFlow.java
@@ -2,7 +2,10 @@
import java.util.List;
+import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator;
+import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
import net.onrc.onos.core.matchaction.MatchActionOperations;
+import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.matchaction.match.PacketMatchBuilder;
@@ -55,7 +58,9 @@
}
@Override
- public List<MatchActionOperations> compile(FlowBatchOperation.Operator op) {
+ public List<MatchActionOperations> compile(Operator op,
+ MatchActionIdGenerator maIdGenerator,
+ MatchActionOperationsIdGenerator maoIdGenerator) {
// TODO Auto-generated method stub
return null;
}
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
index b4364c6..ce1fdb4 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/PacketPathFlow.java
@@ -4,7 +4,10 @@
import java.util.List;
+import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator;
+import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
import net.onrc.onos.core.matchaction.MatchActionOperations;
+import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.util.PortNumber;
@@ -64,7 +67,9 @@
}
@Override
- public List<MatchActionOperations> compile(FlowBatchOperation.Operator op) {
+ public List<MatchActionOperations> compile(Operator op,
+ MatchActionIdGenerator maIdGenerator,
+ MatchActionOperationsIdGenerator maoIdGenerator) {
// TODO Auto-generated method stub
return null;
}
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
index 8ed1fb1..60be78f 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/SingleDstTreeFlow.java
@@ -6,7 +6,10 @@
import java.util.List;
import java.util.Set;
+import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator;
+import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
import net.onrc.onos.core.matchaction.MatchActionOperations;
+import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
import net.onrc.onos.core.matchaction.action.Action;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.util.SwitchPort;
@@ -86,7 +89,9 @@
}
@Override
- public List<MatchActionOperations> compile(FlowBatchOperation.Operator op) {
+ public List<MatchActionOperations> compile(Operator op,
+ MatchActionIdGenerator maIdGenerator,
+ MatchActionOperationsIdGenerator maoIdGenerator) {
// TODO Auto-generated method stub
return null;
}
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
index e7bbe05..5b26a04 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/SingleSrcTreeFlow.java
@@ -5,7 +5,10 @@
import java.util.List;
import java.util.Set;
+import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator;
+import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
import net.onrc.onos.core.matchaction.MatchActionOperations;
+import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
import net.onrc.onos.core.matchaction.action.OutputAction;
import net.onrc.onos.core.matchaction.match.PacketMatch;
import net.onrc.onos.core.util.Dpid;
@@ -79,7 +82,9 @@
}
@Override
- public List<MatchActionOperations> compile(FlowBatchOperation.Operator op) {
+ public List<MatchActionOperations> compile(Operator op,
+ MatchActionIdGenerator maIdGenerator,
+ MatchActionOperationsIdGenerator maoIdGenerator) {
// TODO Auto-generated method stub
return null;
}