X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Fvendorextension%2Fv6extension%2FV6ExtensionTest.java;h=abbc43809db820b888827b47bcda908a3a05f2e5;hb=refs%2Fchanges%2F10%2F5010%2F3;hp=7782aa9093762c1041775a6cf0f7bde1d0093e84;hpb=9303b14b9dba1a940f0d0a6fe1604bfcd0f9e294;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java index 7782aa9093..abbc43809d 100644 --- a/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java +++ b/opendaylight/protocol_plugins/openflow/src/test/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6ExtensionTest.java @@ -17,6 +17,7 @@ import java.util.Arrays; import org.junit.Assert; import org.junit.Test; import org.openflow.protocol.OFMatch; +import org.openflow.util.U32; public class V6ExtensionTest { @@ -52,20 +53,18 @@ public class V6ExtensionTest { match.fromString("input_port=1"); match.fromString("dl_dst=20:A0:11:10:00:99"); match.fromString("dl_src=00:10:08:22:12:75"); - match.fromString("ip_src=10.1.1.1"); match.fromString("ip_dst=1.2.3.4"); match.fromString("eth_type=0x800"); match.fromString("dl_vlan=10"); - match.fromString("dl_vpcp=1"); match.fromString("nw_proto=6"); match.fromString("nw_tos=100"); match.fromString("tp_dst=8080"); match.fromString("tp_src=60"); + match.fromString("dl_vpcp=1"); Assert.assertTrue(match.getInputPort() == 1); // Assert.assertTrue(match.getIPv6MatchLen()==6); - ofm.setInputPort((short) 1); // V6Match is meant for IPv6, but if using OFMatch, it will be set to // IPv4 values, as OF1.0 doesn't support IPv6. @@ -89,6 +88,13 @@ public class V6ExtensionTest { ofm.setTransportSource((short) 60); ofm.setTransportDestination((short) 8080); + // this v6match ctor now looks at the wildcard field to + // determine if vlan pcp has been set + // so set the wildcards appropriately to reflect that vlan pcp + // has been set. + int wildcards = OFMatch.OFPFW_ALL; + wildcards &= ~OFMatch.OFPFW_DL_VLAN_PCP; + ofm.setWildcards(U32.t(Long.valueOf(wildcards))); V6Match match3 = new V6Match(ofm); Assert.assertTrue(match.getInputPort() == match3.getInputPort());