Search in sources :

Example 26 with Operational

use of org.opendaylight.mdsal.binding.util.Datastore.Operational in project netvirt by opendaylight.

the class VpnInstanceListener method addVpnInstance.

// TODO Clean up the exception handling
@SuppressWarnings("checkstyle:IllegalCatch")
private void addVpnInstance(VpnInstance value, TypedWriteTransaction<Configuration> writeConfigTxn, TypedWriteTransaction<Operational> writeOperTxn) {
    if (writeConfigTxn == null) {
        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> addVpnInstance(value, tx, writeOperTxn)), LOG, "Error adding VPN instance {}", value);
        return;
    }
    if (writeOperTxn == null) {
        LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> addVpnInstance(value, writeConfigTxn, tx)), LOG, "Error adding VPN instance {}", value);
        return;
    }
    String vpnInstanceName = value.getVpnInstanceName();
    Uint32 vpnId = vpnUtil.getUniqueId(VpnConstants.VPN_IDPOOL_NAME, vpnInstanceName);
    if (vpnId.longValue() == 0) {
        LOG.error("{} addVpnInstance: Unable to fetch label from Id Manager. Bailing out of adding operational" + " data for Vpn Instance {}", LOGGING_PREFIX_ADD, value.getVpnInstanceName());
        return;
    }
    LOG.info("{} addVpnInstance: VPN Id {} generated for VpnInstanceName {}", LOGGING_PREFIX_ADD, vpnId, vpnInstanceName);
    String primaryRd = VpnUtil.getPrimaryRd(value);
    org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance vpnInstanceToVpnId = VpnUtil.getVpnInstanceToVpnId(vpnInstanceName, vpnId, primaryRd);
    writeConfigTxn.mergeParentStructurePut(VpnOperDsUtils.getVpnInstanceToVpnIdIdentifier(vpnInstanceName), vpnInstanceToVpnId);
    VpnIds vpnIdToVpnInstance = VpnUtil.getVpnIdToVpnInstance(vpnId, value.getVpnInstanceName(), primaryRd, VpnUtil.isBgpVpn(vpnInstanceName, primaryRd));
    writeConfigTxn.mergeParentStructurePut(VpnUtil.getVpnIdToVpnInstanceIdentifier(vpnId), vpnIdToVpnInstance);
    try {
        String cachedTransType = fibManager.getConfTransType();
        if (cachedTransType.equals("Invalid")) {
            try {
                fibManager.setConfTransType("L3VPN", "VXLAN");
            } catch (Exception e) {
                LOG.error("{} addVpnInstance: Exception caught setting the L3VPN tunnel transportType for vpn {}", LOGGING_PREFIX_ADD, vpnInstanceName, e);
            }
        } else {
            LOG.debug("{} addVpnInstance: Configured tunnel transport type for L3VPN {} as {}", LOGGING_PREFIX_ADD, vpnInstanceName, cachedTransType);
        }
    } catch (Exception e) {
        LOG.error("{} addVpnInstance: Error when trying to retrieve tunnel transport type for L3VPN {}", LOGGING_PREFIX_ADD, vpnInstanceName, e);
    }
    VpnInstanceOpDataEntryBuilder builder = new VpnInstanceOpDataEntryBuilder().setVrfId(primaryRd).setVpnId(vpnId).setVpnInstanceName(vpnInstanceName).setVpnState(VpnInstanceOpDataEntry.VpnState.Created);
    if (VpnUtil.isBgpVpn(vpnInstanceName, primaryRd)) {
        List<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTarget> opVpnTargetList = new ArrayList<>();
        if (value.getL3vni() != null) {
            builder.setL3vni(value.getL3vni());
        }
        if (value.isL2vpn()) {
            builder.setType(VpnInstanceOpDataEntry.Type.L2);
        }
        VpnTargets vpnTargets = value.getVpnTargets();
        if (vpnTargets != null) {
            @Nullable Map<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.vpntargets.VpnTargetKey, VpnTarget> vpnTargetListMap = vpnTargets.nonnullVpnTarget();
            if (vpnTargetListMap != null) {
                for (VpnTarget vpnTarget : vpnTargetListMap.values()) {
                    VpnTargetBuilder vpnTargetBuilder = new VpnTargetBuilder().withKey(new VpnTargetKey(vpnTarget.key().getVrfRTValue())).setVrfRTType(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTarget.VrfRTType.forValue(vpnTarget.getVrfRTType().getIntValue())).setVrfRTValue(vpnTarget.getVrfRTValue());
                    opVpnTargetList.add(vpnTargetBuilder.build());
                }
            }
        }
        VpnTargetsBuilder vpnTargetsBuilder = new VpnTargetsBuilder().setVpnTarget(opVpnTargetList);
        builder.setVpnTargets(vpnTargetsBuilder.build());
        List<String> rds = value.getRouteDistinguisher();
        builder.setRd(rds);
    }
    // Get BGP-VPN type configured details from config vpn-instance
    builder.setBgpvpnType(VpnInstanceOpDataEntry.BgpvpnType.forValue(value.getBgpvpnType().getIntValue()));
    writeOperTxn.mergeParentStructureMerge(VpnUtil.getVpnInstanceOpDataIdentifier(primaryRd), builder.build());
    LOG.info("{} addVpnInstance: VpnInstanceOpData populated successfully for vpn {} rd {}", LOGGING_PREFIX_ADD, vpnInstanceName, primaryRd);
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) VpnInstances(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) IFibManager(org.opendaylight.netvirt.fibmanager.api.IFibManager) Arrays(java.util.Arrays) LoggerFactory(org.slf4j.LoggerFactory) DcGatewayIpKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.dc.gateway.ip.list.DcGatewayIpKey) VpnInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance) PreDestroy(javax.annotation.PreDestroy) ExternalTunnel(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel) Nullable(org.eclipse.jdt.annotation.Nullable) VpnTargetsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnTargetsBuilder) DcGatewayIp(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.dc.gateway.ip.list.DcGatewayIp) Map(java.util.Map) IBgpManager(org.opendaylight.netvirt.bgpmanager.api.IBgpManager) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) DcGatewayIpList(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.DcGatewayIpList) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) VpnIds(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.id.to.vpn.instance.VpnIds) Collection(java.util.Collection) Configuration(org.opendaylight.mdsal.binding.util.Datastore.Configuration) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) Objects(java.util.Objects) ExternalTunnelKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnelKey) List(java.util.List) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) AddressFamily(org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.AddressFamily) Optional(java.util.Optional) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) NWUtil(org.opendaylight.genius.mdsalutil.NWUtil) Uint64(org.opendaylight.yangtools.yang.common.Uint64) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) Callable(java.util.concurrent.Callable) VpnTargetBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetBuilder) Singleton(javax.inject.Singleton) InstructionWriteMetadata(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata) ArrayList(java.util.ArrayList) VpnTarget(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.vpntargets.VpnTarget) Inject(javax.inject.Inject) MatchTunnelId(org.opendaylight.genius.mdsalutil.matches.MatchTunnelId) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) ExternalTunnelList(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.ExternalTunnelList) VpnTargets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.VpnTargets) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) ReentrantLock(java.util.concurrent.locks.ReentrantLock) AbstractAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Operational(org.opendaylight.mdsal.binding.util.Datastore.Operational) VrfTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTables) VpnTargetKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetKey) SystemPropertyReader(org.opendaylight.genius.utils.SystemPropertyReader) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) FutureCallback(com.google.common.util.concurrent.FutureCallback) VpnInstanceOpDataEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntryBuilder) ExecutionException(java.util.concurrent.ExecutionException) Futures(com.google.common.util.concurrent.Futures) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) Collections(java.util.Collections) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) JvmGlobalLocks(org.opendaylight.genius.utils.JvmGlobalLocks) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) VpnTargetKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetKey) ArrayList(java.util.ArrayList) VpnTarget(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.vpntargets.VpnTarget) VpnTargetBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetBuilder) VpnInstanceOpDataEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntryBuilder) VpnIds(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.id.to.vpn.instance.VpnIds) Uint32(org.opendaylight.yangtools.yang.common.Uint32) VpnTargets(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.VpnTargets) ExecutionException(java.util.concurrent.ExecutionException) VpnTargetsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnTargetsBuilder) Nullable(org.eclipse.jdt.annotation.Nullable)

Example 27 with Operational

use of org.opendaylight.mdsal.binding.util.Datastore.Operational 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 28 with Operational

use of org.opendaylight.mdsal.binding.util.Datastore.Operational in project netvirt by opendaylight.

the class AclServiceUtils method addAclPortsLookup.

public void addAclPortsLookup(AclInterface port, List<Uuid> aclList, List<AllowedAddressPairs> allowedAddresses) {
    String portId = port.getInterfaceId();
    LOG.trace("Adding AclPortsLookup for port={}, acls={}, AAPs={}", portId, aclList, allowedAddresses);
    if (aclList == null || allowedAddresses == null || allowedAddresses.isEmpty()) {
        LOG.warn("aclList or allowedAddresses is null. port={}, acls={}, AAPs={}", portId, aclList, allowedAddresses);
        return;
    }
    for (Uuid aclId : aclList) {
        String aclName = aclId.getValue();
        jobCoordinator.enqueueJob(aclName, () -> {
            List<ListenableFuture<?>> futures = new ArrayList<>();
            futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
                for (AllowedAddressPairs aap : allowedAddresses) {
                    PortIds portIdObj = new PortIdsBuilder().withKey(new PortIdsKey(portId)).setPortId(portId).build();
                    InstanceIdentifier<PortIds> path = AclServiceUtils.getPortIdsPathInAclPortsLookup(aclName, aap.getIpAddress(), portId);
                    tx.mergeParentStructurePut(path, portIdObj);
                }
            }));
            return futures;
        });
    }
}
Also used : MatchIpv4Source(org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source) Acl(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl) Ipv4Acl(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.Ipv4Acl) MatchEthernetDestination(org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination) InetAddress(java.net.InetAddress) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) AllowedAddressPairs(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.AllowedAddressPairs) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) Map(java.util.Map) BigInteger(java.math.BigInteger) AclKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.AclKey) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) NxMatchRegister(org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister) MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) BoundServices(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices) Set(java.util.Set) BoundServicesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServicesKey) MatchUdpSourcePort(org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort) Interfaces(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces) NxCtAction(org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack.NxCtAction) MatchIpv6Destination(org.opendaylight.genius.mdsalutil.matches.MatchIpv6Destination) ServicesInfoKey(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.ServicesInfoKey) BoundServicesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServicesBuilder) PortIdsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIdsBuilder) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) PortIdsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIdsKey) AceIp(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.ace.matches.ace.type.AceIp) NonNull(org.eclipse.jdt.annotation.NonNull) ElanInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface) AclserviceAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.AclserviceAugmentation) IpPrefixOrAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.IpPrefixOrAddressBuilder) Uint64(org.opendaylight.yangtools.yang.common.Uint64) ServicesInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.ServicesInfo) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) MatchInfoBase(org.opendaylight.genius.mdsalutil.MatchInfoBase) ServiceModeBase(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase) ServiceTypeFlowBased(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceTypeFlowBased) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) MatchIpv4Destination(org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination) InstanceIdentifierBuilder(org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder) Lists(com.google.common.collect.Lists) AclPortsByIpKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.AclPortsByIpKey) MatchArpSpa(org.opendaylight.genius.mdsalutil.matches.MatchArpSpa) AccessListEntries(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.AccessListEntries) DirectionBase(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.DirectionBase) MatchIpProtocol(org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol) AclInterface(org.opendaylight.netvirt.aclservice.api.utils.AclInterface) AccessLists(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.AccessLists) StypeOpenflowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.StypeOpenflowBuilder) Ace(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) ActionNxConntrack(org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IpPrefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix) ElanInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInterfaces) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) IpPrefixOrAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.IpPrefixOrAddress) InetAddresses(com.google.common.net.InetAddresses) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) PortIds(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIds) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) InterfacesState(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState) SortedSet(java.util.SortedSet) MatchUdpDestinationPort(org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort) LoggerFactory(org.slf4j.LoggerFactory) InterfaceAcl(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.InterfaceAcl) AclserviceConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.config.rev160806.AclserviceConfig) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) AclPortsLookup(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.AclPortsLookup) ReadTransaction(org.opendaylight.mdsal.binding.api.ReadTransaction) Nullable(org.eclipse.jdt.annotation.Nullable) NxmNxReg6(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) ElanInstanceKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceKey) MatchCriteria(org.opendaylight.netvirt.aclservice.api.AclServiceManager.MatchCriteria) NetvirtAcl(org.opendaylight.yang.gen.v1.urn.opendaylight.serviceutils.srm.types.rev180626.NetvirtAcl) Collection(java.util.Collection) Ipv6Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions) IPProtocols(org.opendaylight.genius.mdsalutil.packet.IPProtocols) Matches(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.ace.Matches) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) Objects(java.util.Objects) List(java.util.List) SubnetInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.SubnetInfo) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) Optional(java.util.Optional) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) MatchIpv6Source(org.opendaylight.genius.mdsalutil.matches.MatchIpv6Source) Singleton(javax.inject.Singleton) InstructionWriteMetadata(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata) ServiceBindings(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceBindings) HashSet(java.util.HashSet) Inject(javax.inject.Inject) MatchIcmpv6(org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6) AclIpPrefixesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.AclIpPrefixesKey) MatchEthernetType(org.opendaylight.genius.mdsalutil.matches.MatchEthernetType) SecurityRuleAttr(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.SecurityRuleAttr) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) ElanInstances(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances) ServiceModeEgress(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeEgress) IpVersionV6(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.IpVersionV6) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) ElanInterfaceKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceKey) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) Operational(org.opendaylight.mdsal.binding.util.Datastore.Operational) AclPortsByIp(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.AclPortsByIp) AclIpPrefixes(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.AclIpPrefixes) InterfaceKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey) Collections(java.util.Collections) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) ArrayList(java.util.ArrayList) PortIdsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIdsKey) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) AllowedAddressPairs(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.AllowedAddressPairs) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) PortIds(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIds) PortIdsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.acl.ports.lookup.acl.ports.by.ip.acl.ip.prefixes.PortIdsBuilder)

Example 29 with Operational

use of org.opendaylight.mdsal.binding.util.Datastore.Operational in project netvirt by opendaylight.

the class ElanInterfaceManager method removeEntriesForElanInterface.

List<ListenableFuture<?>> removeEntriesForElanInterface(ElanInstance elanInfo, InterfaceInfo interfaceInfo, String interfaceName, boolean isLastElanInterface) {
    String elanName = elanInfo.getElanInstanceName();
    EVENT_LOGGER.debug("ELAN-InterfaceEntries, REMOVE {} Instance {}", interfaceName, elanName);
    List<ListenableFuture<?>> futures = new ArrayList<>();
    futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, flowTx -> {
        futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, interfaceTx -> {
            InstanceIdentifier<ElanInterfaceMac> elanInterfaceId = ElanUtils.getElanInterfaceMacEntriesOperationalDataPath(interfaceName);
            Optional<ElanInterfaceMac> existingElanInterfaceMac = interfaceTx.read(elanInterfaceId).get();
            LOG.debug("Removing the Interface:{} from elan:{}", interfaceName, elanName);
            if (interfaceInfo != null) {
                if (existingElanInterfaceMac.isPresent()) {
                    Map<MacEntryKey, MacEntry> existingMacEntries = existingElanInterfaceMac.get().nonnullMacEntry();
                    if (existingMacEntries != null) {
                        List<PhysAddress> macAddresses = new ArrayList<>();
                        for (MacEntry macEntry : existingMacEntries.values()) {
                            PhysAddress macAddress = macEntry.getMacAddress();
                            LOG.debug("removing the  mac-entry:{} present on elanInterface:{}", macAddress.getValue(), interfaceName);
                            Optional<MacEntry> macEntryOptional = elanUtils.getMacEntryForElanInstance(interfaceTx, elanName, macAddress);
                            if (!isLastElanInterface && macEntryOptional.isPresent()) {
                                interfaceTx.delete(ElanUtils.getMacEntryOperationalDataPath(elanName, macAddress));
                            }
                            EVENT_LOGGER.debug("ELAN-MacFlows, REMOVE {} Instance {} Mac {}", interfaceName, elanName, macAddress);
                            elanUtils.deleteMacFlows(elanInfo, interfaceInfo, macEntry, flowTx);
                            macAddresses.add(macAddress);
                        }
                        // to this ELAN
                        if (isVxlanNetworkOrVxlanSegment(elanInfo) && !macAddresses.isEmpty()) {
                            elanL2GatewayUtils.removeMacsFromElanExternalDevices(elanInfo, macAddresses);
                        }
                    }
                }
                removeDefaultTermFlow(interfaceInfo.getDpId(), interfaceInfo.getInterfaceTag());
                removeFilterEqualsTable(elanInfo, interfaceInfo, flowTx);
            } else if (existingElanInterfaceMac.isPresent()) {
                // Interface does not exist in ConfigDS, so lets remove everything
                // about that interface related to Elan
                Map<MacEntryKey, MacEntry> macEntries = existingElanInterfaceMac.get().nonnullMacEntry();
                if (macEntries != null) {
                    for (MacEntry macEntry : macEntries.values()) {
                        PhysAddress macAddress = macEntry.getMacAddress();
                        if (elanUtils.getMacEntryForElanInstance(elanName, macAddress).isPresent()) {
                            interfaceTx.delete(ElanUtils.getMacEntryOperationalDataPath(elanName, macAddress));
                        }
                    }
                }
            }
            if (existingElanInterfaceMac.isPresent()) {
                interfaceTx.delete(elanInterfaceId);
            }
            unbindService(interfaceName, flowTx);
            deleteElanInterfaceFromConfigDS(interfaceName, flowTx);
        }));
    }));
    return futures;
}
Also used : MacTableKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.forwarding.tables.MacTableKey) ActionDrop(org.opendaylight.genius.mdsalutil.actions.ActionDrop) ElanForwardingTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanForwardingTables) StringUtils(org.apache.commons.lang3.StringUtils) ElanServiceRecoveryHandler(org.opendaylight.netvirt.elan.recovery.impl.ElanServiceRecoveryHandler) RecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener) ServiceIndex(org.opendaylight.genius.utils.ServiceIndex) Map(java.util.Map) DpnInterfacesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfacesBuilder) BigInteger(java.math.BigInteger) Bucket(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress) MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) BoundServices(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices) MacTable(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.forwarding.tables.MacTable) Elan(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.state.Elan) GroupId(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId) Set(java.util.Set) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) InstructionWriteActions(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions) EtreeInterfaceType(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeInterface.EtreeInterfaceType) RemoteMcastMacs(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) TypedReadWriteTransaction(org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction) ElanInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface) ActionSetFieldTunnelId(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldTunnelId) EtreeInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeInstance) ElanL2GatewayMulticastUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils) Uint64(org.opendaylight.yangtools.yang.common.Uint64) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) MatchInfoBase(org.opendaylight.genius.mdsalutil.MatchInfoBase) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) DpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfaces) FlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder) INeutronVpnManager(org.opendaylight.netvirt.neutronvpn.interfaces.INeutronVpnManager) ArrayList(java.util.ArrayList) GroupKey(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey) MacEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryBuilder) ElanDpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanDpnInterfaces) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) EtreeInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeInterface) StaticMacEntriesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntriesKey) InterfaceInfo(org.opendaylight.genius.interfacemanager.globals.InterfaceInfo) ActionGroup(org.opendaylight.genius.mdsalutil.actions.ActionGroup) AbstractAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractAsyncDataTreeChangeListener) ExecutionException(java.util.concurrent.ExecutionException) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) ElanInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInterfaces) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) GroupTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) L2GatewayDevice(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) ElanItmUtils(org.opendaylight.netvirt.elan.utils.ElanItmUtils) ElanL2GwCacheUtils(org.opendaylight.netvirt.elanmanager.utils.ElanL2GwCacheUtils) Acquired(org.opendaylight.infrautils.utils.concurrent.NamedSimpleReentrantLock.Acquired) ElanConstants(org.opendaylight.netvirt.elan.utils.ElanConstants) LoggerFactory(org.slf4j.LoggerFactory) ElanInterfaceCache(org.opendaylight.netvirt.elan.cache.ElanInterfaceCache) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) PreDestroy(javax.annotation.PreDestroy) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) ExternalTunnel(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel) ElanDpnInterfacesList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.ElanDpnInterfacesList) ElanDpnInterfacesListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.ElanDpnInterfacesListKey) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) NxmNxReg1(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg1) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) Collections.emptyList(java.util.Collections.emptyList) Configuration(org.opendaylight.mdsal.binding.util.Datastore.Configuration) NeutronUtils(org.opendaylight.netvirt.neutronvpn.api.utils.NeutronUtils) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ElanForwardingEntriesHandler(org.opendaylight.netvirt.elan.utils.ElanForwardingEntriesHandler) LoggingFutures.addErrorLogging(org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging) ElanKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.state.ElanKey) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) Objects(java.util.Objects) List(java.util.List) ElanL2GatewayUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) FlowEntityBuilder(org.opendaylight.genius.mdsalutil.FlowEntityBuilder) Optional(java.util.Optional) Queue(java.util.Queue) ElanInterfaceMac(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan._interface.forwarding.entries.ElanInterfaceMac) ElanUtils.isVxlanNetworkOrVxlanSegment(org.opendaylight.netvirt.elan.utils.ElanUtils.isVxlanNetworkOrVxlanSegment) InstructionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ElanEtreeUtils(org.opendaylight.netvirt.elan.utils.ElanEtreeUtils) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) HashMap(java.util.HashMap) Singleton(javax.inject.Singleton) InstructionWriteMetadata(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata) FlowId(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) MacEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryKey) DpnInterfacesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfacesKey) HashSet(java.util.HashSet) Inject(javax.inject.Inject) NodeId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId) MatchTunnelId(org.opendaylight.genius.mdsalutil.matches.MatchTunnelId) Objects.requireNonNull(java.util.Objects.requireNonNull) ActionRegLoad(org.opendaylight.genius.mdsalutil.actions.ActionRegLoad) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) ReentrantLock(java.util.concurrent.locks.ReentrantLock) ElanHelper(org.opendaylight.netvirt.elanmanager.api.ElanHelper) Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group) StaticMacEntries(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntries) ElanInstanceCache(org.opendaylight.netvirt.elan.cache.ElanInstanceCache) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) Operational(org.opendaylight.mdsal.binding.util.Datastore.Operational) EtreeLeafTagName(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeLeafTagName) ServiceRecoveryRegistry(org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) Port(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port) ElanBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.state.ElanBuilder) ElanInstanceBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceBuilder) ITMConstants(org.opendaylight.genius.itm.globals.ITMConstants) Collections(java.util.Collections) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) FluentFuture(com.google.common.util.concurrent.FluentFuture) JvmGlobalLocks(org.opendaylight.genius.utils.JvmGlobalLocks) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) ArrayList(java.util.ArrayList) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ElanInterfaceMac(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan._interface.forwarding.entries.ElanInterfaceMac) MacEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryKey) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress)

Example 30 with Operational

use of org.opendaylight.mdsal.binding.util.Datastore.Operational in project netvirt by opendaylight.

the class ElanPacketInHandler method enqueueJobForDPNSpecificTasks.

private void enqueueJobForDPNSpecificTasks(final String macAddress, final Uint32 elanTag, String interfaceName, PhysAddress physAddress, ElanInstance elanInstance, InterfaceInfo interfaceInfo, MacEntry oldMacEntry, MacEntry newMacEntry, boolean isVlanOrFlatProviderIface) {
    jobCoordinator.enqueueJob(getElanMacDPNKey(elanTag, macAddress, interfaceInfo.getDpId()), () -> {
        macMigrationFlowsCleanup(interfaceName, elanInstance, oldMacEntry, isVlanOrFlatProviderIface);
        Uint64 dpId = interfaceManager.getDpnForInterface(interfaceName);
        elanL2GatewayUtils.scheduleAddDpnMacInExtDevices(elanInstance.getElanInstanceName(), dpId, Collections.singletonList(physAddress));
        elanManagerCounters.unknownSmacPktinLearned();
        List<ListenableFuture<?>> futures = new ArrayList<>();
        futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
            futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, operTx -> {
                elanUtils.setupMacFlows(elanInstance, interfaceInfo, elanInstance.getMacTimeout().toJava(), macAddress, !isVlanOrFlatProviderIface, tx);
                InstanceIdentifier<MacEntry> macEntryId = ElanUtils.getInterfaceMacEntriesIdentifierOperationalDataPath(interfaceName, physAddress);
                operTx.mergeParentStructurePut(macEntryId, newMacEntry);
            }));
        }));
        return futures;
    });
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) NWUtil(org.opendaylight.genius.mdsalutil.NWUtil) Uint64(org.opendaylight.yangtools.yang.common.Uint64) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) PacketProcessingListener(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener) LoggerFactory(org.slf4j.LoggerFactory) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) Singleton(javax.inject.Singleton) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) MacEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryKey) PacketInReason(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketInReason) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) MacEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryBuilder) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) BigInteger(java.math.BigInteger) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) InterfaceInfo(org.opendaylight.genius.interfacemanager.globals.InterfaceInfo) NoMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.NoMatch) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) ElanInstanceCache(org.opendaylight.netvirt.elan.cache.ElanInstanceCache) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) IfIndexInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.meta.rev160406._if.indexes._interface.map.IfIndexInterface) Ethernet(org.opendaylight.genius.mdsalutil.packet.Ethernet) EvpnUtils(org.opendaylight.netvirt.elan.evpn.utils.EvpnUtils) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) Objects(java.util.Objects) List(java.util.List) ElanL2GatewayUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) ElanTagName(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.tag.name.map.ElanTagName) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) Optional(java.util.Optional) ElanInterfaceMac(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan._interface.forwarding.entries.ElanInterfaceMac) PacketException(org.opendaylight.openflowplugin.libraries.liblldp.PacketException) Collections(java.util.Collections) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) PacketReceived(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) ArrayList(java.util.ArrayList) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) Uint64(org.opendaylight.yangtools.yang.common.Uint64)

Aggregations

OPERATIONAL (org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL)32 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)32 Logger (org.slf4j.Logger)32 LoggerFactory (org.slf4j.LoggerFactory)32 DataBroker (org.opendaylight.mdsal.binding.api.DataBroker)31 ManagedNewTransactionRunner (org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner)31 ManagedNewTransactionRunnerImpl (org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl)31 Singleton (javax.inject.Singleton)30 Inject (javax.inject.Inject)29 LogicalDatastoreType (org.opendaylight.mdsal.common.api.LogicalDatastoreType)28 ArrayList (java.util.ArrayList)26 List (java.util.List)26 CONFIGURATION (org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION)26 Optional (java.util.Optional)23 Uint64 (org.opendaylight.yangtools.yang.common.Uint64)22 Collections (java.util.Collections)21 ExecutionException (java.util.concurrent.ExecutionException)20 JobCoordinator (org.opendaylight.infrautils.jobcoordinator.JobCoordinator)20 PreDestroy (javax.annotation.PreDestroy)19 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)18