BUG 2280 - mask check in laye3Match. 82/14482/3
authorJozef Gloncak <jgloncak@cisco.com>
Mon, 26 Jan 2015 13:04:42 +0000 (14:04 +0100)
committermichal rehak <mirehak@cisco.com>
Tue, 27 Jan 2015 13:38:28 +0000 (13:38 +0000)
Only commented part of testing code was uncommented.

Change-Id: I2eb90e91d5bf1eeb52b071c2bac9a063e6092ab8
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorImplV13Test.java

index b62ed381c0d2ead42aad0cdc698a9b34e4cbd1ad..98211f49b3b3c5ac9073dfdbbb1c261145839e97 100644 (file)
@@ -397,8 +397,7 @@ public class MatchConvertorImplV13Test {
         Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:02"), builtMatch.getEthernetMatch().getEthernetSource().getAddress());\r
         Assert.assertEquals("Wrong eth type", 3, builtMatch.getEthernetMatch().getEthernetType().getType().getValue().intValue());\r
         Assert.assertEquals("Wrong vlan id", 4, builtMatch.getVlanMatch().getVlanId().getVlanId().getValue().intValue());\r
-        // TODO - finish implementation by setting the vlanIdPresent flag\r
-//        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());\r
+        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());\r
         Assert.assertEquals("Wrong vlan pcp", 5, builtMatch.getVlanMatch().getVlanPcp().getValue().intValue());\r
         Assert.assertEquals("Wrong ip dscp", 6, builtMatch.getIpMatch().getIpDscp().getValue().intValue());\r
         Assert.assertEquals("Wrong ip ecn", 7, builtMatch.getIpMatch().getIpEcn().intValue());\r
@@ -534,12 +533,11 @@ public class MatchConvertorImplV13Test {
         Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:02"), builtMatch.getEthernetMatch().getEthernetSource().getAddress());\r
 //        Assert.assertEquals("Wrong eth src mask", new MacAddress("00:00:00:00:00:03"), builtMatch.getEthernetMatch().getEthernetSource().getMask());\r
         Assert.assertEquals("Wrong vlan id", 4, builtMatch.getVlanMatch().getVlanId().getVlanId().getValue().intValue());\r
-        // TODO - finish implementation by setting the vlanIdPresent flag\r
-//        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());\r
+        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());\r
         Ipv4Match ipv4Match = (Ipv4Match) builtMatch.getLayer3Match();\r
         Assert.assertEquals("Wrong ipv4 src address", "10.0.0.1/24", ipv4Match.getIpv4Source().getValue());\r
         Assert.assertEquals("Wrong ipv4 dst address", "10.0.0.2/20", ipv4Match.getIpv4Destination().getValue());\r
-//        Assert.assertEquals("Wrong pbb isid", 23, builtMatch.getProtocolMatchFields().getPbb().getPbbIsid().intValue());\r
+        Assert.assertEquals("Wrong pbb isid", 23, builtMatch.getProtocolMatchFields().getPbb().getPbbIsid().intValue());\r
         Assert.assertEquals("Wrong tunnel id", new BigInteger(1, new byte[]{1, 2, 3, 4, 5, 6, 7, 8}),\r
                 builtMatch.getTunnel().getTunnelId());\r
     }\r
@@ -852,9 +850,8 @@ public class MatchConvertorImplV13Test {
         org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match builtMatch = salMatchBuilder.build();\r
         \r
         ArpMatch arpMatch = (ArpMatch) builtMatch.getLayer3Match();\r
-        // FIXME - fix mask computation\r
-//        Assert.assertEquals("Wrong arp spa", "10.0.0.3/8", arpMatch.getArpSourceTransportAddress().getValue());\r
-//        Assert.assertEquals("Wrong arp tpa", "10.0.0.4/9", arpMatch.getArpTargetTransportAddress().getValue());\r
+        Assert.assertEquals("Wrong arp spa", "10.0.0.3/24", arpMatch.getArpSourceTransportAddress().getValue());\r
+        Assert.assertEquals("Wrong arp tpa", "10.0.0.4/9", arpMatch.getArpTargetTransportAddress().getValue());\r
         Assert.assertEquals("Wrong arp sha", "00:00:00:00:00:03", arpMatch.getArpSourceHardwareAddress().getAddress().getValue());\r
         Assert.assertEquals("Wrong arp sha mask", "00:00:01:00:04:00", arpMatch.getArpSourceHardwareAddress().getMask().getValue());\r
         Assert.assertEquals("Wrong arp tha", "00:00:00:00:00:04", arpMatch.getArpTargetHardwareAddress().getAddress().getValue());\r