+/*
+ * 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;
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 {
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
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");
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