Search in sources :

Example 16 with OPERATIONAL

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

the class L3vpnPopulator method addToLabelMapper.

public void addToLabelMapper(Uint32 label, Uint64 dpnId, String prefix, List<String> nextHopIpList, Uint32 vpnId, @Nullable String vpnInterfaceName, @Nullable Uint32 elanTag, boolean isSubnetRoute, String rd) {
    final String labelStr = requireNonNull(label, "addToLabelMapper: label cannot be null or empty!").toString();
    requireNonNull(prefix, "addToLabelMapper: prefix cannot be null or empty!");
    requireNonNull(vpnId, "addToLabelMapper: vpnId cannot be null or empty!");
    requireNonNull(rd, "addToLabelMapper: rd cannot be null or empty!");
    if (!isSubnetRoute) {
        // NextHop must be present for non-subnetroute entries
        requireNonNull(nextHopIpList, "addToLabelMapper: nextHopIp cannot be null or empty!");
    }
    // FIXME: separate this out somehow?
    final ReentrantLock lock = JvmGlobalLocks.getLockForString(labelStr);
    lock.lock();
    try {
        addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
            LOG.info("addToLabelMapper: label {} dpn {} prefix {} nexthoplist {} vpnid {} vpnIntfcName {} rd {}" + " elanTag {}", labelStr, dpnId, prefix, nextHopIpList, vpnId, vpnInterfaceName, rd, elanTag);
            if (dpnId != null) {
                LabelRouteInfoBuilder lriBuilder = new LabelRouteInfoBuilder();
                lriBuilder.setLabel(label).setDpnId(dpnId).setPrefix(prefix).setNextHopIpList(nextHopIpList).setParentVpnid(vpnId).setIsSubnetRoute(isSubnetRoute);
                if (elanTag != null) {
                    lriBuilder.setElanTag(elanTag);
                } else {
                    LOG.warn("addToLabelMapper: elanTag is null for label {} prefix {} rd {} vpnId {}", labelStr, prefix, rd, vpnId);
                }
                if (vpnInterfaceName != null) {
                    lriBuilder.setVpnInterfaceName(vpnInterfaceName);
                } else {
                    LOG.warn("addToLabelMapper: vpn interface is null for label {} prefix {} rd {} vpnId {}", labelStr, prefix, rd, vpnId);
                }
                lriBuilder.setParentVpnRd(rd);
                VpnInstanceOpDataEntry vpnInstanceOpDataEntry = vpnUtil.getVpnInstanceOpData(rd);
                if (vpnInstanceOpDataEntry != null) {
                    List<String> vpnInstanceNames = Collections.singletonList(vpnInstanceOpDataEntry.getVpnInstanceName());
                    lriBuilder.setVpnInstanceList(vpnInstanceNames);
                }
                LabelRouteInfo lri = lriBuilder.build();
                InstanceIdentifier<LabelRouteInfo> lriIid = InstanceIdentifier.builder(LabelRouteMap.class).child(LabelRouteInfo.class, new LabelRouteInfoKey(label)).build();
                tx.mergeParentStructureMerge(lriIid, lri);
                LOG.info("addToLabelMapper: Added label route info to label {} prefix {} nextHopList {} vpnId {}" + " interface {} rd {} elantag {}", labelStr, prefix, nextHopIpList, vpnId, vpnInterfaceName, rd, elanTag);
            } else {
                LOG.warn("addToLabelMapper: Can't add entry to label map for label {} prefix {} nextHopList {}" + " vpnId {} interface {} rd {} elantag {}, dpnId is null", labelStr, prefix, nextHopIpList, vpnId, vpnInterfaceName, rd, elanTag);
            }
        }), LOG, "addToLabelMapper");
    } finally {
        lock.unlock();
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) IFibManager(org.opendaylight.netvirt.fibmanager.api.IFibManager) VpnUtil(org.opendaylight.netvirt.vpnmanager.VpnUtil) 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) FibEntries(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.FibEntries) LoggerFactory(org.slf4j.LoggerFactory) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) VrfEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.vrfentries.VrfEntry) AdjacencyBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.adjacency.list.AdjacencyBuilder) LabelRouteInfoKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoKey) Nullable(org.eclipse.jdt.annotation.Nullable) Objects.requireNonNull(java.util.Objects.requireNonNull) IBgpManager(org.opendaylight.netvirt.bgpmanager.api.IBgpManager) LabelRouteInfoBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoBuilder) L3vpnInput(org.opendaylight.netvirt.vpnmanager.populator.input.L3vpnInput) VrfTablesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesBuilder) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) ReentrantLock(java.util.concurrent.locks.ReentrantLock) VrfTablesKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTablesKey) LabelRouteInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfo) Configuration(org.opendaylight.mdsal.binding.util.Datastore.Configuration) RouteOrigin(org.opendaylight.netvirt.fibmanager.api.RouteOrigin) VpnPopulator(org.opendaylight.netvirt.vpnmanager.populator.intfc.VpnPopulator) VrfTables(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.fibentries.VrfTables) LoggingFutures.addErrorLogging(org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) VrfEntryBase(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.VrfEntryBase) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) SubnetRouteBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRouteBuilder) Optional(java.util.Optional) SubnetRoute(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.SubnetRoute) VrfEntryKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.vrfentries.VrfEntryKey) Collections(java.util.Collections) FibHelper(org.opendaylight.netvirt.fibmanager.api.FibHelper) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) JvmGlobalLocks(org.opendaylight.genius.utils.JvmGlobalLocks) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) LabelRouteMap(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.LabelRouteMap) VpnInstanceOpDataEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry) LabelRouteInfo(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfo) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) List(java.util.List) LabelRouteInfoBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoBuilder) LabelRouteInfoKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.label.route.map.LabelRouteInfoKey)

Example 17 with OPERATIONAL

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

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

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

the class ElanInstanceEntityOwnershipListener method ownershipChanged.

@SuppressWarnings("checkstyle:IllegalCatch")
@Override
public void ownershipChanged(EntityOwnershipChange ownershipChange) {
    LOG.info("Entity Ownership changed for the entity: {}", ownershipChange);
    if (!ownershipChange.getState().isOwner()) {
        if (ft != null) {
            ft.cancel(false);
            ft = null;
        }
        return;
    }
    if (!ownershipChange.getState().wasOwner() && ownershipChange.getState().isOwner()) {
        if (ft != null) {
            ft.cancel(false);
            ft = null;
        }
        ft = scheduler.getScheduledExecutorService().schedule(() -> {
            try {
                // check if i'm the owner
                if (ownershipChange.getState().isOwner()) {
                    LOG.info("Elan Entity owner is: {}", ownershipChange);
                    txRunner.callWithNewReadOnlyTransactionAndClose(CONFIGURATION, tx -> {
                        l2GatewayConnectionListener.loadL2GwConnectionCache(tx);
                    });
                    InstanceIdentifier<ElanDpnInterfaces> elanDpnInterfacesInstanceIdentifier = InstanceIdentifier.builder(ElanDpnInterfaces.class).build();
                    txRunner.callWithNewReadOnlyTransactionAndClose(OPERATIONAL, tx -> {
                        Optional<ElanDpnInterfaces> optional = Optional.empty();
                        try {
                            optional = tx.read(elanDpnInterfacesInstanceIdentifier).get();
                        } catch (ExecutionException | InterruptedException e) {
                            LOG.error("Exception While reading ElanDpnInterfaces", e);
                        }
                        if (optional.isPresent() && optional.get().getElanDpnInterfacesList() != null) {
                            LOG.debug("Found elan dpn interfaces list");
                            optional.get().nonnullElanDpnInterfacesList().values().forEach(elanDpnInterfacesList -> {
                                List<DpnInterfaces> dpnInterfaces = new ArrayList<>(elanDpnInterfacesList.nonnullDpnInterfaces().values());
                                InstanceIdentifier<ElanDpnInterfacesList> parentIid = InstanceIdentifier.builder(ElanDpnInterfaces.class).child(ElanDpnInterfacesList.class, new ElanDpnInterfacesListKey(elanDpnInterfacesList.getElanInstanceName())).build();
                                for (DpnInterfaces dpnInterface : dpnInterfaces) {
                                    LOG.debug("Found elan dpn interfaces");
                                    elanDpnInterfaceClusteredListener.add(parentIid.child(DpnInterfaces.class, dpnInterface.key()), dpnInterface);
                                }
                            });
                        }
                    });
                } else {
                    LOG.info("Not the owner for Elan entity {}", ownershipChange);
                }
                ft = null;
            } catch (Exception e) {
                LOG.error("Failed to read mdsal ", e);
            }
        }, ELAN_EOS_DELAY, TimeUnit.MINUTES);
    }
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) HwvtepSouthboundConstants(org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants) ELAN_EOS_DELAY(org.opendaylight.netvirt.elan.utils.ElanConstants.ELAN_EOS_DELAY) ScheduledFuture(java.util.concurrent.ScheduledFuture) LoggerFactory(org.slf4j.LoggerFactory) ManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunner) DpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfaces) Singleton(javax.inject.Singleton) EntityOwnershipService(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ElanDpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanDpnInterfaces) 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) EntityOwnershipListener(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener) ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) Logger(org.slf4j.Logger) Scheduler(org.opendaylight.netvirt.elan.utils.Scheduler) ElanDpnInterfaceClusteredListener(org.opendaylight.netvirt.elan.internal.ElanDpnInterfaceClusteredListener) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) ManagedNewTransactionRunnerImpl(org.opendaylight.mdsal.binding.util.ManagedNewTransactionRunnerImpl) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) Optional(java.util.Optional) EntityOwnershipChange(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipChange) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) Optional(java.util.Optional) DpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.elan.dpn.interfaces.list.DpnInterfaces) ElanDpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanDpnInterfaces) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) ArrayList(java.util.ArrayList) ElanDpnInterfacesList(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.ElanDpnInterfacesList) List(java.util.List) ElanDpnInterfacesListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.dpn.interfaces.ElanDpnInterfacesListKey) ExecutionException(java.util.concurrent.ExecutionException) ElanDpnInterfaces(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanDpnInterfaces)

Example 20 with OPERATIONAL

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

the class HAOpNodeListener method readAndCopyChildPsOpToParent.

private void readAndCopyChildPsOpToParent(Node childNode, TypedReadWriteTransaction<Operational> tx) {
    String childGlobalNodeId = childNode.getNodeId().getValue();
    List<InstanceIdentifier> childPsIids = new ArrayList<>();
    HwvtepGlobalAugmentation hwvtepGlobalAugmentation = childNode.augmentation(HwvtepGlobalAugmentation.class);
    if (hwvtepGlobalAugmentation == null || HwvtepHAUtil.isEmpty(hwvtepGlobalAugmentation.nonnullSwitches().values())) {
        haOpClusteredListener.getConnectedNodes().stream().filter(connectedIid -> IS_PS_CHILD_TO_GLOBAL_NODE.test(childGlobalNodeId, connectedIid)).forEach(connectedIid -> childPsIids.add(connectedIid));
    } else {
        hwvtepGlobalAugmentation.getSwitches().values().forEach(switches -> childPsIids.add(switches.getSwitchRef().getValue()));
    }
    if (childPsIids.isEmpty()) {
        LOG.info("HAOpNodeListener No child ps found for global {}", childGlobalNodeId);
    }
    childPsIids.forEach(psIid -> {
        try {
            InstanceIdentifier<Node> childPsIid = psIid;
            Optional<Node> childPsNode = tx.read(childPsIid).get();
            if (childPsNode.isPresent()) {
                LOG.debug("Child oper PS node found");
                onPsNodeAdd(childPsIid, childPsNode.get(), tx);
            } else {
                LOG.error("HAOpNodeListener Child oper ps node not found {}", childPsIid);
            }
        } catch (ExecutionException | InterruptedException e) {
            LOG.error("HAOpNodeListener Failed to read child ps node {}", psIid);
        }
    });
}
Also used : CONFIGURATION(org.opendaylight.mdsal.binding.util.Datastore.CONFIGURATION) IHAEventHandler(org.opendaylight.netvirt.elan.l2gw.ha.handlers.IHAEventHandler) TerminationPointBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder) HAEventHandler(org.opendaylight.netvirt.elan.l2gw.ha.handlers.HAEventHandler) L2GatewayServiceRecoveryHandler(org.opendaylight.netvirt.elan.l2gw.recovery.impl.L2GatewayServiceRecoveryHandler) LoggerFactory(org.slf4j.LoggerFactory) HwvtepGlobalAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentationBuilder) Singleton(javax.inject.Singleton) ArrayList(java.util.ArrayList) RecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener) Inject(javax.inject.Inject) Strings(com.google.common.base.Strings) BiPredicate(java.util.function.BiPredicate) HwvtepHAUtil(org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil) PhysicalSwitchAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation) NodeCopier(org.opendaylight.netvirt.elan.l2gw.ha.handlers.NodeCopier) DataObjectModification(org.opendaylight.mdsal.binding.api.DataObjectModification) NodeBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder) BatchedTransaction(org.opendaylight.netvirt.elan.l2gw.ha.BatchedTransaction) ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) Logger(org.slf4j.Logger) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) Predicate(java.util.function.Predicate) Managers(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.Managers) TerminationPoint(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint) Operational(org.opendaylight.mdsal.binding.util.Datastore.Operational) Set(java.util.Set) ServiceRecoveryRegistry(org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry) Collectors(java.util.stream.Collectors) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) HwvtepPhysicalPortAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalPortAugmentationBuilder) Optional(java.util.Optional) TypedReadWriteTransaction(org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction) HwvtepPhysicalPortAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepPhysicalPortAugmentation) OPERATIONAL(org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) PhysicalSwitchAugmentationBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentationBuilder) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) ArrayList(java.util.ArrayList) HwvtepGlobalAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) ExecutionException(java.util.concurrent.ExecutionException)

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