Try to use ModMplsHeaderInstruction and ModVlanHeaderInstruction
Change-Id: I0b486907ef718a6dfa3e92696397fe5a7e851aed
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
index b0fbf5b..aaf37e2 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
@@ -333,7 +333,7 @@
* @return a L2 modification.
*/
public static Instruction pushMpls() {
- return new L2ModificationInstruction.PushHeaderInstructions(
+ return new L2ModificationInstruction.ModMplsHeaderInstruction(
L2ModificationInstruction.L2SubType.MPLS_PUSH,
EthType.EtherType.MPLS_UNICAST.ethType());
}
@@ -344,7 +344,7 @@
* @return a L2 modification.
*/
public static Instruction popMpls() {
- return new L2ModificationInstruction.PushHeaderInstructions(
+ return new L2ModificationInstruction.ModMplsHeaderInstruction(
L2ModificationInstruction.L2SubType.MPLS_POP,
EthType.EtherType.MPLS_UNICAST.ethType());
}
@@ -357,7 +357,7 @@
*/
public static Instruction popMpls(EthType etherType) {
checkNotNull(etherType, "Ethernet type cannot be null");
- return new L2ModificationInstruction.PushHeaderInstructions(
+ return new L2ModificationInstruction.ModMplsHeaderInstruction(
L2ModificationInstruction.L2SubType.MPLS_POP, etherType);
}
@@ -367,7 +367,7 @@
* @return a L2 modification
*/
public static Instruction popVlan() {
- return new L2ModificationInstruction.PopVlanInstruction(
+ return new L2ModificationInstruction.ModVlanHeaderInstruction(
L2ModificationInstruction.L2SubType.VLAN_POP);
}
@@ -377,7 +377,7 @@
* @return a L2 modification
*/
public static Instruction pushVlan() {
- return new L2ModificationInstruction.PushHeaderInstructions(
+ return new L2ModificationInstruction.ModVlanHeaderInstruction(
L2ModificationInstruction.L2SubType.VLAN_PUSH,
EthType.EtherType.VLAN.ethType());
}