Refactored driver to use new FlowRule api.

Deprecated transition with table types and added api for transition with table ids.

Change-Id: Ifcf2d87d16810666d992e4d9f5ddca3d0da460be
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
index 30711ad..3ba155f 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
@@ -36,7 +36,6 @@
 import org.onosproject.net.flow.instructions.L3ModificationInstruction;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPInstruction;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPv6FlowLabelInstruction;
-import org.onosproject.openflow.controller.OpenFlowSwitch;
 import org.projectfloodlight.openflow.protocol.OFFactory;
 import org.projectfloodlight.openflow.protocol.OFFlowAdd;
 import org.projectfloodlight.openflow.protocol.OFFlowDelete;
@@ -238,38 +237,10 @@
 
     private OFInstruction buildTableGoto(Instructions.TableTypeTransition i) {
         OFInstruction instruction = factory().instructions().gotoTable(
-                TableId.of(getTableType(i.tableType()).ordinal()));
+                TableId.of(i.tableId()));
         return instruction;
     }
 
-    // FIXME: this has to go as well perhaps when we implement the SelectorService.
-    private OpenFlowSwitch.TableType getTableType(FlowRule.Type type) {
-        switch (type) {
-
-            case DEFAULT:
-                return OpenFlowSwitch.TableType.NONE;
-            case IP:
-                return OpenFlowSwitch.TableType.IP;
-            case MPLS:
-                return OpenFlowSwitch.TableType.MPLS;
-            case ACL:
-                return OpenFlowSwitch.TableType.ACL;
-            case VLAN_MPLS:
-                return OpenFlowSwitch.TableType.VLAN_MPLS;
-            case VLAN:
-                return OpenFlowSwitch.TableType.VLAN;
-            case ETHER:
-                return OpenFlowSwitch.TableType.ETHER;
-            case COS:
-                return OpenFlowSwitch.TableType.COS;
-            case FIRST:
-                return OpenFlowSwitch.TableType.FIRST;
-            default:
-                return OpenFlowSwitch.TableType.NONE;
-        }
-    }
-
-
     private OFAction buildL0Modification(Instruction i) {
         L0ModificationInstruction l0m = (L0ModificationInstruction) i;
         switch (l0m.subtype()) {