ONOS-631 #Initial MPLS intent implementation
Change-Id: I6f906b953f06f395cc67e612648802e333c0e581
diff --git a/core/api/src/test/java/org/onosproject/net/flow/DefaultTrafficSelectorTest.java b/core/api/src/test/java/org/onosproject/net/flow/DefaultTrafficSelectorTest.java
index 68c15ff..81e0d51 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/DefaultTrafficSelectorTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/DefaultTrafficSelectorTest.java
@@ -28,6 +28,7 @@
import org.onlab.packet.Ip6Address;
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
+import org.onlab.packet.MplsLabel;
import org.onlab.packet.VlanId;
import com.google.common.testing.EqualsTester;
@@ -251,7 +252,7 @@
assertThat(selector, hasCriterionWithType(Type.IPV6_ND_TLL));
selector = DefaultTrafficSelector.builder()
- .matchMplsLabel(3).build();
+ .matchMplsLabel(MplsLabel.mplsLabel(3)).build();
assertThat(selector, hasCriterionWithType(Type.MPLS_LABEL));
selector = DefaultTrafficSelector.builder()
diff --git a/core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java b/core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java
index 42a7281..eb8d3b2 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java
@@ -20,6 +20,7 @@
import org.onlab.packet.IpPrefix;
import org.onlab.packet.Ip6Address;
import org.onlab.packet.MacAddress;
+import org.onlab.packet.MplsLabel;
import org.onlab.packet.VlanId;
import com.google.common.testing.EqualsTester;
@@ -186,8 +187,8 @@
Criterion matchTargetLlAddr2 =
Criteria.matchIPv6NDTargetLinkLayerAddress(llMac2);
- int mpls1 = 1;
- int mpls2 = 2;
+ MplsLabel mpls1 = MplsLabel.mplsLabel(1);
+ MplsLabel mpls2 = MplsLabel.mplsLabel(2);
Criterion matchMpls1 = Criteria.matchMplsLabel(mpls1);
Criterion sameAsMatchMpls1 = Criteria.matchMplsLabel(mpls1);
Criterion matchMpls2 = Criteria.matchMplsLabel(mpls2);
diff --git a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
index bfb8409..070cd50 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
@@ -19,6 +19,7 @@
import org.onosproject.net.PortNumber;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
+import org.onlab.packet.MplsLabel;
import org.onlab.packet.VlanId;
import com.google.common.testing.EqualsTester;
@@ -527,16 +528,16 @@
is(not(equalTo(modIPv6FlowLabelInstruction2.hashCode()))));
}
- private Instruction modMplsLabelInstruction1 = Instructions.modMplsLabel(1);
- private Instruction sameAsModMplsLabelInstruction1 = Instructions.modMplsLabel(1);
- private Instruction modMplsLabelInstruction2 = Instructions.modMplsLabel(2);
+ private Instruction modMplsLabelInstruction1 = Instructions.modMplsLabel(MplsLabel.mplsLabel(1));
+ private Instruction sameAsModMplsLabelInstruction1 = Instructions.modMplsLabel(MplsLabel.mplsLabel(1));
+ private Instruction modMplsLabelInstruction2 = Instructions.modMplsLabel(MplsLabel.mplsLabel(2));
/**
* Test the modMplsLabel method.
*/
@Test
public void testModMplsMethod() {
- final Instruction instruction = Instructions.modMplsLabel(33);
+ final Instruction instruction = Instructions.modMplsLabel(MplsLabel.mplsLabel(33));
final L2ModificationInstruction.ModMplsLabelInstruction modMplsLabelInstruction =
checkAndConvert(instruction,
Instruction.Type.L2MODIFICATION,