* Update the Flow Path REST API to call the appropriate methods
in class FlowManager.
* Replace ':' with '=" as a separator between
field name and field value in the toString() methods
of the data containers in floodlightcontroller/util/ .
diff --git a/src/main/java/net/floodlightcontroller/util/DataPath.java b/src/main/java/net/floodlightcontroller/util/DataPath.java
index 34fc1f2..ad6cdb8 100644
--- a/src/main/java/net/floodlightcontroller/util/DataPath.java
+++ b/src/main/java/net/floodlightcontroller/util/DataPath.java
@@ -76,18 +76,18 @@
* Convert the data path to a string.
*
* The string has the following form:
- * [src:01:01:01:01:01:01:01:01/1111 flowEntry:<entry1> flowEntry:<entry2> flowEntry:<entry3> dst:02:02:02:02:02:02:02:02/2222]
+ * [src=01:01:01:01:01:01:01:01/1111 flowEntry=<entry1> flowEntry=<entry2> flowEntry=<entry3> dst=02:02:02:02:02:02:02:02/2222]
*
* @return the data path as a string.
*/
@Override
public String toString() {
- String ret = "[src:" + this.srcPort.toString();
+ String ret = "[src=" + this.srcPort.toString();
for (FlowEntry fe : flowEntries) {
- ret += " flowEntry:" + fe.toString();
+ ret += " flowEntry=" + fe.toString();
}
- ret += " dst:" + this.dstPort.toString() + "]";
+ ret += " dst=" + this.dstPort.toString() + "]";
return ret;
}
diff --git a/src/main/java/net/floodlightcontroller/util/DataPathEndpoints.java b/src/main/java/net/floodlightcontroller/util/DataPathEndpoints.java
index 9dd7dbb..92cf2dd 100644
--- a/src/main/java/net/floodlightcontroller/util/DataPathEndpoints.java
+++ b/src/main/java/net/floodlightcontroller/util/DataPathEndpoints.java
@@ -67,14 +67,14 @@
* Convert the data path endpoints to a string.
*
* The string has the following form:
- * [src:01:01:01:01:01:01:01:01/1111 dst:02:02:02:02:02:02:02:02/2222]
+ * [src=01:01:01:01:01:01:01:01/1111 dst=02:02:02:02:02:02:02:02/2222]
*
* @return the data path endpoints as a string.
*/
@Override
public String toString() {
- String ret = "[src:" + this.srcPort.toString() +
- " dst:" + this.dstPort.toString() + "]";
+ String ret = "[src=" + this.srcPort.toString() +
+ " dst=" + this.dstPort.toString() + "]";
return ret;
}
}
diff --git a/src/main/java/net/floodlightcontroller/util/FlowEntry.java b/src/main/java/net/floodlightcontroller/util/FlowEntry.java
index d45d87f..42ec935 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowEntry.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowEntry.java
@@ -219,22 +219,22 @@
* Convert the flow entry to a string.
*
* The string has the following form:
- * [flowEntryId:XXX flowEntryMatch:XXX flowEntryActions:XXX dpid:XXX
- * inPort:XXX outPort:XXX flowEntryUserState:XXX flowEntrySwitchState:XXX
- * flowEntryErrorState:XXX]
+ * [flowEntryId=XXX flowEntryMatch=XXX flowEntryActions=XXX dpid=XXX
+ * inPort=XXX outPort=XXX flowEntryUserState=XXX flowEntrySwitchState=XXX
+ * flowEntryErrorState=XXX]
* @return the flow entry as a string.
*/
@Override
public String toString() {
- String ret = "[flowEntryId:" + this.flowEntryId.toString();
- ret += " flowEntryMatch:" + this.flowEntryMatch.toString();
- ret += " flowEntryActions:" + this.flowEntryActions.toString();
- ret += " dpid:" + this.dpid.toString();
- ret += " inPort:" + this.inPort.toString();
- ret += " outPort:" + this.outPort.toString();
- ret += " flowEntryUserState:" + this.flowEntryUserState;
- ret += " flowEntrySwitchState:" + this.flowEntrySwitchState;
- ret += " flowEntryErrorState:" + this.flowEntryErrorState.toString();
+ String ret = "[flowEntryId=" + this.flowEntryId.toString();
+ ret += " flowEntryMatch=" + this.flowEntryMatch.toString();
+ ret += " flowEntryActions=" + this.flowEntryActions.toString();
+ ret += " dpid=" + this.dpid.toString();
+ ret += " inPort=" + this.inPort.toString();
+ ret += " outPort=" + this.outPort.toString();
+ ret += " flowEntryUserState=" + this.flowEntryUserState;
+ ret += " flowEntrySwitchState=" + this.flowEntrySwitchState;
+ ret += " flowEntryErrorState=" + this.flowEntryErrorState.toString();
ret += "]";
return ret;
diff --git a/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java b/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
index 0dfae09..f9ca8ba 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
@@ -61,13 +61,13 @@
* Convert the error type and code to a string.
*
* The string has the following form:
- * [type:1 code:2]
+ * [type=1 code=2]
*
* @return the error type and code as a string.
*/
@Override
public String toString() {
- String ret = "[type:" + this.type + " code:" + code + "]";
+ String ret = "[type=" + this.type + " code=" + code + "]";
return ret;
}
}
diff --git a/src/main/java/net/floodlightcontroller/util/FlowEntryMatch.java b/src/main/java/net/floodlightcontroller/util/FlowEntryMatch.java
index ddc65d0..0e3775e 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowEntryMatch.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowEntryMatch.java
@@ -100,16 +100,16 @@
* Convert the matching filter to a string.
*
* The string has the following form:
- * [srcMac:XXX dstMac:XXX srcIPv4Net:XXX dstIPv4Net:XXX]
+ * [srcMac=XXX dstMac=XXX srcIPv4Net=XXX dstIPv4Net=XXX]
*
* @return the matching filter as a string.
*/
@Override
public String toString() {
- String ret = "[srcMac: " + this.srcMac.toString();
- ret += " dstMac:" + this.dstMac.toString();
- ret += " srcIPv4Net:" + this.srcIPv4Net.toString();
- ret += " dstIPv4Net:" + this.dstIPv4Net.toString();
+ String ret = "[srcMac=" + this.srcMac.toString();
+ ret += " dstMac=" + this.dstMac.toString();
+ ret += " srcIPv4Net=" + this.srcIPv4Net.toString();
+ ret += " dstIPv4Net=" + this.dstIPv4Net.toString();
ret += "]";
return ret;
}
diff --git a/src/main/java/net/floodlightcontroller/util/FlowPath.java b/src/main/java/net/floodlightcontroller/util/FlowPath.java
index b67fabe..f91bb4a 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowPath.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowPath.java
@@ -24,6 +24,13 @@
}
/**
+ * Constructor from a string.
+ */
+ public FlowPath(String str) {
+ // TODO: Implement it.
+ }
+
+ /**
* Get the flow path Flow ID.
*
* @return the flow path Flow ID.
@@ -74,13 +81,17 @@
/**
* Convert the flow path to a string.
*
+ * The string has the following form:
+ * [flowId=XXX installerId=XXX dataPath=XXX]
+ *
* @return the flow path as a string.
*/
@Override
public String toString() {
- String ret = "[flowId:" + this.flowId.toString();
- ret += " installerId:" + this.installerId.toString();
- ret += " dataPath:" + this.dataPath.toString();
+ String ret = "[flowId=" + this.flowId.toString();
+ ret += " installerId=" + this.installerId.toString();
+ ret += " dataPath=" + this.dataPath.toString();
+ ret += "]";
return ret;
}
}