Added description to meter types yang model.
[controller.git] / opendaylight / protocol_plugins / openflow / src / test / java / org / opendaylight / controller / protocol_plugin / openflow / vendorextension / v6extension / V6ExtensionTest.java
index 75f6a83a327fb9daf9bad619091c083cad8cc1ab..7782aa9093762c1041775a6cf0f7bde1d0093e84 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension;
 
 import static org.junit.Assert.fail;
@@ -6,9 +13,9 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+
 import org.junit.Assert;
 import org.junit.Test;
-import org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension.V6Match;
 import org.openflow.protocol.OFMatch;
 
 public class V6ExtensionTest {
@@ -89,9 +96,10 @@ public class V6ExtensionTest {
                 match3.getDataLayerSource()));
         Assert.assertTrue(Arrays.equals(match.getDataLayerDestination(),
                 match3.getDataLayerDestination()));
-        Assert.assertTrue(match.getNetworkSrc().equals(match3.getNetworkSrc()));
-        Assert.assertTrue(match.getNetworkDest()
-                .equals(match3.getNetworkDest()));
+        Assert.assertNull(match.getNetworkSrc());
+        Assert.assertNull(match3.getNetworkSrc());
+        Assert.assertNull(match.getNetworkDest());
+        Assert.assertNull(match3.getNetworkDest());
         Assert.assertTrue(match.getDataLayerVirtualLan() == match3
                 .getDataLayerVirtualLan());
         Assert.assertTrue(match.getDataLayerVirtualLanPriorityCodePoint() == match3
@@ -118,6 +126,7 @@ public class V6ExtensionTest {
         match.fromString("ip_src=2001:ddd:3e1:1234:0000:1111:2222:3333/64");
         match.fromString("ip_dst=2001:123:222:abc:111:aaa:1111:2222/64");
         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");
@@ -141,7 +150,8 @@ public class V6ExtensionTest {
 
         Assert.assertTrue(match.getDataLayerVirtualLan() == match2
                 .getDataLayerVirtualLan());
-        // vlan pcp isn't part of write/read buffer
+        Assert.assertTrue(match.getDataLayerVirtualLanPriorityCodePoint() == match2
+                .getDataLayerVirtualLanPriorityCodePoint());
         Assert.assertTrue(match.getNetworkProtocol() == match2
                 .getNetworkProtocol());
         Assert.assertTrue(match.getNetworkTypeOfService() == match2