Remove methods deprecated in Drake from Instructions API
Change-Id: I87a20cb9e8abbf4b27bbb4760a62947169866ea6
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
index 4878c17..fbb8c57 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
@@ -257,8 +257,8 @@
+ " is not supported");
}
return Instructions.createOutput(portNumber);
- } else if (type.equals(Instruction.Type.DROP.name())) {
- return Instructions.createDrop();
+ } else if (type.equals(Instruction.Type.NOACTION.name())) {
+ return Instructions.createNoAction();
} else if (type.equals(Instruction.Type.L0MODIFICATION.name())) {
return decodeL0();
} else if (type.equals(Instruction.Type.L1MODIFICATION.name())) {
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/InstructionCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/InstructionCodecTest.java
index 8d45f4c..1b7a501 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/InstructionCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/InstructionCodecTest.java
@@ -73,18 +73,6 @@
}
/**
- * Tests the encoding of drop instructions.
- */
- @Test
- public void dropInstructionTest() {
- final Instructions.DropInstruction instruction =
- Instructions.createDrop();
- final ObjectNode instructionJson =
- instructionCodec.encode(instruction, context);
- assertThat(instructionJson, matchesInstruction(instruction));
- }
-
- /**
* Tests the encoding of output instructions.
*/
@Test
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java b/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
index 3f65e8c..9c0a318 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
@@ -20,7 +20,6 @@
import org.onlab.util.HexString;
import org.onosproject.net.OduSignalId;
import org.onosproject.net.flow.instructions.Instruction;
-import org.onosproject.net.flow.instructions.Instructions.DropInstruction;
import org.onosproject.net.flow.instructions.Instructions.NoActionInstruction;
import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
import org.onosproject.net.flow.instructions.L0ModificationInstruction.ModLambdaInstruction;
@@ -452,8 +451,6 @@
if (instruction instanceof PushHeaderInstructions) {
return matchPushHeaderInstruction(jsonInstruction, description);
- } else if (instruction instanceof DropInstruction) {
- return true;
} else if (instruction instanceof OutputInstruction) {
return matchOutputInstruction(jsonInstruction, description);
} else if (instruction instanceof ModLambdaInstruction) {
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/FilteringObjective.json b/core/common/src/test/resources/org/onosproject/codec/impl/FilteringObjective.json
index 228e7b0..414e3d6 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/FilteringObjective.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/FilteringObjective.json
@@ -17,9 +17,9 @@
"port": -3
},
{
- "type": "DROP"
+ "type": "NOACTION"
}
],
"deferred": []
}
-}
\ No newline at end of file
+}
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/ForwardingObjective.json b/core/common/src/test/resources/org/onosproject/codec/impl/ForwardingObjective.json
index f3f53d4..e979626 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/ForwardingObjective.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/ForwardingObjective.json
@@ -17,8 +17,8 @@
"instructions":
[
{"type":"OUTPUT","port":-3},
- {"type":"DROP"}
+ {"type":"NOACTION"}
],
"deferred":[]
}
-}
\ No newline at end of file
+}
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/NextObjective.json b/core/common/src/test/resources/org/onosproject/codec/impl/NextObjective.json
index dad9b03..6f52f11 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/NextObjective.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/NextObjective.json
@@ -10,7 +10,7 @@
"port": -3
},
{
- "type": "DROP"
+ "type": "NOACTION"
}
],
"deferred": []
@@ -24,4 +24,4 @@
}
]
}
-}
\ No newline at end of file
+}
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
index 2a184b3..fb3c03b 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
@@ -8,7 +8,7 @@
"instructions":
[
{"type":"OUTPUT","port":-3},
- {"type":"DROP"},
+ {"type":"NOACTION"},
{"type":"L2MODIFICATION","subtype":"ETH_SRC","mac":"12:34:56:78:90:12"},
{"type":"L2MODIFICATION","subtype":"ETH_DST","mac":"98:76:54:32:01:00"},
{"type":"L2MODIFICATION","subtype":"VLAN_ID","vlanId":22},