@Nonnull @Override protected DestinationType buildDestination(@Nonnull final Collection<MapEntryNode> routes) { final MapEntryNode routesCont = Iterables.getOnlyElement(routes); final PathId pathId = PathIdUtil.buildPathId(routesCont, routePathIdNid()); return this.nlriParser.createAdvertizedRoutesDestinationType( new Object[] {this.nlriParser.extractFlowspec(routesCont)}, pathId ); }
@Nonnull @Override protected DestinationType buildWithdrawnDestination(@Nonnull final Collection<MapEntryNode> routes) { final MapEntryNode routesCont = Iterables.getOnlyElement(routes); final PathId pathId = PathIdUtil.buildPathId(routesCont, routePathIdNid()); return this.nlriParser.createWithdrawnDestinationType( new Object[] {this.nlriParser.extractFlowspec(Iterables.getOnlyElement(routes))}, pathId ); }
@Nonnull @Override protected DestinationType buildWithdrawnDestination(@Nonnull final Collection<MapEntryNode> routes) { final MapEntryNode routesCont = Iterables.getOnlyElement(routes); final PathId pathId = PathIdUtil.buildPathId(routesCont, routePathIdNid()); final RouteDistinguisher rd = extractRouteDistinguisher(routesCont, this.routeDistinguisherNID); return this.nlriParser.createWithdrawnDestinationType( new Object[] {rd, nlriParser.extractFlowspec(Iterables.getOnlyElement(routes))}, pathId ); } }
@Nonnull @Override protected DestinationType buildDestination(@Nonnull final Collection<MapEntryNode> routes) { final MapEntryNode routesCont = Iterables.getOnlyElement(routes); final PathId pathId = PathIdUtil.buildPathId(routesCont, routePathIdNid()); final RouteDistinguisher rd = extractRouteDistinguisher(routesCont, this.routeDistinguisherNID); return this.nlriParser.createAdvertizedRoutesDestinationType( new Object[] {rd, this.nlriParser.extractFlowspec(routesCont)}, pathId ); }
private List<Ipv6Prefixes> extractPrefixes(final Collection<MapEntryNode> routes) { final List<Ipv6Prefixes> prefs = new ArrayList<>(routes.size()); for (final MapEntryNode route : routes) { final String prefix = (String) NormalizedNodes.findNode(route, routePrefixIdentifier()).get().getValue(); prefs.add(new Ipv6PrefixesBuilder().setPathId(PathIdUtil.buildPathId(route, routePathIdNid())).setPrefix(new Ipv6Prefix(prefix)).build()); } return prefs; } }
private List<Ipv4Prefixes> extractPrefixes(final Collection<MapEntryNode> routes) { final List<Ipv4Prefixes> prefs = new ArrayList<>(routes.size()); for (final MapEntryNode route : routes) { final String prefix = (String) NormalizedNodes.findNode(route, routePrefixIdentifier()).get().getValue(); final Ipv4PrefixesBuilder prefixBuilder = new Ipv4PrefixesBuilder().setPrefix(new Ipv4Prefix(prefix)); prefixBuilder.setPathId(PathIdUtil.buildPathId(route, routePathIdNid())); prefs.add(prefixBuilder.build()); } return prefs; }