use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.ethernet.a.d.route.EthernetADRouteBuilder 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.ethernet.a.d.route.EthernetADRouteBuilder in project bgpcep by opendaylight.
the class EthADRParser method serializeKeyModel.
private static EthernetADRouteBuilder serializeKeyModel(final ContainerNode evpn) {
final EthernetADRouteBuilder builder = new EthernetADRouteBuilder();
builder.setEsi(serializeEsi(evpn));
builder.setEthernetTagId(extractETI(evpn));
return builder;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.ethernet.a.d.route.EthernetADRouteBuilder 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