Repository: telstra/open-kilda
Issue: GET Switch Rules is not showing proper rule information in the 'instructiion -> none' field 

**Step to reproduce:**

1. get switch rules via NB `GET /v1/switches/{switch-id}/rules`
2. get switch rules via FL http://127.0.0.1:8081/wm/core/switch/00:00:00:00:00:00:00:02/flow/json
3. compare rules from item 1 against item 2;

**Actual result**
FL:
```
instructions: {
none: "drop"
}
```
NB:
```
"instructions": {
   "apply_actions": null,
   "none": null,
   "instruction_goto_meter": null,
   "instruction_goto_table": null
},
```

**Expected result:**
The `none` field should be the same

Changed files:
src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/converter/OfFlowStatsMapper.java
src-java/floodlight-service/floodlight-modules/src/test/java/org/openkilda/floodlight/converter/OfFlowStatsMapperTest.java

diff --git a/src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/converter/OfFlowStatsMapper.java b/src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/converter/OfFlowStatsMapper.java
index ea6160a10..ab3caf116 100644
--- a/src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/converter/OfFlowStatsMapper.java
+++ b/src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/converter/OfFlowStatsMapper.java
@@ -32,6 +32,7 @@ import org.openkilda.messaging.info.stats.FlowStatsEntry;
 import org.openkilda.model.SwitchId;
 
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.mapstruct.Mapper;
 import org.mapstruct.factory.Mappers;
 import org.projectfloodlight.openflow.protocol.OFBucket;
@@ -78,6 +79,8 @@ public abstract class OfFlowStatsMapper {
      */
     private static final int VLAN_MASK = 0xFFF;
 
+    private static final String DROP = "drop";
+
     /**
      * Convert {@link OFFlowStatsEntry} to format that kilda supports {@link FlowEntry}.
      * @param entry flow stats to be converted.
@@ -175,16 +178,20 @@ public abstract class OfFlowStatsMapper {
     public FlowInstructions toFlowInstructions(final List<OFInstruction> instructions) {
         FlowInstructions.FlowInstructionsBuilder flowInstructions = FlowInstructions.builder();
 
-        for (OFInstruction entry : instructions) {
-            if (entry instanceof OFInstructionApplyActions) {
-                List<OFAction> actions = ((OFInstructionApplyActions) entry).getActions();
-                flowInstructions.applyActions(toFlowApplyActions(actions));
-            } else if (entry instanceof OFInstructionMeter) {
-                flowInstructions.goToMeter(((OFInstructionMeter) entry).getMeterId());
-            } else if (entry instanceof OFInstructionGotoTable) {
-                flowInstructions.goToTable(((OFInstructionGotoTable) entry).getTableId().getValue());
+        if (CollectionUtils.isEmpty(instructions)) {
+            flowInstructions.none(DROP);
+        } else {
+            for (OFInstruction entry : instructions) {
+                if (entry instanceof OFInstructionApplyActions) {
+                    List<OFAction> actions = ((OFInstructionApplyActions) entry).getActions();
+                    flowInstructions.applyActions(toFlowApplyActions(actions));
+                } else if (entry instanceof OFInstructionMeter) {
+                    flowInstructions.goToMeter(((OFInstructionMeter) entry).getMeterId());
+                } else if (entry instanceof OFInstructionGotoTable) {
+                    flowInstructions.goToTable(((OFInstructionGotoTable) entry).getTableId().getValue());
+                }
+                // add handling for other instructions here
             }
-            // add handling for other instructions here
         }
 
         return flowInstructions.build();
diff --git a/src-java/floodlight-service/floodlight-modules/src/test/java/org/openkilda/floodlight/converter/OfFlowStatsMapperTest.java b/src-java/floodlight-service/floodlight-modules/src/test/java/org/openkilda/floodlight/converter/OfFlowStatsMapperTest.java
index 36b3096be..7352d4b52 100644
--- a/src-java/floodlight-service/floodlight-modules/src/test/java/org/openkilda/floodlight/converter/OfFlowStatsMapperTest.java
+++ b/src-java/floodlight-service/floodlight-modules/src/test/java/org/openkilda/floodlight/converter/OfFlowStatsMapperTest.java
@@ -89,6 +89,7 @@ public class OfFlowStatsMapperTest {
     public static final TableId goToTable = TableId.of(24);
     private static final String MAC_ADDRESS_1 = "01:01:01:01:01:01";
     private static final String MAC_ADDRESS_2 = "02:02:02:02:02:02";
+    private static final String NONE_DROP = "drop";
 
     @Test
     public void testToFlowStatsData() {
@@ -135,29 +136,32 @@ public class OfFlowStatsMapperTest {
         assertEquals(udpSrc.toString(), entry.getMatch().getUdpSrc());
         assertEquals(udpDst.toString(), entry.getMatch().getUdpDst());
 
-        FlowSetFieldAction flowSetEthSrcAction = new FlowSetFieldAction("eth_src", MAC_ADDRESS_1);
-        FlowSetFieldAction flowSetEthDstAction = new FlowSetFieldAction("eth_dst", MAC_ADDRESS_2);
-        FlowCopyFieldAction flowCopyFieldAction = FlowCopyFieldAction.builder()
-                .bits(String.valueOf(bits))
-                .srcOffset(String.valueOf(srcOffset))
-                .dstOffset(String.valueOf(dstOffset))
-                .srcOxm(String.valueOf(oxmSrcHeader))
-                .dstOxm(String.valueOf(oxmDstHeader))
-                .build();
-        FlowSwapFieldAction flowSwapFieldAction = FlowSwapFieldAction.builder()
-                .bits(String.valueOf(bits))
-                .srcOffset(String.valueOf(srcOffset))
-                .dstOffset(String.valueOf(dstOffset))
-                .srcOxm(String.valueOf(oxmSrcHeader))
-                .dstOxm(String.valueOf(oxmDstHeader))
-                .build();
-        FlowApplyActions applyActions = new FlowApplyActions(port.toString(),
-                Lists.newArrayList(flowSetEthSrcAction, flowSetEthDstAction), ethType.toString(), null, null, null,
-                group.toString(), flowCopyFieldAction, flowSwapFieldAction);
+
+        FlowApplyActions applyActions = buildFlowApplyActions();
         FlowInstructions instructions = new FlowInstructions(applyActions, null, meterId, goToTable.getValue());
         assertEquals(instructions, entry.getInstructions());
     }
 
+    @Test
+    public void toFlowNoneEmptyInstructions() {
+        FlowApplyActions applyActions = buildFlowApplyActions();
+        FlowInstructions expectedNoneEmptyFlowInstructions = new FlowInstructions(applyActions,
+                null, meterId, goToTable.getValue());
+        FlowInstructions actualNoneEmptyFlowInstructions
+                = OfFlowStatsMapper.INSTANCE.toFlowInstructions(buildInstruction());
+
+        assertEquals(expectedNoneEmptyFlowInstructions, actualNoneEmptyFlowInstructions);
+    }
+
+    @Test
+    public void toFlowEmptyInstructions() {
+        FlowInstructions expectedEmptyFlowInstructions = FlowInstructions.builder().none(NONE_DROP).build();
+        List<OFInstruction> emptyInstructions = Collections.emptyList();
+        FlowInstructions actualEmptyInstructions = OfFlowStatsMapper.INSTANCE.toFlowInstructions(emptyInstructions);
+
+        assertEquals(expectedEmptyFlowInstructions, actualEmptyInstructions);
+    }
+
     @Test
     public void testFlowGroupEntry() {
         OFGroupDescStatsEntry entry = buildFlowGroupEntry();
@@ -175,6 +179,30 @@ public class OfFlowStatsMapperTest {
 
     }
 
+    private FlowApplyActions buildFlowApplyActions() {
+        FlowSetFieldAction flowSetEthSrcAction = new FlowSetFieldAction("eth_src", MAC_ADDRESS_1);
+        FlowSetFieldAction flowSetEthDstAction = new FlowSetFieldAction("eth_dst", MAC_ADDRESS_2);
+        FlowCopyFieldAction flowCopyFieldAction = FlowCopyFieldAction.builder()
+                .bits(String.valueOf(bits))
+                .srcOffset(String.valueOf(srcOffset))
+                .dstOffset(String.valueOf(dstOffset))
+                .srcOxm(String.valueOf(oxmSrcHeader))
+                .dstOxm(String.valueOf(oxmDstHeader))
+                .build();
+        FlowSwapFieldAction flowSwapFieldAction = FlowSwapFieldAction.builder()
+                .bits(String.valueOf(bits))
+                .srcOffset(String.valueOf(srcOffset))
+                .dstOffset(String.valueOf(dstOffset))
+                .srcOxm(String.valueOf(oxmSrcHeader))
+                .dstOxm(String.valueOf(oxmDstHeader))
+                .build();
+
+        return new FlowApplyActions(port.toString(),
+                Lists.newArrayList(flowSetEthSrcAction, flowSetEthDstAction),
+                ethType.toString(), null, null, null,
+                group.toString(), flowCopyFieldAction, flowSwapFieldAction);
+    }
+
     private OFGroupDescStatsEntry buildFlowGroupEntry() {
         return factory.buildGroupDescStatsEntry()
                 .setGroup(OFGroup.of(22))