use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnets.associated.to.route.targets.RouteTarget in project bgpcep by opendaylight.
the class RouteTargetAsTwoOctetEcHandler method serializeExtendedCommunity.
@Override
public void serializeExtendedCommunity(final ExtendedCommunity extendedCommunity, final ByteBuf byteAggregator) {
Preconditions.checkArgument(extendedCommunity instanceof RouteTargetExtendedCommunityCase, "The extended community %s is not RouteTargetExtendedCommunityCase type.", extendedCommunity);
final RouteTargetExtendedCommunity routeTarget = ((RouteTargetExtendedCommunityCase) extendedCommunity).getRouteTargetExtendedCommunity();
RouteTargetExtendedCommunityHandler.serialize(routeTarget, byteAggregator);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnets.associated.to.route.targets.RouteTarget in project bgpcep by opendaylight.
the class RouteTargetConstrainRIBSupport method createRouteKey.
private NodeIdentifierWithPredicates createRouteKey(final UnkeyedListEntryNode routeTarget) {
final ByteBuf buffer = Unpooled.buffer();
final RouteTargetConstrainDestination dest = extractDestination(routeTarget);
buffer.writeBytes(ImmutableRouteTargetConstrainNlriRegistry.getInstance().serializeRouteTargetConstrain(dest.getRouteTargetConstrainChoice()));
return PathIdUtil.createNidKey(routeQName(), routeKeyTemplate(), ByteArray.encodeBase64(buffer), routeTarget.findChildByArg(routePathIdNid()));
}
Aggregations