Search in sources :

Example 36 with Configuration

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

the class ElanInterfaceManager method setupEntriesForElanInterface.

@SuppressWarnings("checkstyle:ForbidCertainMethod")
List<ListenableFuture<?>> setupEntriesForElanInterface(ElanInstance elanInstance, ElanInterface elanInterface, InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn) {
    String elanInstanceName = elanInstance.getElanInstanceName();
    String interfaceName = elanInterface.getName();
    List<ListenableFuture<?>> futures = new ArrayList<>();
    Uint64 dpId = interfaceInfo.getDpId();
    boolean isInterfaceOperational = isOperational(interfaceInfo);
    futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
        futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, operTx -> {
            installEntriesForElanInterface(elanInstance, elanInterface, interfaceInfo, isFirstInterfaceInDpn, confTx);
            Map<StaticMacEntriesKey, StaticMacEntries> staticMacEntriesMap = elanInterface.nonnullStaticMacEntries();
            List<PhysAddress> staticMacAddresses = new ArrayList<>();
            if (ElanUtils.isNotEmpty(staticMacEntriesMap.values())) {
                for (StaticMacEntries staticMacEntry : staticMacEntriesMap.values()) {
                    InstanceIdentifier<MacEntry> macId = getMacEntryOperationalDataPath(elanInstanceName, staticMacEntry.getMacAddress());
                    Optional<MacEntry> existingMacEntry = ElanUtils.read(broker, LogicalDatastoreType.OPERATIONAL, macId);
                    if (existingMacEntry.isPresent()) {
                        elanForwardingEntriesHandler.updateElanInterfaceForwardingTablesList(elanInstanceName, interfaceName, existingMacEntry.get().getInterface(), existingMacEntry.get(), operTx);
                    } else {
                        elanForwardingEntriesHandler.addElanInterfaceForwardingTableList(elanInstanceName, interfaceName, staticMacEntry, operTx);
                    }
                    if (isInterfaceOperational) {
                        // Setting SMAC, DMAC, UDMAC in this DPN and also in other
                        // DPNs
                        String macAddress = staticMacEntry.getMacAddress().getValue();
                        LOG.info("programming smac and dmacs for {} on source and other DPNs for elan {} and interface" + " {}", macAddress, elanInstanceName, interfaceName);
                        EVENT_LOGGER.debug("ELAN-MacFlows, ADD {} Instance {} Mac {}", interfaceName, elanInstanceName, macAddress);
                        elanUtils.setupMacFlows(elanInstance, interfaceInfo, ElanConstants.STATIC_MAC_TIMEOUT, staticMacEntry.getMacAddress().getValue(), true, confTx);
                    }
                }
                if (isInterfaceOperational) {
                    // on purpose.
                    for (StaticMacEntries staticMacEntry : staticMacEntriesMap.values()) {
                        staticMacAddresses.add(staticMacEntry.getMacAddress());
                    }
                    elanL2GatewayUtils.scheduleAddDpnMacInExtDevices(elanInstance.getElanInstanceName(), dpId, staticMacAddresses);
                }
            }
        }));
    }));
    futures.forEach(ElanUtils::waitForTransactionToComplete);
    if (isInterfaceOperational && !interfaceManager.isExternalInterface(interfaceName)) {
        // At this point, the interface is operational and D/SMAC flows have been configured, mark the port active
        try {
            Port neutronPort = neutronVpnManager.getNeutronPort(interfaceName);
            if (neutronPort != null) {
                NeutronUtils.updatePortStatus(interfaceName, NeutronUtils.PORT_STATUS_ACTIVE, broker);
            }
        } catch (IllegalArgumentException ex) {
            LOG.trace("Interface: {} is not part of Neutron Network", interfaceName);
        }
    }
    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) Port(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port) ArrayList(java.util.ArrayList) StaticMacEntries(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntries) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) StaticMacEntriesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntriesKey) Uint64(org.opendaylight.yangtools.yang.common.Uint64) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress)

Example 37 with Configuration

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

the class LocalUcastMacListener method deleteElanMacEntry.

private void deleteElanMacEntry(InstanceIdentifier<LocalUcastMacs> identifier, LocalUcastMacs macRemoved) {
    String hwvtepNodeId = identifier.firstKeyOf(Node.class).getNodeId().getValue();
    String macAddress = macRemoved.getMacEntryKey().getValue().toLowerCase(Locale.getDefault());
    String elanName = getElanName(macRemoved);
    PhysAddress phyAddress = new PhysAddress(macRemoved.getMacEntryKey().getValue());
    InstanceIdentifier<MacEntry> elanMacEntryIid = ElanUtils.getMacEntryOperationalDataPath(elanName, phyAddress);
    localMacEntryCache.remove(elanMacEntryIid);
    elanClusterUtils.runOnlyInOwnerNode(hwvtepNodeId + ":" + macAddress + HwvtepHAUtil.L2GW_JOB_KEY, "remove elan mac entry from config", () -> {
        return Lists.newArrayList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.delete(elanMacEntryIid)));
    });
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) ReadFailedException(org.opendaylight.mdsal.common.api.ReadFailedException) ScheduledFuture(java.util.concurrent.ScheduledFuture) ElanL2GwCacheUtils(org.opendaylight.netvirt.elanmanager.utils.ElanL2GwCacheUtils) LoggerFactory(org.slf4j.LoggerFactory) SrcnodeAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation) LocalUcastMacsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey) ElanForwardingTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanForwardingTables) CacheProvider(org.opendaylight.infrautils.caches.CacheProvider) RecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener) HAOpClusteredListener(org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener) ElanClusterUtils(org.opendaylight.netvirt.elan.utils.ElanClusterUtils) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) HwvtepHAUtil(org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil) Nullable(org.eclipse.jdt.annotation.Nullable) Locale(java.util.Locale) Map(java.util.Map) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) LocalUcastMacs(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress) ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) Predicate(java.util.function.Predicate) MacTable(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.forwarding.tables.MacTable) Collection(java.util.Collection) TerminationPoint(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) Objects(java.util.Objects) ElanL2GatewayUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) ElanConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.config.rev150710.ElanConfig) PostConstruct(javax.annotation.PostConstruct) L2GatewayCache(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayCache) L2GatewayServiceRecoveryHandler(org.opendaylight.netvirt.elan.l2gw.recovery.impl.L2GatewayServiceRecoveryHandler) HwvtepPhysicalLocatorRef(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalLocatorRef) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) HashMap(java.util.HashMap) Singleton(javax.inject.Singleton) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) ConcurrentMap(java.util.concurrent.ConcurrentMap) HashSet(java.util.HashSet) Inject(javax.inject.Inject) MacEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryBuilder) Lists(com.google.common.collect.Lists) DataTreeModification(org.opendaylight.mdsal.binding.api.DataTreeModification) ClusteredDataTreeChangeListener(org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener) InstanceIdDataObjectCache(org.opendaylight.genius.mdsalutil.cache.InstanceIdDataObjectCache) DataObjectModification(org.opendaylight.mdsal.binding.api.DataObjectModification) HwvtepSouthboundUtils(org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils) LogicalSwitches(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches) Logger(org.slf4j.Logger) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) ElanInstanceCache(org.opendaylight.netvirt.elan.cache.ElanInstanceCache) Scheduler(org.opendaylight.netvirt.elan.utils.Scheduler) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) ServiceRecoveryRegistry(org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry) HwvtepHACache(org.opendaylight.genius.utils.hwvtep.HwvtepHACache) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) SrcnodeAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) LocalUcastMacsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder) Collections(java.util.Collections) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) L2GatewayDevice(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress)

Example 38 with Configuration

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

the class LocalUcastMacListener method updateElanMacInConfigDb.

private void updateElanMacInConfigDb(InstanceIdentifier<LocalUcastMacs> identifier, LocalUcastMacs macAdded) {
    String hwvtepNodeId = identifier.firstKeyOf(Node.class).getNodeId().getValue();
    String macAddress = macAdded.getMacEntryKey().getValue().toLowerCase(Locale.getDefault());
    String elanName = getElanName(macAdded);
    PhysAddress phyAddress = new PhysAddress(macAdded.getMacEntryKey().getValue());
    MacEntry newElanMac = new MacEntryBuilder().setSrcTorNodeid(hwvtepNodeId).setMacAddress(phyAddress).build();
    InstanceIdentifier<MacEntry> iid = ElanUtils.getMacEntryOperationalDataPath(elanName, phyAddress);
    localMacEntryCache.put(iid, newElanMac);
    elanClusterUtils.runOnlyInOwnerNode(hwvtepNodeId + ":" + macAddress + HwvtepHAUtil.L2GW_JOB_KEY, "update elan mac entry", () -> {
        return Lists.newArrayList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.mergeParentStructurePut(iid, newElanMac)));
    });
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) ReadFailedException(org.opendaylight.mdsal.common.api.ReadFailedException) ScheduledFuture(java.util.concurrent.ScheduledFuture) ElanL2GwCacheUtils(org.opendaylight.netvirt.elanmanager.utils.ElanL2GwCacheUtils) LoggerFactory(org.slf4j.LoggerFactory) SrcnodeAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentation) LocalUcastMacsKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsKey) ElanForwardingTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanForwardingTables) CacheProvider(org.opendaylight.infrautils.caches.CacheProvider) RecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener) HAOpClusteredListener(org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener) ElanClusterUtils(org.opendaylight.netvirt.elan.utils.ElanClusterUtils) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) HwvtepHAUtil(org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil) Nullable(org.eclipse.jdt.annotation.Nullable) Locale(java.util.Locale) Map(java.util.Map) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) LocalUcastMacs(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress) ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) Predicate(java.util.function.Predicate) MacTable(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.forwarding.tables.MacTable) Collection(java.util.Collection) TerminationPoint(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) Objects(java.util.Objects) ElanL2GatewayUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) ElanConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.config.rev150710.ElanConfig) PostConstruct(javax.annotation.PostConstruct) L2GatewayCache(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayCache) L2GatewayServiceRecoveryHandler(org.opendaylight.netvirt.elan.l2gw.recovery.impl.L2GatewayServiceRecoveryHandler) HwvtepPhysicalLocatorRef(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalLocatorRef) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) HashMap(java.util.HashMap) Singleton(javax.inject.Singleton) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) ConcurrentMap(java.util.concurrent.ConcurrentMap) HashSet(java.util.HashSet) Inject(javax.inject.Inject) MacEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryBuilder) Lists(com.google.common.collect.Lists) DataTreeModification(org.opendaylight.mdsal.binding.api.DataTreeModification) ClusteredDataTreeChangeListener(org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener) InstanceIdDataObjectCache(org.opendaylight.genius.mdsalutil.cache.InstanceIdDataObjectCache) DataObjectModification(org.opendaylight.mdsal.binding.api.DataObjectModification) HwvtepSouthboundUtils(org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils) LogicalSwitches(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LogicalSwitches) Logger(org.slf4j.Logger) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) ElanInstanceCache(org.opendaylight.netvirt.elan.cache.ElanInstanceCache) Scheduler(org.opendaylight.netvirt.elan.utils.Scheduler) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) ServiceRecoveryRegistry(org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry) HwvtepHACache(org.opendaylight.genius.utils.hwvtep.HwvtepHACache) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) SrcnodeAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.SrcnodeAugmentationBuilder) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) LocalUcastMacsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacsBuilder) Collections(java.util.Collections) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) L2GatewayDevice(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) MacEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry) MacEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntryBuilder) PhysAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress)

Example 39 with Configuration

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

the class DhcpNeutronPortListener method update.

@Override
public void update(InstanceIdentifier<Port> identifier, Port original, Port update) {
    if (!config.isControllerDhcpEnabled()) {
        return;
    }
    LOG.trace("Port changed to {}", update);
    // With Ipv6 changes we can get ipv4 subnets later. The below check is to support such scenario.
    if (original.nonnullFixedIps().size() < update.nonnullFixedIps().size()) {
        final String interfaceName = update.getUuid().getValue();
        List<FixedIps> updatedFixedIps = new ArrayList<>(update.nonnullFixedIps().values());
        // Need to check only the newly added fixed ip.
        updatedFixedIps.removeAll(original.nonnullFixedIps().values());
        Subnet subnet = dhcpManager.getNeutronSubnet(updatedFixedIps);
        if (null == subnet || !subnet.isEnableDhcp()) {
            LOG.trace("Subnet is null/not ipv4 or not enabled {}", subnet);
            return;
        }
        // Binding the DHCP service for an existing port because of subnet change.
        jobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), () -> Collections.singletonList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
            LOG.debug("Binding DHCP service for interface {}", interfaceName);
            DhcpServiceUtils.bindDhcpService(interfaceName, NwConstants.DHCP_TABLE, tx);
        })), DhcpMConstants.RETRY_COUNT);
        jobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), () -> {
            Uint64 dpnId = interfaceManager.getDpnForInterface(interfaceName);
            if (dpnId == null || dpnId.equals(DhcpMConstants.INVALID_DPID)) {
                LOG.trace("Unable to install the DHCP flow since dpn is not available");
                return Collections.emptyList();
            }
            String vmMacAddress = txRunner.applyWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> DhcpServiceUtils.getAndUpdateVmMacAddress(tx, interfaceName, dhcpManager)).get();
            return Collections.singletonList(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> dhcpManager.installDhcpEntries(dpnId, vmMacAddress, tx)));
        }, DhcpMConstants.RETRY_COUNT);
    }
    if (!isVnicTypeDirectOrMacVtap(update)) {
        LOG.trace("Port updated is normal {}", update.getUuid());
        if (isVnicTypeDirectOrMacVtap(original)) {
            LOG.trace("Original Port was direct/macvtap {} so removing flows and cache entry if any", update.getUuid());
            removePort(original);
        }
        return;
    }
    if (!isVnicTypeDirectOrMacVtap(original)) {
        LOG.trace("Original port was normal and updated is direct. Calling addPort()");
        addPort(update);
        return;
    }
    String macOriginal = getMacAddress(original);
    String macUpdated = getMacAddress(update);
    String segmentationIdOriginal = DhcpServiceUtils.getSegmentationId(original.getNetworkId(), broker);
    String segmentationIdUpdated = DhcpServiceUtils.getSegmentationId(update.getNetworkId(), broker);
    if (macOriginal != null && !macOriginal.equalsIgnoreCase(macUpdated) && segmentationIdOriginal != null && !segmentationIdOriginal.equalsIgnoreCase(segmentationIdUpdated)) {
        LOG.trace("Mac/segment id has changed");
        dhcpExternalTunnelManager.removeVniMacToPortCache(Uint64.valueOf(segmentationIdOriginal), macOriginal);
        dhcpExternalTunnelManager.updateVniMacToPortCache(Uint64.valueOf(segmentationIdUpdated), macUpdated, update);
    }
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) Ports(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.Ports) Uint64(org.opendaylight.yangtools.yang.common.Uint64) DhcpMConstants(org.opendaylight.netvirt.dhcpservice.api.DhcpMConstants) LoggerFactory(org.slf4j.LoggerFactory) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) PortBindingExtension(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.binding.rev150712.PortBindingExtension) IElanService(org.opendaylight.netvirt.elanmanager.api.IElanService) Singleton(javax.inject.Singleton) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) FixedIps(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.port.attributes.FixedIps) Neutron(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) PreDestroy(javax.annotation.PreDestroy) ArpReponderInputBuilder(org.opendaylight.netvirt.elan.arp.responder.ArpResponderInput.ArpReponderInputBuilder) NeutronConstants(org.opendaylight.netvirt.neutronvpn.api.utils.NeutronConstants) Locale(java.util.Locale) ArpResponderUtil(org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) Named(javax.inject.Named) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) DhcpserviceConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dhcpservice.config.rev150710.DhcpserviceConfig) Logger(org.slf4j.Logger) AbstractClusteredAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractClusteredAsyncDataTreeChangeListener) Subnet(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.subnets.attributes.subnets.Subnet) ElanHelper(org.opendaylight.netvirt.elanmanager.api.ElanHelper) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator) Consumer(java.util.function.Consumer) Port(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port) List(java.util.List) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Collections(java.util.Collections) ArpResponderInput(org.opendaylight.netvirt.elan.arp.responder.ArpResponderInput) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) ItmRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService) ArrayList(java.util.ArrayList) FixedIps(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.port.attributes.FixedIps) Subnet(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.subnets.attributes.subnets.Subnet) Uint64(org.opendaylight.yangtools.yang.common.Uint64)

Example 40 with Configuration

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

the class ElanGroupListener method update.

@Override
public void update(InstanceIdentifier<Group> identifier, @Nullable Group original, Group update) {
    LOG.trace("received group updated {}", update.key().getGroupId());
    final Uint64 dpnId = getDpnId(identifier.firstKeyOf(Node.class).getId().getValue());
    if (dpnId == null) {
        return;
    }
    List<L2GatewayDevice> allDevices = ElanL2GwCacheUtils.getAllElanDevicesFromCache();
    if (allDevices.isEmpty()) {
        LOG.trace("no elan devices present in cache {}", update.key().getGroupId());
        return;
    }
    int expectedElanFootprint = 0;
    final ElanInstance elanInstance = getElanInstanceFromGroupId(update);
    if (elanInstance == null) {
        LOG.trace("no elan instance is null {}", update.key().getGroupId());
        return;
    }
    final int devicesSize = ElanL2GwCacheUtils.getInvolvedL2GwDevices(elanInstance.getElanInstanceName()).size();
    if (devicesSize == 0) {
        LOG.trace("no elan devices in elan cache {} {}", elanInstance.getElanInstanceName(), update.key().getGroupId());
        return;
    }
    boolean updateGroup = false;
    List<DpnInterfaces> dpns = elanUtils.getElanDPNByName(elanInstance.getElanInstanceName());
    if (dpns.size() > 0) {
        expectedElanFootprint += dpns.size();
    } else {
        updateGroup = true;
    }
    expectedElanFootprint += devicesSize;
    if (update.getBuckets() != null && update.getBuckets().getBucket() != null) {
        if (update.getBuckets().getBucket().size() != expectedElanFootprint) {
            updateGroup = true;
        } else {
            LOG.trace("no of buckets matched perfectly {} {}", elanInstance.getElanInstanceName(), update.key().getGroupId());
        }
    }
    if (updateGroup) {
        List<Bucket> bucketList = elanL2GatewayMulticastUtils.getRemoteBCGroupBuckets(elanInstance, null, dpnId, 0, elanInstance.getElanTag().toJava());
        // remove local bcgroup bucket
        expectedElanFootprint--;
        if (bucketList.size() != expectedElanFootprint) {
            // no point in retrying if not able to meet expected foot print
            return;
        }
        LOG.trace("no of buckets mismatched {} {}", elanInstance.getElanInstanceName(), update.key().getGroupId());
        elanClusterUtils.runOnlyInOwnerNode(elanInstance.getElanInstanceName(), "updating broadcast group", () -> {
            LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, confTx -> elanL2GatewayMulticastUtils.setupElanBroadcastGroups(elanInstance, dpnId, confTx)), LOG, "Error setting up ELAN BGs");
            return null;
        });
    } else {
        LOG.trace("no buckets in the update {} {}", elanInstance.getElanInstanceName(), update.key().getGroupId());
    }
}
Also used : ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) ElanL2GatewayMulticastUtils(org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils) Uint64(org.opendaylight.yangtools.yang.common.Uint64) ElanL2GwCacheUtils(org.opendaylight.netvirt.elanmanager.utils.ElanL2GwCacheUtils) LoggerFactory(org.slf4j.LoggerFactory) Executors(org.opendaylight.infrautils.utils.concurrent.Executors) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) 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) Singleton(javax.inject.Singleton) Inject(javax.inject.Inject) PreDestroy(javax.annotation.PreDestroy) ElanClusterUtils(org.opendaylight.netvirt.elan.utils.ElanClusterUtils) ElanUtils(org.opendaylight.netvirt.elan.utils.ElanUtils) Nullable(org.eclipse.jdt.annotation.Nullable) LoggingFutures(org.opendaylight.infrautils.utils.concurrent.LoggingFutures) Bucket(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) Logger(org.slf4j.Logger) AbstractClusteredAsyncDataTreeChangeListener(org.opendaylight.serviceutils.tools.listener.AbstractClusteredAsyncDataTreeChangeListener) Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group) ElanInstanceCache(org.opendaylight.netvirt.elan.cache.ElanInstanceCache) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) List(java.util.List) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) L2GatewayDevice(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) Bucket(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) DpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfaces) L2GatewayDevice(org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayDevice) Uint64(org.opendaylight.yangtools.yang.common.Uint64)

Aggregations

DataBroker (org.opendaylight.mdsal.binding.api.DataBroker)83 CONFIGURATION (org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION)83 Logger (org.slf4j.Logger)82 LoggerFactory (org.slf4j.LoggerFactory)82 ManagedNewTransactionRunner (org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner)81 ManagedNewTransactionRunnerImpl (org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl)81 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)80 Inject (javax.inject.Inject)75 Singleton (javax.inject.Singleton)75 LogicalDatastoreType (org.opendaylight.mdsal.common.api.LogicalDatastoreType)72 ArrayList (java.util.ArrayList)66 Collections (java.util.Collections)66 List (java.util.List)66 Uint64 (org.opendaylight.yangtools.yang.common.Uint64)61 ExecutionException (java.util.concurrent.ExecutionException)60 Optional (java.util.Optional)57 LoggingFutures (org.opendaylight.infrautils.utils.concurrent.LoggingFutures)56 JobCoordinator (org.opendaylight.infrautils.jobcoordinator.JobCoordinator)53 NwConstants (org.opendaylight.genius.mdsalutil.NwConstants)51 PreDestroy (javax.annotation.PreDestroy)50