use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.leaf.a.d.grouping.leaf.a.d.leaf.a.d.route.key.InterAsIPmsiADCaseBuilder in project bgpcep by opendaylight.
the class LeafADHandler method parseMvpn.
@Override
public LeafADCase parseMvpn(final ByteBuf buffer) {
final NlriType type = NlriType.forValue(buffer.readUnsignedByte());
final short length = buffer.readUnsignedByte();
final MvpnChoice key = SimpleMvpnNlriRegistry.getInstance().parseMvpn(type, buffer.readSlice(length));
final LeafADRouteKey routeKey;
if (type == NlriType.InterAsIPmsiAD) {
routeKey = new InterAsIPmsiADCaseBuilder((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.mvpn.mvpn.choice.InterAsIPmsiADCase) key).build();
} else {
routeKey = new SPmsiADCaseBuilder((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.mvpn.mvpn.choice.SPmsiADCase) key).build();
}
return new LeafADCaseBuilder().setLeafAD(new LeafADBuilder().setLeafADRouteKey(routeKey).setOrigRouteIp(IpAddressUtil.addressForByteBufWOLength(buffer)).build()).build();
}
Aggregations