Skip to content
Snippets Groups Projects
Commit dc40901e authored by Ryan Izard's avatar Ryan Izard
Browse files

Fixed issue where multipart flow replies would only show the last part/reply...

Fixed issue where multipart flow replies would only show the last part/reply and not print the others. Only a REST API issue. This will also fix the Web UI where people reported not seeing all their flows.
parent e66a43f2
No related branches found
No related tags found
No related merge requests found
......@@ -745,12 +745,11 @@ public class StatsReplySerializer extends JsonSerializer<StatsReply> {
}
public static void serializeFlowReply(List<OFFlowStatsReply> flowReplies, JsonGenerator jGen) throws IOException, JsonProcessingException{
/* start the array before each reply */
jGen.writeFieldName("flows");
jGen.writeStartArray();
for (OFFlowStatsReply flowReply : flowReplies) { // for each flow stats reply
//Dose the switch will reply multiple OFFlowStatsReply ?
//Or we juse need to use the first item of the list.
List<OFFlowStatsEntry> entries = flowReply.getEntries();
jGen.writeFieldName("flows");
jGen.writeStartArray();
for (OFFlowStatsEntry entry : entries) { // for each flow
jGen.writeStartObject();
// list flow stats/info
......@@ -796,9 +795,10 @@ public class StatsReplySerializer extends JsonSerializer<StatsReply> {
}
jGen.writeEndObject();
} // end for each OFFlowStatsReply entry
jGen.writeEndArray();
} // end for each OFFlowStatsReply entry */
} // end for each OFStatsReply
//jGen.writeEndObject();
jGen.writeEndArray();
} // end method
public static void serializeDescReply(List<OFDescStatsReply> descReplies, JsonGenerator jGen) throws IOException, JsonProcessingException{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment