use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev171213.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.rev171213.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(buffer.readUnsignedInt()).build();
IpAddress ip = requireNonNull(EthSegRParser.parseOrigRouteIp(buffer));
final IncMultiEthernetTagResBuilder builder = new IncMultiEthernetTagResBuilder().setEthernetTagId(eti).setOrigRouteIp(ip);
return new IncMultiEthernetTagResCaseBuilder().setIncMultiEthernetTagRes(builder.build()).build();
}
Aggregations