use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.evpn.evpn.choice.EthernetADRouteCaseBuilder in project bgpcep by opendaylight.
the class EthADRParser method serializeEvpnModel.
@Override
public EvpnChoice serializeEvpnModel(final ContainerNode evpn) {
final EthernetADRouteBuilder builder = serializeKeyModel(evpn);
builder.setMplsLabel(extractMplsLabel(evpn, MPLS_NID));
return new EthernetADRouteCaseBuilder().setEthernetADRoute(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.evpn.evpn.choice.EthernetADRouteCaseBuilder in project bgpcep by opendaylight.
the class EthADRParser method parseEvpn.
@Override
public EvpnChoice parseEvpn(final ByteBuf buffer) {
Preconditions.checkArgument(buffer.readableBytes() == CONTENT_LENGTH, "Wrong length of array of bytes. Passed: %s ;", buffer);
final Esi esi = SimpleEsiTypeRegistry.getInstance().parseEsi(buffer.readSlice(ESI_SIZE));
final EthernetTagId eti = new EthernetTagIdBuilder().setVlanId(ByteBufUtils.readUint32(buffer)).build();
final MplsLabel label = mplsLabelForByteBuf(buffer);
final EthernetADRouteBuilder builder = new EthernetADRouteBuilder().setEsi(esi).setEthernetTagId(eti).setMplsLabel(label);
return new EthernetADRouteCaseBuilder().setEthernetADRoute(builder.build()).build();
}
Aggregations