mb.setCNextHop(hop);
final List<Flowspec> dests = new ArrayList<>(routes.size());
- for (final MapEntryNode route : routes) {
- dests.add(FSNlriParser.extractFlowspec(route));
+ for (final MapEntryNode reachRoute : routes) {
+ dests.add(FSNlriParser.extractFlowspec(reachRoute));
}
mb.setAdvertizedRoutes(new AdvertizedRoutesBuilder().setDestinationType(
new DestinationFlowspecCaseBuilder().setDestinationFlowspec(
mb.setSafi(FlowspecSubsequentAddressFamily.class);
final List<Flowspec> dests = new ArrayList<>(routes.size());
- for (final MapEntryNode route : routes) {
- dests.add(FSNlriParser.extractFlowspec(route));
+ for (final MapEntryNode unreachRoute : routes) {
+ dests.add(FSNlriParser.extractFlowspec(unreachRoute));
}
mb.setWithdrawnRoutes(new WithdrawnRoutesBuilder().setDestinationType(
new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150114.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecCaseBuilder().setDestinationFlowspec(
mb.setCNextHop(hop);
final List<CLinkstateDestination> dests = new ArrayList<>(routes.size());
- for (final MapEntryNode route : routes) {
- dests.add(LinkstateNlriParser.extractLinkstateDestination(route));
+ for (final MapEntryNode reachRoute : routes) {
+ dests.add(LinkstateNlriParser.extractLinkstateDestination(reachRoute));
}
mb.setAdvertizedRoutes(new AdvertizedRoutesBuilder().setDestinationType(
new DestinationLinkstateCaseBuilder().setDestinationLinkstate(
mb.setSafi(LinkstateSubsequentAddressFamily.class);
final List<CLinkstateDestination> dests = new ArrayList<>(routes.size());
- for (final MapEntryNode route : routes) {
- dests.add(LinkstateNlriParser.extractLinkstateDestination(route));
+ for (final MapEntryNode unreachRoute : routes) {
+ dests.add(LinkstateNlriParser.extractLinkstateDestination(unreachRoute));
}
mb.setWithdrawnRoutes(new WithdrawnRoutesBuilder().setDestinationType(
new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLinkstateCaseBuilder().setDestinationLinkstate(
}
// Optimized immutable copy, reused for all PeerGroups
- final Map<PeerId, PeerRole> peerRoles = ImmutableMap.copyOf(idToRole);
+ final Map<PeerId, PeerRole> allPeerRoles = ImmutableMap.copyOf(idToRole);
final Map<PeerRole, PeerExportGroup> ret = new EnumMap<>(PeerRole.class);
for (Entry<PeerRole, Collection<YangInstanceIdentifier>> e : roleToIds.asMap().entrySet()) {
final AbstractExportPolicy policy = policyDatabase.exportPolicyForRole(e.getKey());
final Collection<Entry<PeerId, YangInstanceIdentifier>> peers = ImmutableList.copyOf(Collections2.transform(e.getValue(), GENERATE_PEERID));
- ret.put(e.getKey(), new PeerExportGroup(peers, peerRoles, policy));
+ ret.put(e.getKey(), new PeerExportGroup(peers, allPeerRoles, policy));
}
return ret;
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) route.getChild(this.routeKeyLeaf).get().getValue();
+ for (final MapEntryNode ipv4Route : routes) {
+ final String prefix = (String) ipv4Route.getChild(this.routeKeyLeaf).get().getValue();
prefs.add(new Ipv4PrefixesBuilder().setPrefix(new Ipv4Prefix(prefix)).build());
}
return prefs;
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) route.getChild(this.routeKeyLeaf).get().getValue();
+ for (final MapEntryNode ipv6Route : routes) {
+ final String prefix = (String) ipv6Route.getChild(this.routeKeyLeaf).get().getValue();
prefs.add(new Ipv6PrefixesBuilder().setPrefix(new Ipv6Prefix(prefix)).build());
}
return prefs;
final PolicyDatabase pd = new PolicyDatabase(localAs.getValue(), localBgpId, this.clusterId);
- final DOMDataBrokerExtension service = this.domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);
- this.service = service;
+ final DOMDataBrokerExtension domDatatreeChangeService = this.domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);
+ this.service = domDatatreeChangeService;
this.efWriter = EffectiveRibInWriter.create(getService(), this.createPeerChain(this), getYangRibId(), pd, this.ribContextRegistry);
LOG.debug("Effective RIB created.");