-some fixes
-Now instead of tableId CLI show table name (acl,ip,mpls) in 'show switch <dpid> table <tableType>' command
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
index 1ce945b..5619702 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
@@ -6,6 +6,7 @@
import java.util.Set;
import net.floodlightcontroller.core.web.OFFlowStatsEntryMod;
+import net.onrc.onos.core.drivermanager.OFSwitchImplSpringOpenTTP;
import net.onrc.onos.core.packet.IPv4;
import org.projectfloodlight.openflow.protocol.action.*;
@@ -36,6 +37,7 @@
JsonGenerationException {
OFFlowStatsEntry flowStatsEntry = FlowStatsEntryMod.getFlowStatsEntry();
OFOxmList matches = ((OFMatchV3)flowStatsEntry.getMatch()).getOxmList();
+ OFSwitchImplSpringOpenTTP sw = (OFSwitchImplSpringOpenTTP)FlowStatsEntryMod.getSwitch();
List<OFInstruction> instructions = flowStatsEntry.getInstructions();
jGen.writeStartObject();
@@ -121,8 +123,22 @@
jGen.writeFieldName(instruction.getType().name());
jGen.writeStartObject();
- jGen.writeNumberField("tableId"
- , ((OFInstructionGotoTable)instruction).getTableId().getValue());
+ if(((OFInstructionGotoTable)instruction).getTableId().getValue()==
+ sw.getTableId("ip").getValue()){
+ jGen.writeStringField("tableId", "ip");
+ }
+ else if(((OFInstructionGotoTable)instruction).getTableId().getValue()==
+ sw.getTableId("mpls").getValue()){
+ jGen.writeStringField("tableId", "mpls");
+ }
+ else if(((OFInstructionGotoTable)instruction).getTableId().getValue()==
+ sw.getTableId("acl").getValue()){
+ jGen.writeStringField("tableId", "acl");
+ }
+ else{
+ jGen.writeNumberField("tableId"
+ , ((OFInstructionGotoTable)instruction).getTableId().getValue());
+ }
jGen.writeEndObject();
continue;
}//*/