Search in sources :

Example 21 with MplsLabel

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

the class MplsLabelEntrySerializerTest method testSerialize.

@Test
public void testSerialize() throws Exception {
    final long mplsLabel = 10L;
    final Match mplsLabelMatch = new MatchBuilder().setProtocolMatchFields(new ProtocolMatchFieldsBuilder().setMplsLabel(mplsLabel).build()).build();
    assertMatch(mplsLabelMatch, false, (out) -> assertEquals(out.readUnsignedInt(), mplsLabel));
}
Also used : ProtocolMatchFieldsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) Match(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.Match) Test(org.junit.Test)

Aggregations

MplsLabel (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel)12 Test (org.junit.Test)10 ByteBuf (io.netty.buffer.ByteBuf)9 MplsLabelUtil.byteBufForMplsLabel (org.opendaylight.protocol.util.MplsLabelUtil.byteBufForMplsLabel)5 NlriModelUtil.extractMplsLabel (org.opendaylight.protocol.bgp.evpn.impl.nlri.NlriModelUtil.extractMplsLabel)4 ArrayList (java.util.ArrayList)3 AbstractDeserializerTest (org.opendaylight.openflowplugin.impl.protocol.deserialization.AbstractDeserializerTest)3 Instruction (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction)3 ApplyActionsCase (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase)3 ProtocolMatchFieldsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder)3 Esi (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.esi.Esi)3 PathBindingTlvParser (org.opendaylight.protocol.pcep.ietf.stateful07.PathBindingTlvParser)2 MplsLabelUtil.mplsLabelForByteBuf (org.opendaylight.protocol.util.MplsLabelUtil.mplsLabelForByteBuf)2 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)2 FlowAndStatisticsMapList (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList)2 MultipartReplyFlowStats (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.multipart.reply.multipart.reply.body.MultipartReplyFlowStats)2 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder)2 EthernetTagId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.ethernet.tag.id.EthernetTagId)2 EthernetTagIdBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.ethernet.tag.id.EthernetTagIdBuilder)2 LabelStack (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.LabelStack)2