Search in sources :

Example 11 with VpnInstance

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance in project netvirt by opendaylight.

the class VrfEntryListener method createFibEntries.

private void createFibEntries(final InstanceIdentifier<VrfEntry> vrfEntryIid, final VrfEntry vrfEntry) {
    final VrfTablesKey vrfTableKey = vrfEntryIid.firstKeyOf(VrfTables.class);
    List<SubTransaction> txnObjects = new ArrayList<>();
    final VpnInstanceOpDataEntry vpnInstance = fibUtil.getVpnInstance(vrfTableKey.getRouteDistinguisher());
    Preconditions.checkNotNull(vpnInstance, "Vpn Instance not available " + vrfTableKey.getRouteDistinguisher());
    Preconditions.checkNotNull(vpnInstance.getVpnId(), "Vpn Instance with rd " + vpnInstance.getVrfId() + " has null vpnId!");
    final Collection<VpnToDpnList> vpnToDpnList;
    if (vrfEntry.getParentVpnRd() != null && FibHelper.isControllerManagedNonSelfImportedRoute(RouteOrigin.value(vrfEntry.getOrigin()))) {
        // This block MUST BE HIT only for PNF (Physical Network Function) FIB Entries.
        VpnInstanceOpDataEntry parentVpnInstance = fibUtil.getVpnInstance(vrfEntry.getParentVpnRd());
        vpnToDpnList = parentVpnInstance != null ? parentVpnInstance.getVpnToDpnList() : vpnInstance.getVpnToDpnList();
        LOG.info("createFibEntries: Processing creation of PNF FIB entry with rd {} prefix {}", vrfEntry.getParentVpnRd(), vrfEntry.getDestPrefix());
    } else {
        vpnToDpnList = vpnInstance.getVpnToDpnList();
    }
    final Long vpnId = vpnInstance.getVpnId();
    final String rd = vrfTableKey.getRouteDistinguisher();
    SubnetRoute subnetRoute = vrfEntry.getAugmentation(SubnetRoute.class);
    if (subnetRoute != null) {
        final long elanTag = subnetRoute.getElantag();
        LOG.trace("SUBNETROUTE: createFibEntries: SubnetRoute augmented vrfentry found for rd {} prefix {}" + " with elantag {}", rd, vrfEntry.getDestPrefix(), elanTag);
        if (vpnToDpnList != null) {
            jobCoordinator.enqueueJob(FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix()), () -> {
                WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
                for (final VpnToDpnList curDpn : vpnToDpnList) {
                    if (curDpn.getDpnState() == VpnToDpnList.DpnState.Active) {
                        installSubnetRouteInFib(curDpn.getDpnId(), elanTag, rd, vpnId, vrfEntry, tx);
                        installSubnetBroadcastAddrDropRule(curDpn.getDpnId(), rd, vpnId.longValue(), vrfEntry, NwConstants.ADD_FLOW, tx);
                    }
                }
                List<ListenableFuture<Void>> futures = new ArrayList<>();
                futures.add(tx.submit());
                return futures;
            });
        }
        return;
    }
    final List<BigInteger> localDpnIdList = createLocalFibEntry(vpnInstance.getVpnId(), rd, vrfEntry);
    if (!localDpnIdList.isEmpty() && vpnToDpnList != null) {
        jobCoordinator.enqueueJob(FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix()), () -> {
            WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
            synchronized (vpnInstance.getVpnInstanceName().intern()) {
                for (VpnToDpnList vpnDpn : vpnToDpnList) {
                    if (!localDpnIdList.contains(vpnDpn.getDpnId())) {
                        if (vpnDpn.getDpnState() == VpnToDpnList.DpnState.Active) {
                            try {
                                if (RouteOrigin.BGP.getValue().equals(vrfEntry.getOrigin())) {
                                    bgpRouteVrfEntryHandler.createRemoteFibEntry(vpnDpn.getDpnId(), vpnId, vrfTableKey.getRouteDistinguisher(), vrfEntry, tx, txnObjects);
                                } else {
                                    createRemoteFibEntry(vpnDpn.getDpnId(), vpnInstance.getVpnId(), vrfTableKey.getRouteDistinguisher(), vrfEntry, tx);
                                }
                            } catch (NullPointerException e) {
                                LOG.error("Failed to get create remote fib flows for prefix {} ", vrfEntry.getDestPrefix(), e);
                            }
                        }
                    }
                }
            }
            List<ListenableFuture<Void>> futures = new ArrayList<>();
            futures.add(tx.submit());
            return futures;
        }, MAX_RETRIES);
    }
    Optional<String> optVpnUuid = fibUtil.getVpnNameFromRd(rd);
    if (optVpnUuid.isPresent()) {
        String vpnUuid = optVpnUuid.get();
        InterVpnLinkDataComposite interVpnLink = interVpnLinkCache.getInterVpnLinkByVpnId(vpnUuid).orNull();
        if (interVpnLink != null) {
            LOG.debug("InterVpnLink {} found in Cache linking Vpn {}", interVpnLink.getInterVpnLinkName(), vpnUuid);
            FibUtil.getFirstNextHopAddress(vrfEntry).ifPresent(routeNexthop -> {
                if (interVpnLink.isIpAddrTheOtherVpnEndpoint(routeNexthop, vpnUuid)) {
                    // This is an static route that points to the other endpoint of an InterVpnLink
                    // In that case, we should add another entry in FIB table pointing to LPortDispatcher table.
                    installIVpnLinkSwitchingFlows(interVpnLink, vpnUuid, vrfEntry, vpnId);
                    installInterVpnRouteInLFib(interVpnLink, vpnUuid, vrfEntry);
                }
            });
        }
    }
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) SubnetRoute(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRoute) SubTransaction(org.opendaylight.genius.utils.batching.SubTransaction) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList) VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) BigInteger(java.math.BigInteger) InterVpnLinkDataComposite(org.opendaylight.netvirt.vpnmanager.api.intervpnlink.InterVpnLinkDataComposite)

Example 12 with VpnInstance

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance in project netvirt by opendaylight.

the class VrfEntryListener method deleteFibEntries.

private void deleteFibEntries(final InstanceIdentifier<VrfEntry> identifier, final VrfEntry vrfEntry) {
    final VrfTablesKey vrfTableKey = identifier.firstKeyOf(VrfTables.class);
    final String rd = vrfTableKey.getRouteDistinguisher();
    final VpnInstanceOpDataEntry vpnInstance = fibUtil.getVpnInstance(vrfTableKey.getRouteDistinguisher());
    if (vpnInstance == null) {
        LOG.error("VPN Instance for rd {} is not available from VPN Op Instance Datastore", rd);
        return;
    }
    final Collection<VpnToDpnList> vpnToDpnList;
    if (vrfEntry.getParentVpnRd() != null && FibHelper.isControllerManagedNonSelfImportedRoute(RouteOrigin.value(vrfEntry.getOrigin()))) {
        // This block MUST BE HIT only for PNF (Physical Network Function) FIB Entries.
        VpnInstanceOpDataEntry parentVpnInstance = fibUtil.getVpnInstance(vrfEntry.getParentVpnRd());
        vpnToDpnList = parentVpnInstance != null ? parentVpnInstance.getVpnToDpnList() : vpnInstance.getVpnToDpnList();
        LOG.info("deleteFibEntries: Processing deletion of PNF FIB entry with rd {} prefix {}", vrfEntry.getParentVpnRd(), vrfEntry.getDestPrefix());
    } else {
        vpnToDpnList = vpnInstance.getVpnToDpnList();
    }
    SubnetRoute subnetRoute = vrfEntry.getAugmentation(SubnetRoute.class);
    final java.util.Optional<Long> optionalLabel = FibUtil.getLabelFromRoutePaths(vrfEntry);
    List<String> nextHopAddressList = FibHelper.getNextHopListFromRoutePaths(vrfEntry);
    String vpnName = fibUtil.getVpnNameFromId(vpnInstance.getVpnId());
    if (subnetRoute != null) {
        long elanTag = subnetRoute.getElantag();
        LOG.trace("SUBNETROUTE: deleteFibEntries: SubnetRoute augmented vrfentry found for rd {} prefix {}" + " with elantag {}", rd, vrfEntry.getDestPrefix(), elanTag);
        if (vpnToDpnList != null) {
            jobCoordinator.enqueueJob(FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix()), () -> Collections.singletonList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(tx -> {
                for (final VpnToDpnList curDpn : vpnToDpnList) {
                    baseVrfEntryHandler.makeConnectedRoute(curDpn.getDpnId(), vpnInstance.getVpnId(), vrfEntry, vrfTableKey.getRouteDistinguisher(), null, NwConstants.DEL_FLOW, tx, null);
                    if (RouteOrigin.value(vrfEntry.getOrigin()) != RouteOrigin.SELF_IMPORTED) {
                        optionalLabel.ifPresent(label -> makeLFibTableEntry(curDpn.getDpnId(), label, null, DEFAULT_FIB_FLOW_PRIORITY, NwConstants.DEL_FLOW, tx));
                    }
                    installSubnetBroadcastAddrDropRule(curDpn.getDpnId(), rd, vpnInstance.getVpnId(), vrfEntry, NwConstants.DEL_FLOW, tx);
                }
            })));
        }
        optionalLabel.ifPresent(label -> {
            synchronized (label.toString().intern()) {
                LabelRouteInfo lri = getLabelRouteInfo(label);
                if (isPrefixAndNextHopPresentInLri(vrfEntry.getDestPrefix(), nextHopAddressList, lri)) {
                    Optional<VpnInstanceOpDataEntry> vpnInstanceOpDataEntryOptional = fibUtil.getVpnInstanceOpData(rd);
                    String vpnInstanceName = "";
                    if (vpnInstanceOpDataEntryOptional.isPresent()) {
                        vpnInstanceName = vpnInstanceOpDataEntryOptional.get().getVpnInstanceName();
                    }
                    boolean lriRemoved = this.deleteLabelRouteInfo(lri, vpnInstanceName, null);
                    if (lriRemoved) {
                        String parentRd = lri.getParentVpnRd();
                        fibUtil.releaseId(FibConstants.VPN_IDPOOL_NAME, FibUtil.getNextHopLabelKey(parentRd, vrfEntry.getDestPrefix()));
                        LOG.trace("SUBNETROUTE: deleteFibEntries: Released subnetroute label {} for rd {} prefix {}" + " as labelRouteInfo cleared", label, rd, vrfEntry.getDestPrefix());
                    }
                } else {
                    fibUtil.releaseId(FibConstants.VPN_IDPOOL_NAME, FibUtil.getNextHopLabelKey(rd, vrfEntry.getDestPrefix()));
                    LOG.trace("SUBNETROUTE: deleteFibEntries: Released subnetroute label {} for rd {} prefix {}", label, rd, vrfEntry.getDestPrefix());
                }
            }
        });
        return;
    }
    final List<BigInteger> localDpnIdList = deleteLocalFibEntry(vpnInstance.getVpnId(), vrfTableKey.getRouteDistinguisher(), vrfEntry);
    if (vpnToDpnList != null) {
        List<String> usedRds = VpnExtraRouteHelper.getUsedRds(dataBroker, vpnInstance.getVpnId(), vrfEntry.getDestPrefix());
        String jobKey;
        Optional<Routes> extraRouteOptional;
        // Is this fib route an extra route? If yes, get the nexthop which would be an adjacency in the vpn
        if (usedRds != null && !usedRds.isEmpty()) {
            jobKey = FibUtil.getJobKeyForRdPrefix(usedRds.get(0), vrfEntry.getDestPrefix());
            if (usedRds.size() > 1) {
                LOG.error("The extra route prefix is still present in some DPNs");
                return;
            } else {
                // The first rd is retrieved from usedrds as Only 1 rd would be present as extra route prefix
                // is not present in any other DPN
                extraRouteOptional = VpnExtraRouteHelper.getVpnExtraroutes(dataBroker, vpnName, usedRds.get(0), vrfEntry.getDestPrefix());
            }
        } else {
            jobKey = FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix());
            extraRouteOptional = Optional.absent();
        }
        jobCoordinator.enqueueJob(jobKey, () -> {
            WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
            if (localDpnIdList.size() <= 0) {
                for (VpnToDpnList curDpn : vpnToDpnList) {
                    baseVrfEntryHandler.deleteRemoteRoute(BigInteger.ZERO, curDpn.getDpnId(), vpnInstance.getVpnId(), vrfTableKey, vrfEntry, extraRouteOptional, tx);
                }
            } else {
                for (BigInteger localDpnId : localDpnIdList) {
                    for (VpnToDpnList curDpn : vpnToDpnList) {
                        if (!curDpn.getDpnId().equals(localDpnId)) {
                            baseVrfEntryHandler.deleteRemoteRoute(localDpnId, curDpn.getDpnId(), vpnInstance.getVpnId(), vrfTableKey, vrfEntry, extraRouteOptional, tx);
                        }
                    }
                }
            }
            List<ListenableFuture<Void>> futures = new ArrayList<>();
            futures.add(tx.submit());
            return futures;
        }, MAX_RETRIES);
    }
    // The flow/group entry has been deleted from config DS; need to clean up associated operational
    // DS entries in VPN Op DS, VpnInstanceOpData and PrefixToInterface to complete deletion
    cleanUpOpDataForFib(vpnInstance.getVpnId(), vrfTableKey.getRouteDistinguisher(), vrfEntry);
    // Remove all fib entries configured due to interVpnLink, when nexthop is the opposite endPoint
    // of the interVpnLink.
    Optional<String> optVpnUuid = fibUtil.getVpnNameFromRd(rd);
    if (optVpnUuid.isPresent()) {
        String vpnUuid = optVpnUuid.get();
        FibUtil.getFirstNextHopAddress(vrfEntry).ifPresent(routeNexthop -> {
            Optional<InterVpnLinkDataComposite> optInterVpnLink = interVpnLinkCache.getInterVpnLinkByVpnId(vpnUuid);
            if (optInterVpnLink.isPresent()) {
                InterVpnLinkDataComposite interVpnLink = optInterVpnLink.get();
                if (interVpnLink.isIpAddrTheOtherVpnEndpoint(routeNexthop, vpnUuid)) {
                    // This is route that points to the other endpoint of an InterVpnLink
                    // In that case, we should look for the FIB table pointing to
                    // LPortDispatcher table and remove it.
                    removeInterVPNLinkRouteFlows(interVpnLink, vpnUuid, vrfEntry);
                }
            }
        });
    }
}
Also used : LabelRouteInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfo) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) InterVpnLinkDataComposite(org.opendaylight.netvirt.vpnmanager.api.intervpnlink.InterVpnLinkDataComposite) WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) SubnetRoute(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRoute) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList) Routes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.to.extraroutes.vpn.extra.routes.Routes) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) BigInteger(java.math.BigInteger) ListenableFuture(com.google.common.util.concurrent.ListenableFuture)

Example 13 with VpnInstance

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance in project netvirt by opendaylight.

the class BgpRouteVrfEntryHandler method createFibEntries.

/*
      Please note that the following createFibEntries will be invoked only for BGP Imported Routes.
      The invocation of the following method is via create() callback from the MDSAL Batching Infrastructure
      provided by ResourceBatchingManager
     */
private void createFibEntries(WriteTransaction writeTx, final InstanceIdentifier<VrfEntry> vrfEntryIid, final VrfEntry vrfEntry, List<SubTransaction> subTxns) {
    final VrfTablesKey vrfTableKey = vrfEntryIid.firstKeyOf(VrfTables.class);
    final VpnInstanceOpDataEntry vpnInstance = getFibUtil().getVpnInstance(vrfTableKey.getRouteDistinguisher());
    Preconditions.checkNotNull(vpnInstance, "Vpn Instance not available " + vrfTableKey.getRouteDistinguisher());
    Preconditions.checkNotNull(vpnInstance.getVpnId(), "Vpn Instance with rd " + vpnInstance.getVrfId() + " has null vpnId!");
    final Collection<VpnToDpnList> vpnToDpnList = vpnInstance.getVpnToDpnList();
    if (vpnToDpnList != null) {
        for (VpnToDpnList vpnDpn : vpnToDpnList) {
            if (vpnDpn.getDpnState() == VpnToDpnList.DpnState.Active) {
                createRemoteFibEntry(vpnDpn.getDpnId(), vpnInstance.getVpnId(), vrfTableKey.getRouteDistinguisher(), vrfEntry, writeTx, subTxns);
            }
        }
    }
}
Also used : VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList)

Example 14 with VpnInstance

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance in project netvirt by opendaylight.

the class EvpnVrfEntryHandler method createRemoteEvpnFlows.

private void createRemoteEvpnFlows(String rd, VrfEntry vrfEntry, VpnInstanceOpDataEntry vpnInstance, List<BigInteger> localDpnId, VrfTablesKey vrfTableKey, boolean isNatPrefix) {
    LOG.info("Creating remote EVPN flows for prefix {} rd {} route-paths {} evi {}", vrfEntry.getDestPrefix(), rd, vrfEntry.getRoutePaths(), vrfEntry.getL3vni());
    List<VpnToDpnList> vpnToDpnList = vpnInstance.getVpnToDpnList();
    if (vpnToDpnList != null) {
        jobCoordinator.enqueueJob("FIB" + rd + vrfEntry.getDestPrefix(), () -> {
            WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
            List<ListenableFuture<Void>> futures = new ArrayList<>();
            for (VpnToDpnList vpnDpn : vpnToDpnList) {
                if (!localDpnId.contains(vpnDpn.getDpnId())) {
                    if (vpnDpn.getDpnState() == VpnToDpnList.DpnState.Active) {
                        createRemoteFibEntry(vpnDpn.getDpnId(), vpnInstance.getVpnId(), vrfTableKey, vrfEntry, isNatPrefix, tx);
                    }
                }
            }
            futures.add(tx.submit());
            return futures;
        });
    }
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList) ArrayList(java.util.ArrayList) ListenableFuture(com.google.common.util.concurrent.ListenableFuture)

Example 15 with VpnInstance

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance in project netvirt by opendaylight.

the class EvpnVrfEntryHandler method createFlows.

@Override
public void createFlows(InstanceIdentifier<VrfEntry> identifier, VrfEntry vrfEntry, String rd) {
    LOG.info("Initiating creation of Evpn Flows");
    final VrfTablesKey vrfTableKey = identifier.firstKeyOf(VrfTables.class);
    final VpnInstanceOpDataEntry vpnInstance = getFibUtil().getVpnInstanceOpData(vrfTableKey.getRouteDistinguisher()).get();
    Long vpnId = vpnInstance.getVpnId();
    Preconditions.checkNotNull(vpnInstance, "Vpn Instance not available " + vrfTableKey.getRouteDistinguisher());
    Preconditions.checkNotNull(vpnId, "Vpn Instance with rd " + vpnInstance.getVrfId() + " has null vpnId!");
    if (RouteOrigin.value(vrfEntry.getOrigin()) == RouteOrigin.CONNECTED) {
        SubnetRoute subnetRoute = vrfEntry.getAugmentation(SubnetRoute.class);
        final List<VpnToDpnList> vpnToDpnList = vpnInstance.getVpnToDpnList();
        final long elanTag = subnetRoute.getElantag();
        LOG.trace("SubnetRoute augmented vrfentry found for rd {} prefix {} with elantag {}", rd, vrfEntry.getDestPrefix(), elanTag);
        if (vpnToDpnList != null) {
            jobCoordinator.enqueueJob("FIB-" + rd + "-" + vrfEntry.getDestPrefix(), () -> {
                WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
                for (final VpnToDpnList curDpn : vpnToDpnList) {
                    if (curDpn.getDpnState() == VpnToDpnList.DpnState.Active) {
                        vrfEntryListener.installSubnetRouteInFib(curDpn.getDpnId(), elanTag, rd, vpnId, vrfEntry, tx);
                    }
                }
                List<ListenableFuture<Void>> futures = new ArrayList<>();
                futures.add(tx.submit());
                return futures;
            });
        }
        return;
    }
    Prefixes localNextHopInfo = getFibUtil().getPrefixToInterface(vpnInstance.getVpnId(), vrfEntry.getDestPrefix());
    List<BigInteger> localDpnId = new ArrayList<>();
    boolean isNatPrefix = false;
    if (Prefixes.PrefixCue.Nat.equals(localNextHopInfo.getPrefixCue())) {
        LOG.info("NAT Prefix {} with vpnId {} rd {}. Skip local dpn {} FIB processing", vrfEntry.getDestPrefix(), vpnId, rd, localNextHopInfo.getDpnId());
        localDpnId.add(localNextHopInfo.getDpnId());
        isNatPrefix = true;
    } else {
        localDpnId = createLocalEvpnFlows(vpnInstance.getVpnId(), rd, vrfEntry, localNextHopInfo);
    }
    createRemoteEvpnFlows(rd, vrfEntry, vpnInstance, localDpnId, vrfTableKey, isNatPrefix);
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) SubnetRoute(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRoute) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList) ArrayList(java.util.ArrayList) Prefixes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.prefix.to._interface.vpn.ids.Prefixes) VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) BigInteger(java.math.BigInteger)

Aggregations

ArrayList (java.util.ArrayList)39 VpnInstanceOpDataEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry)23 VpnInstance (org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance)19 BigInteger (java.math.BigInteger)18 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)17 VpnToDpnList (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList)16 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)15 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)14 ReadFailedException (org.opendaylight.controller.md.sal.common.api.data.ReadFailedException)14 VpnInterface (org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface)13 VpnInstanceNames (org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.vpn._interface.VpnInstanceNames)13 VpnInterfaceOpDataEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntry)13 VrfTablesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey)12 List (java.util.List)10 Routes (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.to.extraroutes.vpn.extra.routes.Routes)9 Optional (com.google.common.base.Optional)7 PostConstruct (javax.annotation.PostConstruct)7 Inject (javax.inject.Inject)7 Singleton (javax.inject.Singleton)7 DataBroker (org.opendaylight.controller.md.sal.binding.api.DataBroker)7