Search in sources :

Example 6 with PbbIsidCase

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.PbbIsidCase in project openflowplugin by opendaylight.

the class OxmPbbIsidDeserializerTest method test.

/**
 * Tests {@link OxmPbbIsidDeserializer#deserialize(ByteBuf)}.
 */
@Test
public void test() {
    ByteBuf buffer = BufferHelper.buildBuffer("80 00 4A 03 00 00 02");
    // skip XID
    buffer.skipBytes(4);
    OxmPbbIsidDeserializer deserializer = new OxmPbbIsidDeserializer();
    MatchEntry entry = deserializer.deserialize(buffer);
    Assert.assertEquals("Wrong entry class", OpenflowBasicClass.class, entry.getOxmClass());
    Assert.assertEquals("Wrong entry field", PbbIsid.class, entry.getOxmMatchField());
    Assert.assertEquals("Wrong entry hasMask", false, entry.isHasMask());
    Assert.assertEquals("Wrong entry value", 2, ((PbbIsidCase) entry.getMatchEntryValue()).getPbbIsid().getIsid().intValue());
}
Also used : MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) ByteBuf(io.netty.buffer.ByteBuf) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)4 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)4 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)3 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)3 ProtocolMatchFieldsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder)3 PbbBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.protocol.match.fields.PbbBuilder)3 EthDstCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthDstCase)3 EthSrcCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCase)3 MetadataCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.MetadataCase)3 TunnelIdCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TunnelIdCase)3 VlanVidCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase)3 ByteBuf (io.netty.buffer.ByteBuf)2 BigInteger (java.math.BigInteger)2 List (java.util.List)2 VersionConvertorData (org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData)2 Ipv4Prefix (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix)2 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match)2 VlanId (org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId)2 EthernetDestinationBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder)2 EthernetSourceBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetSourceBuilder)2