Search in sources :

Example 21 with VpnInterfaces

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces in project netvirt by opendaylight.

the class VpnFootprintService method removeOrUpdateVpnToDpnListForIpAddress.

private void removeOrUpdateVpnToDpnListForIpAddress(Uint32 vpnId, String rd, Uint64 dpnId, ImmutablePair<IpAddresses.IpAddressSource, String> ipAddressSourceValuePair, String vpnName) {
    AtomicBoolean lastDpnOnVpn = new AtomicBoolean(false);
    /* Starts synchronized block. This ensures only one reader/writer get access to vpn-dpn-list
         * The future.get ensures that the write to the datastore is complete before leaving the synchronized block.
         */
    // FIXME: separate this out somehow?
    final ReentrantLock lock = JvmGlobalLocks.getLockForString(vpnName);
    lock.lock();
    try {
        ListenableFuture<?> future = txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
            InstanceIdentifier<VpnToDpnList> id = VpnHelper.getVpnToDpnListIdentifier(rd, dpnId);
            Optional<VpnToDpnList> dpnInVpnOpt = tx.read(id).get();
            if (!dpnInVpnOpt.isPresent()) {
                LOG.error("removeOrUpdateVpnToDpnList: Could not find DpnToVpn map for VPN=[name={} " + "rd={} id={}] and dpnId={}", vpnName, rd, id, dpnId);
                return;
            }
            VpnToDpnList dpnInVpn = dpnInVpnOpt.get();
            List<IpAddresses> ipAddresses = new ArrayList<>(dpnInVpn.nonnullIpAddresses().values());
            if (ipAddresses == null) {
                LOG.info("Could not find ipAddresses for DpnInVpn map for VPN=[name={} rd={} id={}] " + "and dpnId={}", vpnName, rd, id, dpnId);
                return;
            }
            IpAddresses currIpAddress = new IpAddressesBuilder().withKey(new IpAddressesKey(ipAddressSourceValuePair.getValue())).setIpAddressSource(ipAddressSourceValuePair.getKey()).build();
            if (ipAddresses.remove(currIpAddress)) {
                if (ipAddresses.isEmpty()) {
                    Map<VpnInterfacesKey, VpnInterfaces> vpnInterfacesMap = dpnInVpn.nonnullVpnInterfaces();
                    VpnToDpnListBuilder dpnInVpnBuilder = new VpnToDpnListBuilder(dpnInVpn).setIpAddresses(Collections.<IpAddresses>emptyList());
                    if (vpnInterfacesMap == null || vpnInterfacesMap.isEmpty()) {
                        dpnInVpnBuilder.setDpnState(VpnToDpnList.DpnState.Inactive);
                        lastDpnOnVpn.set(true);
                    } else {
                        LOG.warn("ip addresses are empty but vpn interfaces are present for the vpn {} in " + "dpn {}", vpnName, dpnId);
                    }
                    tx.mergeParentStructurePut(id, dpnInVpnBuilder.build());
                } else {
                    tx.delete(id.child(IpAddresses.class, new IpAddressesKey(ipAddressSourceValuePair.getValue())));
                }
            }
        });
        future.get();
    } catch (InterruptedException | ExecutionException e) {
        LOG.error("Error removing from dpnToVpnList for vpn {} Ipaddress {} dpn {}", vpnName, ipAddressSourceValuePair.getValue(), dpnId, e);
        // TODO: Avoid this
        throw new RuntimeException(e.getMessage(), e);
    } finally {
        lock.unlock();
    }
    if (lastDpnOnVpn.get()) {
        LOG.debug("Sending cleanup event for dpn {} in VPN {}", dpnId, vpnName);
        fibManager.cleanUpDpnForVpn(dpnId, vpnId, rd, new DpnEnterExitVpnWorker(dpnId, vpnName, rd, false));
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) VpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfaces) 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) VpnInterfacesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfacesKey) VpnToDpnListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnListBuilder) IpAddresses(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddresses) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IpAddressesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddressesKey) IpAddressesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddressesBuilder) ExecutionException(java.util.concurrent.ExecutionException)

Example 22 with VpnInterfaces

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces in project netvirt by opendaylight.

the class VpnFootprintService method removeOrUpdateVpnToDpnListForInterfaceName.

private void removeOrUpdateVpnToDpnListForInterfaceName(Uint32 vpnId, String rd, Uint64 dpnId, String intfName, String vpnName) {
    AtomicBoolean lastDpnOnVpn = new AtomicBoolean(false);
    /* Starts synchronized block. This ensures only one reader/writer get access to vpn-dpn-list
         * The future.get ensures that the write to the datastore is complete before leaving the synchronized block.
         */
    // FIXME: separate this out somehow?
    final ReentrantLock lock = JvmGlobalLocks.getLockForString(vpnName);
    lock.lock();
    try {
        try {
            ListenableFuture<?> future = txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
                InstanceIdentifier<VpnToDpnList> id = VpnHelper.getVpnToDpnListIdentifier(rd, dpnId);
                Optional<VpnToDpnList> dpnInVpnOpt = tx.read(id).get();
                if (!dpnInVpnOpt.isPresent()) {
                    LOG.error("removeOrUpdateVpnToDpnList: Could not find DpnToVpn map for VPN=[name={}" + " rd={} id={}] and dpnId={}", vpnName, rd, id, dpnId);
                    return;
                }
                VpnToDpnList dpnInVpn = dpnInVpnOpt.get();
                List<VpnInterfaces> vpnInterfaces = new ArrayList<>(dpnInVpn.nonnullVpnInterfaces().values());
                if (vpnInterfaces == null) {
                    LOG.error("Could not find vpnInterfaces for DpnInVpn map for VPN=[name={} rd={} id={}] and " + "dpnId={}", vpnName, rd, id, dpnId);
                    return;
                }
                VpnInterfaces currVpnInterface = new VpnInterfacesBuilder().setInterfaceName(intfName).build();
                if (vpnInterfaces.remove(currVpnInterface)) {
                    if (vpnInterfaces.isEmpty()) {
                        Map<IpAddressesKey, IpAddresses> ipAddressesMap = dpnInVpn.nonnullIpAddresses();
                        VpnToDpnListBuilder dpnInVpnBuilder = new VpnToDpnListBuilder(dpnInVpn).setVpnInterfaces(Collections.emptyMap());
                        if (ipAddressesMap == null || ipAddressesMap.isEmpty()) {
                            dpnInVpnBuilder.setDpnState(VpnToDpnList.DpnState.Inactive);
                            lastDpnOnVpn.set(true);
                        } else {
                            LOG.error("removeOrUpdateVpnToDpnList: vpn interfaces are empty but ip addresses" + " are present for the vpn {} in dpn {} interface {}", vpnName, dpnId, intfName);
                        }
                        LOG.debug("removeOrUpdateVpnToDpnList: Removing vpn footprint for vpn {} vpnId {} " + "interface {}, on dpn {}", vpnName, vpnName, intfName, dpnId);
                        tx.mergeParentStructurePut(id, dpnInVpnBuilder.build());
                    } else {
                        tx.delete(id.child(VpnInterfaces.class, new VpnInterfacesKey(intfName)));
                        LOG.debug("removeOrUpdateVpnToDpnList: Updating vpn footprint for vpn {} vpnId {} " + "interface {}, on dpn {}", vpnName, vpnName, intfName, dpnId);
                    }
                }
            });
            future.get();
        } catch (InterruptedException | ExecutionException e) {
            LOG.error("removeOrUpdateVpnToDpnList: Error removing from dpnToVpnList for vpn {} vpnId {}" + " interface {} dpn {}", vpnName, vpnId, intfName, dpnId, e);
            throw new RuntimeException(e.getMessage(), e);
        }
        // Ends synchronized block
        LOG.info("removeOrUpdateVpnToDpnList: Updated/Removed vpn footprint for vpn {} vpnId {} interface {}," + " on dpn {}", vpnName, vpnName, intfName, dpnId);
        if (lastDpnOnVpn.get()) {
            fibManager.cleanUpDpnForVpn(dpnId, vpnId, rd, new DpnEnterExitVpnWorker(dpnId, vpnName, rd, false));
            LOG.info("removeOrUpdateVpnToDpnList: Sent cleanup event for dpn {} in VPN {} vpnId {} interface {}", dpnId, vpnName, vpnId, intfName);
        }
    } finally {
        lock.unlock();
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) VpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfaces) 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) VpnInterfacesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfacesKey) VpnToDpnListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnListBuilder) IpAddresses(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddresses) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IpAddressesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddressesKey) VpnInterfacesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfacesBuilder) ExecutionException(java.util.concurrent.ExecutionException)

Example 23 with VpnInterfaces

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces in project netvirt by opendaylight.

the class SubnetOpDpnManager method addInterfaceToDpn.

public SubnetToDpn addInterfaceToDpn(Uuid subnetId, Uint64 dpnId, String intfName) {
    SubnetToDpn subDpn = null;
    try {
        // Create and add SubnetOpDataEntry object for this subnet to the SubnetOpData container
        InstanceIdentifier<SubnetOpDataEntry> subOpIdentifier = InstanceIdentifier.builder(SubnetOpData.class).child(SubnetOpDataEntry.class, new SubnetOpDataEntryKey(subnetId)).build();
        // Please use a synchronize block here as we donot need a cluster-wide lock
        InstanceIdentifier<SubnetToDpn> dpnOpId = subOpIdentifier.child(SubnetToDpn.class, new SubnetToDpnKey(dpnId));
        Optional<SubnetToDpn> optionalSubDpn = SingleTransactionDataBroker.syncReadOptional(broker, LogicalDatastoreType.OPERATIONAL, dpnOpId);
        if (!optionalSubDpn.isPresent()) {
            // Create a new DPN Entry
            subDpn = addDpnToSubnet(subnetId, dpnId);
        } else {
            subDpn = optionalSubDpn.get();
        }
        SubnetToDpnBuilder subDpnBuilder = new SubnetToDpnBuilder(subDpn);
        Map<VpnInterfacesKey, VpnInterfaces> vpnInterfaceMap = new HashMap<>();
        vpnInterfaceMap = subDpnBuilder.getVpnInterfaces() != null ? new HashMap<>(subDpnBuilder.getVpnInterfaces()) : vpnInterfaceMap;
        VpnInterfaces vpnIntfs = new VpnInterfacesBuilder().withKey(new VpnInterfacesKey(intfName)).setInterfaceName(intfName).build();
        vpnInterfaceMap.put(vpnIntfs.key(), vpnIntfs);
        subDpnBuilder.setVpnInterfaces(vpnInterfaceMap);
        subDpn = subDpnBuilder.build();
        SingleTransactionDataBroker.syncWrite(broker, LogicalDatastoreType.OPERATIONAL, dpnOpId, subDpn, VpnUtil.SINGLE_TRANSACTION_BROKER_NO_RETRY);
        LOG.info("addInterfaceToDpn: Created SubnetToDpn entry for subnet {} with DPNId {} intfName {}", subnetId.getValue(), dpnId, intfName);
    } catch (TransactionCommitFailedException ex) {
        LOG.error("addInterfaceToDpn: Addition of Interface {} for SubnetToDpn on subnet {} with DPN {} failed", intfName, subnetId.getValue(), dpnId, ex);
    } catch (InterruptedException | ExecutionException e) {
        LOG.error("addInterfaceToDpn: Failed to read data store for interface {} subnet {} dpn {}", intfName, subnetId, dpnId);
    }
    return subDpn;
}
Also used : SubnetToDpnBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpnBuilder) VpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfaces) HashMap(java.util.HashMap) VpnInterfacesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfacesKey) SubnetOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.SubnetOpDataEntry) SubnetToDpn(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpn) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) SubnetOpDataEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.SubnetOpDataEntryKey) VpnInterfacesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfacesBuilder) SubnetToDpnKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpnKey) ExecutionException(java.util.concurrent.ExecutionException)

Example 24 with VpnInterfaces

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces in project netvirt by opendaylight.

the class VpnInterfaceManager method updateVpnInterfacesForUnProcessAdjancencies.

public void updateVpnInterfacesForUnProcessAdjancencies(String vpnName) {
    String primaryRd = vpnUtil.getVpnRd(vpnName);
    VpnInstanceOpDataEntry vpnInstanceOpData = vpnUtil.getVpnInstanceOpData(primaryRd);
    if (vpnInstanceOpData == null || vpnInstanceOpData.getVpnToDpnList() == null) {
        return;
    }
    List<VpnToDpnList> vpnToDpnLists = new ArrayList<>(vpnInstanceOpData.getVpnToDpnList().values());
    if (vpnToDpnLists == null || vpnToDpnLists.isEmpty()) {
        return;
    }
    LOG.debug("Update the VpnInterfaces for Unprocessed Adjancencies for vpnName:{}", vpnName);
    vpnToDpnLists.forEach(vpnToDpnList -> {
        if (vpnToDpnList.getVpnInterfaces() == null) {
            return;
        }
        vpnToDpnList.nonnullVpnInterfaces().values().forEach(vpnInterface -> {
            try {
                InstanceIdentifier<VpnInterfaceOpDataEntry> existingVpnInterfaceId = VpnUtil.getVpnInterfaceOpDataEntryIdentifier(vpnInterface.getInterfaceName(), vpnName);
                Optional<VpnInterfaceOpDataEntry> vpnInterfaceOptional = SingleTransactionDataBroker.syncReadOptional(dataBroker, LogicalDatastoreType.OPERATIONAL, existingVpnInterfaceId);
                if (!vpnInterfaceOptional.isPresent()) {
                    return;
                }
                List<Adjacency> configVpnAdjacencies = vpnUtil.getAdjacenciesForVpnInterfaceFromConfig(vpnInterface.getInterfaceName());
                if (configVpnAdjacencies == null) {
                    LOG.debug("There is no adjacency available for vpnInterface:{}", vpnInterface);
                    return;
                }
                List<Adjacency> operationVpnAdjacencies = new ArrayList<>(vpnInterfaceOptional.get().augmentation(AdjacenciesOp.class).nonnullAdjacency().values());
                // Due to insufficient rds,  some of the extra route wont get processed when it is added.
                // The unprocessed adjacencies will be present in config vpn interface DS but will be missing
                // in operational DS. These unprocessed adjacencies will be handled below.
                // To obtain unprocessed adjacencies, filtering is done by which the missing adjacencies in
                // operational DS are retrieved which is used to call addNewAdjToVpnInterface method.
                configVpnAdjacencies.stream().filter(adjacency -> operationVpnAdjacencies.stream().noneMatch(operationalAdjacency -> Objects.equals(operationalAdjacency.getIpAddress(), adjacency.getIpAddress()))).forEach(adjacency -> {
                    LOG.debug("Processing the vpnInterface{} for the Ajacency:{}", vpnInterface, adjacency);
                    jobCoordinator.enqueueJob("VPNINTERFACE-" + vpnInterface.getInterfaceName(), () -> {
                        // if the oper tx goes in
                        if (vpnUtil.isAdjacencyEligibleToVpn(adjacency, vpnName)) {
                            List<ListenableFuture<?>> futures = new ArrayList<>();
                            futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, operTx -> {
                                // set of prefix used, as entry in prefix-to-interface datastore
                                // is prerequisite for refresh Fib to avoid race condition leading
                                // to missing remote next hop in bucket actions on bgp-vpn delete
                                Set<String> prefixListForRefreshFib = new HashSet<>();
                                ListenableFuture<?> configTxFuture = txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> addNewAdjToVpnInterface(existingVpnInterfaceId, primaryRd, adjacency, vpnInterfaceOptional.get().getDpnId(), operTx, confTx, confTx, prefixListForRefreshFib));
                                Futures.addCallback(configTxFuture, new VpnInterfaceCallBackHandler(primaryRd, prefixListForRefreshFib), MoreExecutors.directExecutor());
                                futures.add(configTxFuture);
                            }));
                            return futures;
                        } else {
                            return emptyList();
                        }
                    });
                });
            } catch (InterruptedException | ExecutionException e) {
                LOG.error("updateVpnInterfacesForUnProcessAdjancencies: Failed to read data store for vpn {} rd {}", vpnName, primaryRd);
            }
        });
    });
}
Also used : StateTunnelList(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList) VpnInterfaceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntry) CacheProvider(org.opendaylight.infrautils.caches.CacheProvider) Map(java.util.Map) IBgpManager(org.opendaylight.netvirt.bgpmanager.api.IBgpManager) VpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces) LabelRouteInfoBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoBuilder) Set(java.util.Set) DpnVpninterfacesList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.router.dpn.list.DpnVpninterfacesList) VpnHelper(org.opendaylight.netvirt.vpnmanager.api.VpnHelper) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) TypedReadWriteTransaction(org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction) VpnInstanceOpData(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.VpnInstanceOpData) ArpResponderHandler(org.opendaylight.netvirt.vpnmanager.arp.responder.ArpResponderHandler) LabelRouteMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.LabelRouteMap) Adjacency(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.Adjacency) Uint64(org.opendaylight.yangtools.yang.common.Uint64) OdlInterfaceRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) VpnInterfaceOpDataEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntryKey) AdjacencyBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.AdjacencyBuilder) ArrayList(java.util.ArrayList) InstanceIdentifierBuilder(org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder) LabelRouteInfoKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoKey) RouterDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.RouterDpnList) RouterDpnListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.RouterDpnListKey) L3vpnInput(org.opendaylight.netvirt.vpnmanager.populator.input.L3vpnInput) RouterInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.RouterInterface) VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) AbstractAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener) VpnPopulator(org.opendaylight.netvirt.vpnmanager.populator.intfc.VpnPopulator) VrfTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTables) VpnInstanceNames(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.interfaces.vpn._interface.VpnInstanceNames) Adjacencies(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.Adjacencies) FutureCallback(com.google.common.util.concurrent.FutureCallback) ExecutionException(java.util.concurrent.ExecutionException) Futures(com.google.common.util.concurrent.Futures) Prefixes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.prefix.to._interface.vpn.ids.Prefixes) VpnToDpnList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList) VpnPortipToPort(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) LearntVpnVipToPort(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.learnt.vpn.vip.to.port.data.LearntVpnVipToPort) RouterInterfaceBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.RouterInterfaceBuilder) FibHelper(org.opendaylight.netvirt.fibmanager.api.FibHelper) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) IFibManager(org.opendaylight.netvirt.fibmanager.api.IFibManager) NeutronRouterDpns(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.NeutronRouterDpns) VpnInterfaceOpDataEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntryBuilder) FibEntries(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.FibEntries) LoggerFactory(org.slf4j.LoggerFactory) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) PreDestroy(javax.annotation.PreDestroy) Nullable(org.eclipse.jdt.annotation.Nullable) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) Routers(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers) NetworkType(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkAttributes.NetworkType) AdjacencyKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.AdjacencyKey) Subnets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.Subnets) VrfTablesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesBuilder) L3vpnRegistry(org.opendaylight.netvirt.vpnmanager.populator.registry.L3vpnRegistry) Collections.emptyList(java.util.Collections.emptyList) Predicate(java.util.function.Predicate) LabelRouteInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfo) Configuration(org.opendaylight.mdsal.binding.util.Datastore.Configuration) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) List(java.util.List) VrfEntryBase(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.VrfEntryBase) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) Optional(java.util.Optional) SubnetRoute(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRoute) AdjacenciesOp(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.AdjacenciesOp) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) VpnTarget(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTarget) AdjacencyType(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.Adjacency.AdjacencyType) VpnInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.interfaces.VpnInterface) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) NWUtil(org.opendaylight.genius.mdsalutil.NWUtil) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) VrfEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.vrfentries.VrfEntry) Singleton(javax.inject.Singleton) Iterators(com.google.common.collect.Iterators) HashSet(java.util.HashSet) Inject(javax.inject.Inject) InterfaceUtils(org.opendaylight.netvirt.vpnmanager.api.InterfaceUtils) Objects.requireNonNull(java.util.Objects.requireNonNull) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) InstanceIdDataObjectCache(org.opendaylight.genius.mdsalutil.cache.InstanceIdDataObjectCache) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) ReentrantLock(java.util.concurrent.locks.ReentrantLock) RouteOrigin(org.opendaylight.netvirt.fibmanager.api.RouteOrigin) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) Operational(org.opendaylight.mdsal.binding.util.Datastore.Operational) IVpnManager(org.opendaylight.netvirt.vpnmanager.api.IVpnManager) VpnInterfaceKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.interfaces.VpnInterfaceKey) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) Consumer(java.util.function.Consumer) DpnVpninterfacesListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.router.dpn.list.DpnVpninterfacesListKey) Collections(java.util.Collections) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) JvmGlobalLocks(org.opendaylight.genius.utils.JvmGlobalLocks) Set(java.util.Set) HashSet(java.util.HashSet) 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) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) AdjacenciesOp(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.AdjacenciesOp) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) Adjacency(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.Adjacency) VpnInterfaceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntry) ExecutionException(java.util.concurrent.ExecutionException)

Example 25 with VpnInterfaces

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInterfaces in project netvirt by opendaylight.

the class TunnelInterfaceStateListener method handleTunnelEventForDPN.

// TODO Clean up the exception handling
@SuppressWarnings("checkstyle:IllegalCatch")
private void handleTunnelEventForDPN(StateTunnelList stateTunnelList, TunnelAction tunnelAction) {
    final Uint64 srcDpnId = stateTunnelList.getSrcInfo() != null ? Uint64.valueOf(stateTunnelList.getSrcInfo().getTepDeviceId()).intern() : Uint64.ZERO;
    final String srcTepIp = stateTunnelList.getSrcInfo() != null ? stateTunnelList.getSrcInfo().getTepIp().stringValue() : "0";
    String destTepIp = stateTunnelList.getDstInfo() != null ? stateTunnelList.getDstInfo().getTepIp().stringValue() : "0";
    String rd;
    Uint64 remoteDpnId = null;
    boolean isTepDeletedOnDpn = false;
    LOG.info("handleTunnelEventForDPN: Handle tunnel event for srcDpn {} SrcTepIp {} DestTepIp {} ", srcDpnId, srcTepIp, destTepIp);
    int tunTypeVal = getTunnelType(stateTunnelList);
    LOG.trace("handleTunnelEventForDPN: tunTypeVal is {}", tunTypeVal);
    try {
        if (tunnelAction == TunnelAction.TUNNEL_EP_ADD) {
            LOG.info("handleTunnelEventForDPN: Tunnel ADD event received for Dpn {} VTEP Ip {} destTepIp {}", srcDpnId, srcTepIp, destTepIp);
            if (isTunnelInLogicalGroup(stateTunnelList)) {
                return;
            }
        } else if (tunnelAction == TunnelAction.TUNNEL_EP_DELETE) {
            LOG.info("handleTunnelEventForDPN: Tunnel DELETE event received for Dpn {} VTEP Ip {} DestTepIp {}", srcDpnId, srcTepIp, destTepIp);
            // When tunnel EP is deleted on a DPN , VPN gets two deletion event.
            // One for a DPN on which tunnel EP was deleted and another for other-end DPN.
            // Update the adj for the vpninterfaces for a DPN on which TEP is deleted.
            // Update the adj & VRF for the vpninterfaces for a DPN on which TEP is deleted.
            // Dont update the adj & VRF for vpninterfaces for a DPN on which TEP is not deleted.
            String endpointIpForDPN;
            try {
                endpointIpForDPN = InterfaceUtils.getEndpointIpAddressForDPN(dataBroker, srcDpnId);
            } catch (Exception e) {
                LOG.error("handleTunnelEventForDPN: Unable to resolve endpoint IP for srcDpn {}", srcDpnId);
                /* this dpn does not have the VTEP */
                endpointIpForDPN = null;
            }
            if (endpointIpForDPN == null) {
                LOG.info("handleTunnelEventForDPN: Tunnel TEP is deleted on Dpn {} VTEP Ip {} destTepIp {}", srcDpnId, srcTepIp, destTepIp);
                isTepDeletedOnDpn = true;
            }
        }
        // Get the list of VpnInterfaces from Intf Mgr for a SrcDPN on which TEP is added/deleted
        Future<RpcResult<GetDpnInterfaceListOutput>> result;
        List<Interfaces> srcDpninterfacelist = new ArrayList<>();
        List<Interfaces> destDpninterfacelist = new ArrayList<>();
        try {
            result = intfRpcService.getDpnInterfaceList(new GetDpnInterfaceListInputBuilder().setDpid(srcDpnId).build());
            RpcResult<GetDpnInterfaceListOutput> rpcResult = result.get();
            if (!rpcResult.isSuccessful()) {
                LOG.error("handleTunnelEventForDPN: RPC Call to GetDpnInterfaceList for srcDpnid {} srcTepIp {}" + " destTepIP {} returned with Errors {}", srcDpnId, srcTepIp, destTepIp, rpcResult.getErrors());
            } else {
                srcDpninterfacelist = rpcResult.getResult().nonnullInterfaces();
            }
        } catch (Exception e) {
            LOG.error("handleTunnelEventForDPN: Exception when querying for GetDpnInterfaceList for srcDpnid {}" + " srcTepIp {} destTepIp {}", srcDpnId, srcTepIp, destTepIp, e);
        }
        // Get the list of VpnInterfaces from Intf Mgr for a destDPN only for internal tunnel.
        if (tunTypeVal == VpnConstants.ITMTunnelLocType.Internal.getValue()) {
            remoteDpnId = Uint64.valueOf(stateTunnelList.getDstInfo() != null ? stateTunnelList.getDstInfo().getTepDeviceId() : "0").intern();
            try {
                result = intfRpcService.getDpnInterfaceList(new GetDpnInterfaceListInputBuilder().setDpid(remoteDpnId).build());
                RpcResult<GetDpnInterfaceListOutput> rpcResult = result.get();
                if (!rpcResult.isSuccessful()) {
                    LOG.error("handleTunnelEventForDPN: RPC Call to GetDpnInterfaceList for remoteDpnid {}" + " srcTepIP {} destTepIp {} returned with Errors {}", remoteDpnId, srcTepIp, destTepIp, rpcResult.getErrors());
                } else {
                    destDpninterfacelist = rpcResult.getResult().nonnullInterfaces();
                }
            } catch (Exception e) {
                LOG.error("handleTunnelEventForDPN: Exception when querying for GetDpnInterfaceList" + " for remoteDpnid {} srcTepIp {} destTepIp {}", remoteDpnId, srcTepIp, destTepIp, e);
            }
        }
        /*
             * Iterate over the list of VpnInterface for a SrcDpn on which TEP is added or deleted and read the adj.
             * Update the adjacencies with the updated nexthop.
             */
        List<Uuid> subnetList = new ArrayList<>();
        Map<Uint32, String> vpnIdRdMap = new HashMap<>();
        Set<String> listVpnName = new HashSet<>();
        for (Interfaces interfaces : srcDpninterfacelist) {
            if (!L2vlan.class.equals(interfaces.getInterfaceType())) {
                LOG.info("handleTunnelEventForDPN: Interface {} not of type L2Vlan", interfaces.getInterfaceName());
                continue;
            }
            String intfName = interfaces.getInterfaceName();
            VpnInterface vpnInterface = vpnUtil.getConfiguredVpnInterface(intfName);
            if (vpnInterface != null) {
                listVpnName.addAll(VpnHelper.getVpnInterfaceVpnInstanceNamesString(new ArrayList<VpnInstanceNames>(vpnInterface.nonnullVpnInstanceNames().values())));
                handleTunnelEventForDPNVpn(stateTunnelList, vpnIdRdMap, tunnelAction, isTepDeletedOnDpn, subnetList, TunnelEventProcessingMethod.POPULATESUBNETS, vpnInterface);
            }
        }
        /*
             * Iterate over the list of VpnInterface for destDPN and get the prefix .
             * Create remote rule for each of those prefix on srcDPN.
             */
        for (Interfaces interfaces : destDpninterfacelist) {
            if (!L2vlan.class.equals(interfaces.getInterfaceType())) {
                LOG.info("handleTunnelEventForDPN: Interface {} not of type L2Vlan", interfaces.getInterfaceName());
                continue;
            }
            String intfName = interfaces.getInterfaceName();
            VpnInterface vpnInterface = vpnUtil.getConfiguredVpnInterface(intfName);
            if (vpnInterface != null) {
                handleTunnelEventForDPNVpn(stateTunnelList, vpnIdRdMap, tunnelAction, isTepDeletedOnDpn, subnetList, TunnelEventProcessingMethod.MANAGEREMOTEROUTES, vpnInterface);
            }
        }
        // Iterate over the VpnId-to-Rd map.
        for (Map.Entry<Uint32, String> entry : vpnIdRdMap.entrySet()) {
            Uint32 vpnId = entry.getKey();
            rd = entry.getValue();
            if (tunnelAction == TunnelAction.TUNNEL_EP_ADD && tunTypeVal == VpnConstants.ITMTunnelLocType.External.getValue()) {
                fibManager.populateExternalRoutesOnDpn(srcDpnId, vpnId, rd, srcTepIp, destTepIp);
            } else if (tunnelAction == TunnelAction.TUNNEL_EP_DELETE && tunTypeVal == VpnConstants.ITMTunnelLocType.External.getValue()) {
                fibManager.cleanUpExternalRoutesOnDpn(srcDpnId, vpnId, rd, srcTepIp, destTepIp);
            }
        }
        if (listVpnName.size() >= 1) {
            if (tunnelAction == TunnelAction.TUNNEL_EP_ADD) {
                for (Uuid subnetId : subnetList) {
                    // Populate the List of subnets
                    vpnSubnetRouteHandler.updateSubnetRouteOnTunnelUpEvent(subnetId, srcDpnId);
                }
            }
            if (tunnelAction == TunnelAction.TUNNEL_EP_DELETE && isTepDeletedOnDpn) {
                for (Uuid subnetId : subnetList) {
                    // Populate the List of subnets
                    vpnSubnetRouteHandler.updateSubnetRouteOnTunnelDownEvent(subnetId, srcDpnId);
                }
            }
        }
        /*
             * Program the BGP routes of all the VPNs which have footprint on the source DPN.
             *
             * DC-GW LB groups are programmed in DJC Jobs, so DJC with same key is used here to make sure
             * groups are programmed first, then only BGP routes are programmed.
             */
        jobCoordinator.enqueueJob(FibHelper.getJobKeyForDcGwLoadBalancingGroup(srcDpnId), () -> {
            listVpnName.forEach(vpnName -> {
                Uint32 vpnId = vpnUtil.getVpnId(vpnName);
                final String vrfId = vpnIdRdMap.get(vpnId);
                if ((tunnelAction == TunnelAction.TUNNEL_EP_ADD) && (tunTypeVal == VpnConstants.ITMTunnelLocType.External.getValue())) {
                    fibManager.populateExternalRoutesOnDpn(srcDpnId, vpnId, vrfId, srcTepIp, destTepIp);
                }
            });
            return Collections.emptyList();
        }, RETRY_COUNT);
    } catch (RuntimeException e) {
        LOG.error("handleTunnelEventForDpn: Unable to handle the tunnel event for srcDpnId {} srcTepIp {}" + " remoteDpnId {} destTepIp {}", srcDpnId, srcTepIp, remoteDpnId, destTepIp, e);
    }
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) GetDpnInterfaceListOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpnInterfaceListOutput) Uint32(org.opendaylight.yangtools.yang.common.Uint32) HashSet(java.util.HashSet) L2vlan(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.L2vlan) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) ExecutionException(java.util.concurrent.ExecutionException) Interfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.get.dpn._interface.list.output.Interfaces) GetDpnInterfaceListInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetDpnInterfaceListInputBuilder) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) VpnInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.interfaces.VpnInterface) Map(java.util.Map) HashMap(java.util.HashMap) Uint64(org.opendaylight.yangtools.yang.common.Uint64)

Aggregations

ArrayList (java.util.ArrayList)14 ExecutionException (java.util.concurrent.ExecutionException)13 VpnInterfaces (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfaces)11 SubnetToDpn (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpn)9 SubnetToDpnBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpnBuilder)9 SubnetToDpnKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.SubnetToDpnKey)9 VpnInterfaces (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfaces)9 SubnetOpDataEntryKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.SubnetOpDataEntryKey)8 VpnToDpnListBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnListBuilder)8 VpnToDpnList (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList)7 HashMap (java.util.HashMap)6 TransactionCommitFailedException (org.opendaylight.mdsal.common.api.TransactionCommitFailedException)6 SubnetOpDataEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.SubnetOpDataEntry)6 VpnInterfacesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfacesBuilder)6 IpAddresses (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddresses)6 VpnInterfacesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfacesBuilder)6 VpnInterfacesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.subnet.op.data.entry.subnet.to.dpn.VpnInterfacesKey)5 IpAddressesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.IpAddressesKey)5 Collections (java.util.Collections)4 HashSet (java.util.HashSet)4