use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.inc.multi.ethernet.tag.res.IncMultiEthernetTagResBuilder in project bgpcep by opendaylight.
the class IncMultEthTagRParser method serializeModel.
private static EvpnChoice serializeModel(final ContainerNode evpn) {
final IncMultiEthernetTagResBuilder builder = new IncMultiEthernetTagResBuilder();
builder.setEthernetTagId(extractETI(evpn));
builder.setOrigRouteIp(extractOrigRouteIp(evpn));
return new IncMultiEthernetTagResCaseBuilder().setIncMultiEthernetTagRes(builder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.inc.multi.ethernet.tag.res.IncMultiEthernetTagResBuilder in project bgpcep by opendaylight.
the class IncMultEthTagRParser method parseEvpn.
@Override
public EvpnChoice parseEvpn(final ByteBuf buffer) {
Preconditions.checkArgument(buffer.readableBytes() == CONTENT_LENGTH || buffer.readableBytes() == CONTENT_LENGTH2, "Wrong length of array of bytes. Passed: %s ;", buffer);
final EthernetTagId eti = new EthernetTagIdBuilder().setVlanId(ByteBufUtils.readUint32(buffer)).build();
final IpAddressNoZone ip = IpAddressUtil.addressForByteBuf(buffer);
final IncMultiEthernetTagResBuilder builder = new IncMultiEthernetTagResBuilder().setEthernetTagId(eti).setOrigRouteIp(ip);
return new IncMultiEthernetTagResCaseBuilder().setIncMultiEthernetTagRes(builder.build()).build();
}
Aggregations