* Add missing @Override annotations
* Update Javadoc comments.
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
index b569076..1b45423 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
@@ -1290,6 +1290,7 @@
* @param src_port the source port.
* @param dest_port the destination port.
*/
+ @Override
public void createFlow(IPortObject src_port, IPortObject dest_port) {
// TODO: We don't need it for now.
}
@@ -1303,6 +1304,7 @@
* @param dest_port the destination port to match.
* @return all flows matching the source and the destination port.
*/
+ @Override
public Iterable<FlowPath> getFlows(IPortObject src_port,
IPortObject dest_port) {
// TODO: Pankaj might be implementing it later.
@@ -1317,6 +1319,7 @@
* @param port the port to match.
* @return the list of flows that are going out from the port.
*/
+ @Override
public Iterable<FlowPath> getFlows(IPortObject port) {
// TODO: We need it now: Pankaj
return null;
@@ -1330,6 +1333,7 @@
*
* @param src_port the port that has become inactive.
*/
+ @Override
public void reconcileFlows(IPortObject src_port) {
// TODO: We need it now: Pavlin
@@ -1344,6 +1348,7 @@
* @param src_port the source port.
* @param dest_port the destination port.
*/
+ @Override
public void reconcileFlow(IPortObject src_port, IPortObject dest_port) {
// TODO: We don't need it for now.
}
@@ -1360,6 +1365,7 @@
* Installer ID, and any additional matching conditions for the
* flow entries (e.g., source or destination MAC address, etc).
*/
+ @Override
public FlowPath computeFlowPath(IPortObject src_port,
IPortObject dest_port) {
//
@@ -1422,6 +1428,7 @@
* @param flow the flow whose flow entries should be returned.
* @return the flow entries of the flow.
*/
+ @Override
public Iterable<FlowEntry> getFlowEntries(FlowPath flow) {
return flow.dataPath().flowEntries();
}
@@ -1434,6 +1441,7 @@
* @param flowEntry the flow entry to install.
* @return true on success, otherwise false.
*/
+ @Override
public boolean installFlowEntry(Map<Long, IOFSwitch> mySwitches,
FlowEntry flowEntry) {
IOFSwitch mySwitch = mySwitches.get(flowEntry.dpid().value());
@@ -1557,18 +1565,19 @@
/**
* Remove a Flow Entry from a switch.
*
- * TODO: We need it now: Pavlin
- * - Remove only for local switches
- * - It will call the removeRemoteFlowEntry() for remote switches.
- * - To be called by reconcileFlow()
- *
- * @param entry the flow entry to remove.
+ * @param mySwitches the DPID-to-Switch mapping for the switches
+ * controlled by this controller.
+ * @param flowEntry the flow entry to remove.
+ * @return true on success, otherwise false.
*/
- public void removeFlowEntry(FlowEntry entry) {
- // TODO: We need it now: Pavlin
- // - Remove only for local switches
- // - It will call the removeRemoteFlowEntry() for remote switches.
- // - To be called by reconcileFlow()
+ @Override
+ public boolean removeFlowEntry(Map<Long, IOFSwitch> mySwitches,
+ FlowEntry flowEntry) {
+ //
+ // The installFlowEntry() method implements both installation
+ // and removal of flow entries.
+ //
+ return (installFlowEntry(mySwitches, flowEntry));
}
/**
@@ -1578,10 +1587,11 @@
* - For now it will make a REST call to the remote controller.
* - Internally, it needs to know the name of the remote controller.
*
- * @param entry the flow entry to install.
+ * @param flowEntry the flow entry to install.
* @return true on success, otherwise false.
*/
- public boolean installRemoteFlowEntry(FlowEntry entry) {
+ @Override
+ public boolean installRemoteFlowEntry(FlowEntry flowEntry) {
// TODO: We need it now: Jono
// - For now it will make a REST call to the remote controller.
// - Internally, it needs to know the name of the remote controller.
@@ -1591,15 +1601,15 @@
/**
* Remove a flow entry on a remote controller.
*
- * TODO: We need it now: Jono
- * - For now it will make a REST call to the remote controller.
- * - Internally, it needs to know the name of the remote controller.
- *
- * @param entry the flow entry to remove.
+ * @param flowEntry the flow entry to remove.
+ * @return true on success, otherwise false.
*/
- public void removeRemoteFlowEntry(FlowEntry entry) {
- // TODO: We need it now: Jono
- // - For now it will make a REST call to the remote controller.
- // - Internally, it needs to know the name of the remote controller.
+ @Override
+ public boolean removeRemoteFlowEntry(FlowEntry flowEntry) {
+ //
+ // The installRemoteFlowEntry() method implements both installation
+ // and removal of flow entries.
+ //
+ return (installRemoteFlowEntry(flowEntry));
}
}
diff --git a/src/main/java/net/onrc/onos/flow/IFlowManager.java b/src/main/java/net/onrc/onos/flow/IFlowManager.java
index f2f9d49..d7ac371 100644
--- a/src/main/java/net/onrc/onos/flow/IFlowManager.java
+++ b/src/main/java/net/onrc/onos/flow/IFlowManager.java
@@ -63,12 +63,14 @@
/**
* Compute the shortest path between a source and a destination ports.
*
- * TODO: We need it now: Pavlin
- *
* @param src_port the source port.
* @param dest_port the destination port.
* @return the computed shortest path between the source and the
- * destination ports.
+ * destination ports. The flow entries in the path itself would
+ * contain the incoming port matching and the outgoing port output
+ * actions set. However, the path itself will NOT have the Flow ID,
+ * Installer ID, and any additional matching conditions for the
+ * flow entries (e.g., source or destination MAC address, etc).
*/
public FlowPath computeFlowPath(IPortObject src_port,
IPortObject dest_port);
@@ -76,8 +78,6 @@
/**
* Get all Flow Entries of a Flow.
*
- * TODO: We need it now: Pavlin
- *
* @param flow the flow whose flow entries should be returned.
* @return the flow entries of the flow.
*/
@@ -86,11 +86,6 @@
/**
* Install a Flow Entry on a switch.
*
- * TODO: We need it now: Pavlin
- * - Install only for local switches
- * - It will call the installRemoteFlowEntry() for remote switches.
- * - To be called by reconcileFlow()
- *
* @param mySwitches the DPID-to-Switch mapping for the switches
* controlled by this controller.
* @param flowEntry the flow entry to install.
@@ -102,14 +97,13 @@
/**
* Remove a Flow Entry from a switch.
*
- * TODO: We need it now: Pavlin
- * - Remove only for local switches
- * - It will call the removeRemoteFlowEntry() for remote switches.
- * - To be called by reconcileFlow()
- *
- * @param entry the flow entry to remove.
+ * @param mySwitches the DPID-to-Switch mapping for the switches
+ * controlled by this controller.
+ * @param flowEntry the flow entry to remove.
+ * @return true on success, otherwise false.
*/
- public void removeFlowEntry(FlowEntry entry);
+ public boolean removeFlowEntry(Map<Long, IOFSwitch> mySwitches,
+ FlowEntry flowEntry);
/**
* Install a Flow Entry on a remote controller.
@@ -118,19 +112,16 @@
* - For now it will make a REST call to the remote controller.
* - Internally, it needs to know the name of the remote controller.
*
- * @param entry the flow entry to install.
+ * @param flowEntry the flow entry to install.
* @return true on success, otherwise false.
*/
- public boolean installRemoteFlowEntry(FlowEntry entry);
+ public boolean installRemoteFlowEntry(FlowEntry flowEntry);
/**
* Remove a flow entry on a remote controller.
*
- * TODO: We need it now: Jono
- * - For now it will make a REST call to the remote controller.
- * - Internally, it needs to know the name of the remote controller.
- *
- * @param entry the flow entry to remove.
+ * @param flowEntry the flow entry to remove.
+ * @return true on success, otherwise false.
*/
- public void removeRemoteFlowEntry(FlowEntry entry);
+ public boolean removeRemoteFlowEntry(FlowEntry flowEntry);
}