Remove deprecated instructions() method in the traffic treatment class

Change-Id: I739b35bdcbf9867c639c7b6ca4006f3eeafbb055
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java
index 786c461..23dae38 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java
@@ -36,12 +36,17 @@
         final ObjectNode result = context.mapper().createObjectNode();
         final ArrayNode jsonInstructions = result.putArray("instructions");
 
-        if (treatment.instructions() != null) {
-            final JsonCodec<Instruction> instructionCodec =
-                    context.codec(Instruction.class);
-            for (final Instruction instruction : treatment.instructions()) {
-                jsonInstructions.add(instructionCodec.encode(instruction, context));
-            }
+        final JsonCodec<Instruction> instructionCodec =
+                context.codec(Instruction.class);
+
+        for (final Instruction instruction : treatment.immediate()) {
+            jsonInstructions.add(instructionCodec.encode(instruction, context));
+        }
+
+        final ArrayNode jsonDeferred = result.putArray("deferred");
+
+        for (final Instruction instruction : treatment.deferred()) {
+            jsonDeferred.add(instructionCodec.encode(instruction, context));
         }
 
         return result;