{Jdk,Listenable}Futures.addErrorLogging() has been long deprecated,
migrate to its replacement.
Change-Id: I8b23430f4c177bd256d4899565103d7a7eca9f72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 files changed:
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnMacVrfUtils;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnMacVrfUtils;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
protected void update(InstanceIdentifier<ElanInstance> instanceIdentifier, ElanInstance original,
ElanInstance update) {
String elanName = update.getElanInstanceName();
protected void update(InstanceIdentifier<ElanInstance> instanceIdentifier, ElanInstance original,
ElanInstance update) {
String elanName = update.getElanInstanceName();
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
if (evpnUtils.isWithdrawEvpnRT2Routes(original, update)) {
evpnUtils.withdrawEvpnRT2Routes(original.augmentation(EvpnAugmentation.class), elanName);
evpnMacVrfUtils.updateEvpnDmacFlows(original, false);
if (evpnUtils.isWithdrawEvpnRT2Routes(original, update)) {
evpnUtils.withdrawEvpnRT2Routes(original.augmentation(EvpnAugmentation.class), elanName);
evpnMacVrfUtils.updateEvpnDmacFlows(original, false);
import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.mdsalutil.matches.MatchTunnelId;
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.SettableFutureCallback;
import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.SettableFutureCallback;
return;
}
int vpnLabel = 0;
return;
}
int vpnLabel = 0;
- long l2vni = elanUtils.getVxlanSegmentationId(elanInfo);
+ long l2vni = ElanUtils.getVxlanSegmentationId(elanInfo);
long l3vni = 0;
String gatewayMacAddr = null;
String l3VpName = getL3vpnNameFromElan(elanInfo);
long l3vni = 0;
String gatewayMacAddr = null;
String l3VpName = getL3vpnNameFromElan(elanInfo);
}
public void bindElanServiceToExternalTunnel(String elanName, String interfaceName) {
}
public void bindElanServiceToExternalTunnel(String elanName, String interfaceName) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
int instructionKey = 0;
LOG.trace("Binding external interface {} elan {}", interfaceName, elanName);
List<Instruction> instructions = new ArrayList<>();
int instructionKey = 0;
LOG.trace("Binding external interface {} elan {}", interfaceName, elanName);
List<Instruction> instructions = new ArrayList<>();
}
public void unbindElanServiceFromExternalTunnel(String elanName, String interfaceName) {
}
public void unbindElanServiceFromExternalTunnel(String elanName, String interfaceName) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
LOG.trace("UnBinding external interface {} elan {}", interfaceManager, elanName);
short elanServiceIndex =
ServiceIndex.getIndex(NwConstants.ELAN_SERVICE_NAME, NwConstants.ELAN_SERVICE_INDEX);
LOG.trace("UnBinding external interface {} elan {}", interfaceManager, elanName);
short elanServiceIndex =
ServiceIndex.getIndex(NwConstants.ELAN_SERVICE_NAME, NwConstants.ELAN_SERVICE_INDEX);
private void programEvpnL2vniFlow(ElanInstance elanInfo, BiConsumer<BigInteger, FlowEntity> flowHandler) {
long elanTag = elanInfo.getElanTag();
List<MatchInfo> mkMatches = new ArrayList<>();
private void programEvpnL2vniFlow(ElanInstance elanInfo, BiConsumer<BigInteger, FlowEntity> flowHandler) {
long elanTag = elanInfo.getElanTag();
List<MatchInfo> mkMatches = new ArrayList<>();
- mkMatches.add(new MatchTunnelId(BigInteger.valueOf(elanUtils.getVxlanSegmentationId(elanInfo))));
+ mkMatches.add(new MatchTunnelId(BigInteger.valueOf(ElanUtils.getVxlanSegmentationId(elanInfo))));
NWUtil.getOperativeDPNs(broker).forEach(dpnId -> {
LOG.debug("Updating tunnel flow to dpnid {}", dpnId);
List<InstructionInfo> instructions = getInstructionsForExtTunnelTable(elanTag);
NWUtil.getOperativeDPNs(broker).forEach(dpnId -> {
LOG.debug("Updating tunnel flow to dpnid {}", dpnId);
List<InstructionInfo> instructions = getInstructionsForExtTunnelTable(elanTag);
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTeps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.elan.instance.ExternalTeps;
@Override
protected void add(InstanceIdentifier<ExternalTeps> iid, ExternalTeps tep) {
@Override
protected void add(InstanceIdentifier<ExternalTeps> iid, ExternalTeps tep) {
- JdkFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
tx.put(iid, tep, true);
}), LOG, "Failed to update operational external teps {}", iid);
}
tx.put(iid, tep, true);
}), LOG, "Failed to update operational external teps {}", iid);
}
@Override
protected void remove(InstanceIdentifier<ExternalTeps> iid, ExternalTeps tep) {
@Override
protected void remove(InstanceIdentifier<ExternalTeps> iid, ExternalTeps tep) {
- JdkFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, tx -> {
tx.delete(iid);
}), LOG, "Failed to update operational external teps {}", iid);
}
tx.delete(iid);
}), LOG, "Failed to update operational external teps {}", iid);
}
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
if (existingElanTag == null || !existingElanTag.equals(update.getElanTag())) {
if (update.getElanTag() == null || update.getElanTag() == 0L) {
// update the elan-Instance with new properties
if (existingElanTag == null || !existingElanTag.equals(update.getElanTag())) {
if (update.getElanTag() == null || update.getElanTag() == 0L) {
// update the elan-Instance with new properties
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL,
- operTx -> ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL,
+ operTx -> LoggingFutures.addErrorLogging(
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> ElanUtils.updateOperationalDataStore(idManager, update, new ArrayList<>(), confTx,
operTx)), LOG, "Error updating ELAN tag in ELAN instance")), LOG,
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> ElanUtils.updateOperationalDataStore(idManager, update, new ArrayList<>(), confTx,
operTx)), LOG, "Error updating ELAN tag in ELAN instance")), LOG,
@Override
protected void add(InstanceIdentifier<ElanInstance> identifier, ElanInstance elanInstanceAdded) {
@Override
protected void add(InstanceIdentifier<ElanInstance> identifier, ElanInstance elanInstanceAdded) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, operTx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, operTx -> {
String elanInstanceName = elanInstanceAdded.getElanInstanceName();
Elan elanInfo = ElanUtils.getElanByName(operTx, elanInstanceName);
if (elanInfo == null) {
String elanInstanceName = elanInstanceAdded.getElanInstanceName();
Elan elanInfo = ElanUtils.getElanByName(operTx, elanInstanceName);
if (elanInfo == null) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> ElanUtils.updateOperationalDataStore(idManager, elanInstanceAdded, new ArrayList<>(),
confTx, operTx)), LOG, "Error adding an ELAN instance");
}
confTx -> ElanUtils.updateOperationalDataStore(idManager, elanInstanceAdded, new ArrayList<>(),
confTx, operTx)), LOG, "Error adding an ELAN instance");
}
import static org.opendaylight.controller.md.sal.binding.api.WriteTransaction.CREATE_MISSING_PARENTS;
import static org.opendaylight.genius.infra.Datastore.CONFIGURATION;
import static org.opendaylight.genius.infra.Datastore.OPERATIONAL;
import static org.opendaylight.controller.md.sal.binding.api.WriteTransaction.CREATE_MISSING_PARENTS;
import static org.opendaylight.genius.infra.Datastore.CONFIGURATION;
import static org.opendaylight.genius.infra.Datastore.OPERATIONAL;
+import static org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging;
import static org.opendaylight.netvirt.elan.utils.ElanUtils.isVxlanNetworkOrVxlanSegment;
import com.google.common.base.Optional;
import static org.opendaylight.netvirt.elan.utils.ElanUtils.isVxlanNetworkOrVxlanSegment;
import com.google.common.base.Optional;
import org.opendaylight.genius.utils.JvmGlobalLocks;
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.utils.JvmGlobalLocks;
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
private void deleteAllRemoteMacsInADpn(String elanName, BigInteger dpId, long elanTag) {
List<DpnInterfaces> dpnInterfaces = elanUtils.getInvolvedDpnsInElan(elanName);
private void deleteAllRemoteMacsInADpn(String elanName, BigInteger dpId, long elanTag) {
List<DpnInterfaces> dpnInterfaces = elanUtils.getInvolvedDpnsInElan(elanName);
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
+ addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, confTx -> {
for (DpnInterfaces dpnInterface : dpnInterfaces) {
BigInteger currentDpId = dpnInterface.getDpId();
if (!currentDpId.equals(dpId) && dpnInterface.getInterfaces() != null) {
for (DpnInterfaces dpnInterface : dpnInterfaces) {
BigInteger currentDpId = dpnInterface.getDpId();
if (!currentDpId.equals(dpId) && dpnInterface.getInterfaces() != null) {
for (StaticMacEntries staticMacEntry : updatedEntries) {
InstanceIdentifier<MacEntry> macEntryIdentifier = getMacEntryOperationalDataPath(elanName,
staticMacEntry.getMacAddress());
for (StaticMacEntries staticMacEntry : updatedEntries) {
InstanceIdentifier<MacEntry> macEntryIdentifier = getMacEntryOperationalDataPath(elanName,
staticMacEntry.getMacAddress());
- ListenableFutures.addErrorLogging(ElanUtils.waitForTransactionToComplete(
+ addErrorLogging(ElanUtils.waitForTransactionToComplete(
txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
Optional<MacEntry> existingMacEntry = tx.read(macEntryIdentifier).get();
if (existingMacEntry.isPresent()) {
txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> {
Optional<MacEntry> existingMacEntry = tx.read(macEntryIdentifier).get();
if (existingMacEntry.isPresent()) {
@Override
protected void add(InstanceIdentifier<ElanInterface> identifier, ElanInterface elanInterfaceAdded) {
@Override
protected void add(InstanceIdentifier<ElanInterface> identifier, ElanInterface elanInterfaceAdded) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, operTx -> {
+ addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, operTx -> {
String elanInstanceName = elanInterfaceAdded.getElanInstanceName();
String interfaceName = elanInterfaceAdded.getName();
InterfaceInfo interfaceInfo = interfaceManager.getInterfaceInfo(interfaceName);
String elanInstanceName = elanInterfaceAdded.getElanInstanceName();
String interfaceName = elanInterfaceAdded.getName();
InterfaceInfo interfaceInfo = interfaceManager.getInterfaceInfo(interfaceName);
LOG.debug("Elan instance:{} is present in Dpn:{} ", elanName, dpId);
final BigInteger finalDpId = dpId;
LOG.debug("Elan instance:{} is present in Dpn:{} ", elanName, dpId);
final BigInteger finalDpId = dpId;
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> elanL2GatewayMulticastUtils.setupElanBroadcastGroups(elanInfo, finalDpId, confTx)), LOG,
"Error setting up ELAN BGs");
// install L2gwDevices local macs in dpn.
confTx -> elanL2GatewayMulticastUtils.setupElanBroadcastGroups(elanInfo, finalDpId, confTx)), LOG,
"Error setting up ELAN BGs");
// install L2gwDevices local macs in dpn.
public void handleExternalInterfaceEvent(ElanInstance elanInstance, DpnInterfaces dpnInterfaces,
BigInteger dpId) {
LOG.debug("setting up remote BC group for elan {}", elanInstance.getPhysicalNetworkName());
public void handleExternalInterfaceEvent(ElanInstance elanInstance, DpnInterfaces dpnInterfaces,
BigInteger dpId) {
LOG.debug("setting up remote BC group for elan {}", elanInstance.getPhysicalNetworkName());
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> elanL2GatewayMulticastUtils.setupStandardElanBroadcastGroups(elanInstance, dpnInterfaces, dpId,
confTx)), LOG, "Error setting up remote BC group for ELAN {}", elanInstance.getPhysicalNetworkName());
try {
confTx -> elanL2GatewayMulticastUtils.setupStandardElanBroadcastGroups(elanInstance, dpnInterfaces, dpId,
confTx)), LOG, "Error setting up remote BC group for ELAN {}", elanInstance.getPhysicalNetworkName());
try {
package org.opendaylight.netvirt.elan.internal;
import static org.opendaylight.genius.infra.Datastore.CONFIGURATION;
package org.opendaylight.netvirt.elan.internal;
import static org.opendaylight.genius.infra.Datastore.CONFIGURATION;
+import static org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging;
import java.math.BigInteger;
import java.time.Duration;
import java.math.BigInteger;
import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType;
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType;
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderConstant;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderConstant;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
LOG.warn("Unexpected nodeId {}", nodeId.getValue());
return;
}
LOG.warn("Unexpected nodeId {}", nodeId.getValue());
return;
}
- ListenableFutures.addErrorLogging(
- txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION, tx -> {
- BigInteger dpId = new BigInteger(node[1]);
- createTableMissEntry(tx, dpId);
- createMulticastFlows(tx, dpId);
- createArpDefaultFlowsForArpCheckTable(dpId);
- }), LOG, "Error handling ELAN node addition for {}", add);
+ addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION, tx -> {
+ BigInteger dpId = new BigInteger(node[1]);
+ createTableMissEntry(tx, dpId);
+ createMulticastFlows(tx, dpId);
+ createArpDefaultFlowsForArpCheckTable(dpId);
+ }), LOG, "Error handling ELAN node addition for {}", add);
}
private void createArpDefaultFlowsForArpCheckTable(BigInteger dpId) {
}
private void createArpDefaultFlowsForArpCheckTable(BigInteger dpId) {
eventCallbacks.onAddOrUpdate(LogicalDatastoreType.CONFIGURATION,
ElanUtils.getGroupInstanceid(dpId, arpRequestGroupId), (unused, newGroupId) -> {
LOG.info("group {} added in the config", arpRequestGroupId);
eventCallbacks.onAddOrUpdate(LogicalDatastoreType.CONFIGURATION,
ElanUtils.getGroupInstanceid(dpId, arpRequestGroupId), (unused, newGroupId) -> {
LOG.info("group {} added in the config", arpRequestGroupId);
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
innerConfTx -> createArpRequestMatchFlowsForGroup(dpId, arpRequestGroupId,
innerConfTx)),
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
innerConfTx -> createArpRequestMatchFlowsForGroup(dpId, arpRequestGroupId,
innerConfTx)),
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.genius.mdsalutil.packet.Ethernet;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.genius.mdsalutil.packet.Ethernet;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnUtils;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.evpn.utils.EvpnUtils;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
macEntry.getMacAddress(), macEntry.getInterface());
return;
}
macEntry.getMacAddress(), macEntry.getInterface());
return;
}
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
tx -> elanUtils.deleteMacFlows(elanInfo, oldInterfaceLport, macEntry, tx)), LOG,
"Error deleting invalid MAC entry");
elanL2GatewayUtils.removeMacsFromElanExternalDevices(elanInfo,
tx -> elanUtils.deleteMacFlows(elanInfo, oldInterfaceLport, macEntry, tx)), LOG,
"Error deleting invalid MAC entry");
elanL2GatewayUtils.removeMacsFromElanExternalDevices(elanInfo,
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants;
import org.opendaylight.infrautils.inject.AbstractLifecycle;
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants;
import org.opendaylight.infrautils.inject.AbstractLifecycle;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.mdsal.eos.binding.api.Entity;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipCandidateRegistration;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
import org.opendaylight.mdsal.eos.binding.api.Entity;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipCandidateRegistration;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
ArpResponderUtil.generateCookie(lportTag, ipAddress),
ArpResponderUtil.getMatchCriteria(lportTag, elanInstance, ipAddress),
arpResponderInput.getInstructions());
ArpResponderUtil.generateCookie(lportTag, ipAddress),
ArpResponderUtil.getMatchCriteria(lportTag, elanInstance, ipAddress),
arpResponderInput.getInstructions());
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION,
tx -> mdsalManager.addFlow(tx, dpnId, flowEntity)), LOG, "Error adding flow {}", flowEntity);
LOG.info("Installed the ARP Responder flow for Interface {}", ingressInterfaceName);
}
tx -> mdsalManager.addFlow(tx, dpnId, flowEntity)), LOG, "Error adding flow {}", flowEntity);
LOG.info("Installed the ARP Responder flow for Interface {}", ingressInterfaceName);
}
ArpResponderUtil.generateCookie(lportTag, ipAddress),
ArpResponderUtil.getMatchCriteria(lportTag, elanInstance, ipAddress),
arpResponderInput.getInstructions());
ArpResponderUtil.generateCookie(lportTag, ipAddress),
ArpResponderUtil.getMatchCriteria(lportTag, elanInstance, ipAddress),
arpResponderInput.getInstructions());
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(Datastore.CONFIGURATION,
tx -> mdsalManager.addFlow(tx, dpnId, flowEntity)), LOG, "Error adding flow {}", flowEntity);
LOG.trace("Installed the ExternalTunnel ARP Responder flow for ElanInstance {}", elanInstanceName);
}
tx -> mdsalManager.addFlow(tx, dpnId, flowEntity)), LOG, "Error adding flow {}", flowEntity);
LOG.trace("Installed the ExternalTunnel ARP Responder flow for ElanInstance {}", elanInstanceName);
}
*/
@Override
public Long retrieveNewElanTag(String idKey) {
*/
@Override
public Long retrieveNewElanTag(String idKey) {
- return elanUtils.retrieveNewElanTag(idManager, idKey);
+ return ElanUtils.retrieveNewElanTag(idManager, idKey);
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAJobScheduler;
import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalAugmentationMerger;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAJobScheduler;
import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalAugmentationMerger;
(created in the device)
*/
HAJobScheduler.getInstance().submitJob(() -> {
(created in the device)
*/
HAJobScheduler.getInstance().submitJob(() -> {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, jobTx -> {
hwvtepNodeHACache.updateConnectedNodeStatus(childNodePath);
LOG.info("HA child reconnected handleNodeReConnected {}",
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, jobTx -> {
hwvtepNodeHACache.updateConnectedNodeStatus(childNodePath);
LOG.info("HA child reconnected handleNodeReConnected {}",
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAJobScheduler;
import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalAugmentationMerger;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAJobScheduler;
import org.opendaylight.netvirt.elan.l2gw.ha.merge.GlobalAugmentationMerger;
Futures.addCallback(tx.read(srcPath), new FutureCallback<Optional<Node>>() {
@Override
public void onSuccess(Optional<Node> nodeOptional) {
Futures.addCallback(tx.read(srcPath), new FutureCallback<Optional<Node>>() {
@Override
public void onSuccess(Optional<Node> nodeOptional) {
- HAJobScheduler.getInstance().submitJob(() -> ListenableFutures.addErrorLogging(
+ HAJobScheduler.getInstance().submitJob(() -> LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
if (nodeOptional.isPresent()) {
copyGlobalNode(nodeOptional, srcPath, dstPath, datastoreType, tx);
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
if (nodeOptional.isPresent()) {
copyGlobalNode(nodeOptional, srcPath, dstPath, datastoreType, tx);
haBuilder.setManagers(HwvtepHAUtil.buildManagersForHANode(srcGlobalNodeOptional.get(),
existingDstGlobalNodeOptional));
//Also update the manager section in config which helps in cluster reboot scenarios
haBuilder.setManagers(HwvtepHAUtil.buildManagersForHANode(srcGlobalNodeOptional.get(),
existingDstGlobalNodeOptional));
//Also update the manager section in config which helps in cluster reboot scenarios
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> haBuilder.getManagers().forEach(manager -> {
InstanceIdentifier<Managers> managerIid =
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> haBuilder.getManagers().forEach(manager -> {
InstanceIdentifier<Managers> managerIid =
@Override
public void onSuccess(Optional<Node> nodeOptional) {
HAJobScheduler.getInstance().submitJob(() -> {
@Override
public void onSuccess(Optional<Node> nodeOptional) {
HAJobScheduler.getInstance().submitJob(() -> {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
if (nodeOptional.isPresent()) {
copyPSNode(nodeOptional,
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
if (nodeOptional.isPresent()) {
copyPSNode(nodeOptional,
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.infrautils.metrics.MetricProvider;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.infrautils.metrics.MetricProvider;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.handlers.HAEventHandler;
import org.opendaylight.netvirt.elan.l2gw.ha.handlers.IHAEventHandler;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.handlers.HAEventHandler;
import org.opendaylight.netvirt.elan.l2gw.ha.handlers.IHAEventHandler;
LOG.trace("Ha enabled child node connected {}", childNode.getNodeId().getValue());
try {
nodeCopier.copyGlobalNode(Optional.fromNullable(childNode), childGlobalPath, haNodePath, OPERATIONAL, tx);
LOG.trace("Ha enabled child node connected {}", childNode.getNodeId().getValue());
try {
nodeCopier.copyGlobalNode(Optional.fromNullable(childNode), childGlobalPath, haNodePath, OPERATIONAL, tx);
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
confTx -> nodeCopier.copyGlobalNode(Optional.fromNullable(null), haNodePath, childGlobalPath,
CONFIGURATION, confTx)), LOG, "Error copying to configuration");
} catch (InterruptedException | ExecutionException e) {
confTx -> nodeCopier.copyGlobalNode(Optional.fromNullable(null), haNodePath, childGlobalPath,
CONFIGURATION, confTx)), LOG, "Error copying to configuration");
} catch (InterruptedException | ExecutionException e) {
try {
nodeCopier.copyPSNode(Optional.fromNullable(childPsNode), childPsPath, haPsPath, haGlobalPath,
OPERATIONAL, tx);
try {
nodeCopier.copyPSNode(Optional.fromNullable(childPsNode), childPsPath, haPsPath, haGlobalPath,
OPERATIONAL, tx);
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
confTx -> nodeCopier.copyPSNode(Optional.fromNullable(null), haPsPath, childPsPath, childGlobalPath,
CONFIGURATION, confTx)), LOG, "Error copying to configuration");
} catch (InterruptedException | ExecutionException e) {
confTx -> nodeCopier.copyPSNode(Optional.fromNullable(null), haPsPath, childPsPath, childGlobalPath,
CONFIGURATION, confTx)), LOG, "Error copying to configuration");
} catch (InterruptedException | ExecutionException e) {
import org.opendaylight.infrautils.metrics.Meter;
import org.opendaylight.infrautils.metrics.MetricDescriptor;
import org.opendaylight.infrautils.metrics.MetricProvider;
import org.opendaylight.infrautils.metrics.Meter;
import org.opendaylight.infrautils.metrics.MetricDescriptor;
import org.opendaylight.infrautils.metrics.MetricProvider;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation;
@Override
public void onDataTreeChanged(final Collection<DataTreeModification<Node>> changes) {
@Override
public void onDataTreeChanged(final Collection<DataTreeModification<Node>> changes) {
- HAJobScheduler.getInstance().submitJob(() -> ListenableFutures.addErrorLogging(
+ HAJobScheduler.getInstance().submitJob(() -> LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
processConnectedNodes(changes, tx);
processUpdatedNodes(changes, tx);
txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
processConnectedNodes(changes, tx);
processUpdatedNodes(changes, tx);
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.commands.MergeCommand;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.netvirt.elan.l2gw.ha.commands.MergeCommand;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
LOG.trace("Copy child op data {} to parent {}", mergeCommand.getDescription(), getNodeId(parent));
T parentData = mergeCommand.transform(parent, data);
InstanceIdentifier<T> parentIdentifier = mergeCommand.generateId(parent, parentData);
LOG.trace("Copy child op data {} to parent {}", mergeCommand.getDescription(), getNodeId(parent));
T parentData = mergeCommand.transform(parent, data);
InstanceIdentifier<T> parentIdentifier = mergeCommand.generateId(parent, parentData);
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType,
tx -> writeToMdsal(tx, parentData, parentIdentifier)), LOG, "Error copying to parent");
}
}
tx -> writeToMdsal(tx, parentData, parentIdentifier)), LOG, "Error copying to parent");
}
}
}
InstanceIdentifier<Node> parent = getHAParent(identifier);
if (parent != null) {
}
InstanceIdentifier<Node> parent = getHAParent(identifier);
if (parent != null) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
if (isNodeConnected(identifier)) {
LOG.trace("Copy child op data {} to parent {} create:{}", mergeCommand.getDescription(),
getNodeId(parent), false);
if (isNodeConnected(identifier)) {
LOG.trace("Copy child op data {} to parent {} create:{}", mergeCommand.getDescription(),
getNodeId(parent), false);
private void copyToChildren(final InstanceIdentifier<T> parentIdentifier, final T parentData) {
Set<InstanceIdentifier<Node>> children = getChildrenForHANode(parentIdentifier);
if (children != null) {
private void copyToChildren(final InstanceIdentifier<T> parentIdentifier, final T parentData) {
Set<InstanceIdentifier<Node>> children = getChildrenForHANode(parentIdentifier);
if (children != null) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
for (InstanceIdentifier<Node> child : children) {
LOG.trace("Copy parent config data {} to child {}", mergeCommand.getDescription(),
getNodeId(child));
for (InstanceIdentifier<Node> child : children) {
LOG.trace("Copy parent config data {} to child {}", mergeCommand.getDescription(),
getNodeId(child));
private void deleteFromChildren(final InstanceIdentifier<T> parentIdentifier, final T parentData) {
Set<InstanceIdentifier<Node>> children = getChildrenForHANode(parentIdentifier);
if (children != null) {
private void deleteFromChildren(final InstanceIdentifier<T> parentIdentifier, final T parentData) {
Set<InstanceIdentifier<Node>> children = getChildrenForHANode(parentIdentifier);
if (children != null) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(datastoreType, tx -> {
for (InstanceIdentifier<Node> child : children) {
LOG.trace("Delete parent config data {} to child {}", mergeCommand.getDescription(),
getNodeId(child));
for (InstanceIdentifier<Node> child : children) {
LOG.trace("Delete parent config data {} to child {}", mergeCommand.getDescription(),
getNodeId(child));
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
LOG.trace("no of buckets mismatched {} {}", elanInstance.getElanInstanceName(),
update.key().getGroupId());
elanClusterUtils.runOnlyInOwnerNode(elanInstance.getElanInstanceName(), "updating broadcast group", () -> {
LOG.trace("no of buckets mismatched {} {}", elanInstance.getElanInstanceName(),
update.key().getGroupId());
elanClusterUtils.runOnlyInOwnerNode(elanInstance.getElanInstanceName(), "updating broadcast group", () -> {
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
confTx -> elanL2GatewayMulticastUtils.setupElanBroadcastGroups(elanInstance, dpnId, confTx)),
LOG, "Error setting up ELAN BGs");
return null;
confTx -> elanL2GatewayMulticastUtils.setupElanBroadcastGroups(elanInstance, dpnId, confTx)),
LOG, "Error setting up ELAN BGs");
return null;
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
import org.opendaylight.genius.infra.ManagedNewTransactionRunner;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.utils.L2GatewayConnectionUtils;
import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
import org.opendaylight.netvirt.elan.l2gw.utils.L2GatewayConnectionUtils;
import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
- ListenableFutures.addErrorLogging(future, LOG,
+ LoggingFutures.addErrorLogging(future, LOG,
"Failed to delete associate L2 gateway connection while deleting network");
return Collections.singletonList(future);
});
"Failed to delete associate L2 gateway connection while deleting network");
return Collections.singletonList(future);
});
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundConstants;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
private void updateConfigTunnelIp(InstanceIdentifier<PhysicalSwitchAugmentation> identifier,
PhysicalSwitchAugmentation phySwitchAdded) {
if (phySwitchAdded.getTunnelIps() != null) {
private void updateConfigTunnelIp(InstanceIdentifier<PhysicalSwitchAugmentation> identifier,
PhysicalSwitchAugmentation phySwitchAdded) {
if (phySwitchAdded.getTunnelIps() != null) {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
Optional<PhysicalSwitchAugmentation> existingSwitch = tx.read(identifier).get();
PhysicalSwitchAugmentationBuilder psBuilder = new PhysicalSwitchAugmentationBuilder();
txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
Optional<PhysicalSwitchAugmentation> existingSwitch = tx.read(identifier).get();
PhysicalSwitchAugmentationBuilder psBuilder = new PhysicalSwitchAugmentationBuilder();
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.l2gw.ha.listeners.HAOpClusteredListener;
return;
}
// TODO skitt we're only using read transactions here
return;
}
// TODO skitt we're only using read transactions here
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL,
tx -> haOpClusteredListener.onGlobalNodeAdd(nodeIid, modification.getRootNode().getDataAfter(), tx)), LOG,
"Error processing added parent");
if (!isHAChild(nodeIid)) {
tx -> haOpClusteredListener.onGlobalNodeAdd(nodeIid, modification.getRootNode().getDataAfter(), tx)), LOG,
"Error processing added parent");
if (!isHAChild(nodeIid)) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
LOG.trace("On parent add {}", nodeIid);
Node operNode = modification.getRootNode().getDataAfter();
Set<LocalUcastMacs> configMacs = getMacs(tx.read(nodeIid).get().orNull());
LOG.trace("On parent add {}", nodeIid);
Node operNode = modification.getRootNode().getDataAfter();
Set<LocalUcastMacs> configMacs = getMacs(tx.read(nodeIid).get().orNull());
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.l2gw.jobs.HwvtepDeviceMcastMacUpdateJob;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.utils.ElanItmUtils;
import org.opendaylight.netvirt.elan.l2gw.jobs.HwvtepDeviceMcastMacUpdateJob;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.utils.ElanItmUtils;
*/
public void handleMcastForElanL2GwDeviceAdd(String elanName, L2GatewayDevice device) {
InstanceIdentifier<ExternalTeps> tepPath = buildExternalTepPath(elanName, device.getTunnelIp());
*/
public void handleMcastForElanL2GwDeviceAdd(String elanName, L2GatewayDevice device) {
InstanceIdentifier<ExternalTeps> tepPath = buildExternalTepPath(elanName, device.getTunnelIp());
- JdkFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
tx -> tx.put(tepPath, buildExternalTeps(device))), LOG, "Failed to write to config external tep {}",
tepPath);
updateMcastMacsForAllElanDevices(elanName, device, true/* updateThisDevice */);
tx -> tx.put(tepPath, buildExternalTeps(device))), LOG, "Failed to write to config external tep {}",
tepPath);
updateMcastMacsForAllElanDevices(elanName, device, true/* updateThisDevice */);
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
if (!optionalElan.isPresent()) {
return;
}
if (!optionalElan.isPresent()) {
return;
}
- JdkFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
new ManagedNewTransactionRunnerImpl(dataBroker).callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
tx -> optionalElan.get().nonnullElanInstance().stream()
.flatMap(elan -> elan.nonnullExternalTeps().stream()
new ManagedNewTransactionRunnerImpl(dataBroker).callWithNewReadWriteTransactionAndSubmit(CONFIGURATION,
tx -> optionalElan.get().nonnullElanInstance().stream()
.flatMap(elan -> elan.nonnullExternalTeps().stream()
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.utils.hwvtep.HwvtepSouthboundUtils;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.utils.Scheduler;
import org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayCache;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.utils.Scheduler;
import org.opendaylight.netvirt.neutronvpn.api.l2gw.L2GatewayCache;
final String staleLogicalSwitch) {
LOG.trace("CleanupStaleBindings for logical switch {}", staleLogicalSwitch);
final String staleLogicalSwitch) {
LOG.trace("CleanupStaleBindings for logical switch {}", staleLogicalSwitch);
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
if (vlans.containsKey(staleLogicalSwitch)) {
vlans.get(staleLogicalSwitch).forEach((vlanIid) -> tx.delete(vlanIid));
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
if (vlans.containsKey(staleLogicalSwitch)) {
vlans.get(staleLogicalSwitch).forEach((vlanIid) -> tx.delete(vlanIid));
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntries;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.elan._interface.StaticMacEntries;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry;
flowTx -> elanUtils.deleteMacFlows(elanInfo, interfaceInfo, macEntry, flowTx)));
}));
for (ListenableFuture<Void> future : futures) {
flowTx -> elanUtils.deleteMacFlows(elanInfo, interfaceInfo, macEntry, flowTx)));
}));
for (ListenableFuture<Void> future : futures) {
- ListenableFutures.addErrorLogging(future, LOG, "Error deleting ELAN interface forwarding entries");
+ LoggingFutures.addErrorLogging(future, LOG, "Error deleting ELAN interface forwarding entries");
import java.util.concurrent.Future;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.concurrent.Future;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.genius.mdsalutil.packet.ARP;
import org.opendaylight.genius.mdsalutil.packet.Ethernet;
import org.opendaylight.genius.mdsalutil.packet.IPv4;
import org.opendaylight.genius.mdsalutil.packet.ARP;
import org.opendaylight.genius.mdsalutil.packet.Ethernet;
import org.opendaylight.genius.mdsalutil.packet.IPv4;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
public static void releaseId(IdManagerService idManager, String poolName, String idKey) {
ReleaseIdInput releaseIdInput = new ReleaseIdInputBuilder().setPoolName(poolName).setIdKey(idKey).build();
public static void releaseId(IdManagerService idManager, String poolName, String idKey) {
ReleaseIdInput releaseIdInput = new ReleaseIdInputBuilder().setPoolName(poolName).setIdKey(idKey).build();
- JdkFutures.addErrorLogging(idManager.releaseId(releaseIdInput), LOG, "Release Id");
+ LoggingFutures.addErrorLogging(idManager.releaseId(releaseIdInput), LOG, "Release Id");
public void addDmacRedirectToDispatcherFlows(Long elanTag, String displayName,
String macAddress, List<BigInteger> dpnIds) {
for (BigInteger dpId : dpnIds) {
public void addDmacRedirectToDispatcherFlows(Long elanTag, String displayName,
String macAddress, List<BigInteger> dpnIds) {
for (BigInteger dpId : dpnIds) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION,
tx -> mdsalManager.addFlow(tx, buildDmacRedirectToDispatcherFlow(dpId, macAddress, displayName,
elanTag))), LOG,
"Error adding DMAC redirect to dispatcher flows");
tx -> mdsalManager.addFlow(tx, buildDmacRedirectToDispatcherFlow(dpId, macAddress, displayName,
elanTag))), LOG,
"Error adding DMAC redirect to dispatcher flows");
}
public void removeDmacRedirectToDispatcherFlows(Long elanTag, String macAddress, List<BigInteger> dpnIds) {
}
public void removeDmacRedirectToDispatcherFlows(Long elanTag, String macAddress, List<BigInteger> dpnIds) {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION, tx -> {
for (BigInteger dpId : dpnIds) {
String flowId = getKnownDynamicmacFlowRef(NwConstants.ELAN_DMAC_TABLE, dpId, macAddress, elanTag);
txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION, tx -> {
for (BigInteger dpId : dpnIds) {
String flowId = getKnownDynamicmacFlowRef(NwConstants.ELAN_DMAC_TABLE, dpId, macAddress, elanTag);
int lportTag) {
LOG.info("Removing the ARP responder flow on DPN {} of Interface {} with IP {}", dpnId, ingressInterfaceName,
ipAddress);
int lportTag) {
LOG.info("Removing the ARP responder flow on DPN {} of Interface {} with IP {}", dpnId, ingressInterfaceName,
ipAddress);
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(Datastore.CONFIGURATION,
tx -> mdsalManager.removeFlow(tx, dpnId, ArpResponderUtil.getFlowId(lportTag, ipAddress),
NwConstants.ARP_RESPONDER_TABLE)), LOG, "Error removing ARP responder flow");
}
tx -> mdsalManager.removeFlow(tx, dpnId, ArpResponderUtil.getFlowId(lportTag, ipAddress),
NwConstants.ARP_RESPONDER_TABLE)), LOG, "Error removing ARP responder flow");
}
import org.opendaylight.genius.infra.TypedReadTransaction;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.infra.TypedWriteTransaction;
import org.opendaylight.genius.infra.TypedReadTransaction;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.infra.TypedWriteTransaction;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.internal.ElanBridgeManager;
import org.opendaylight.netvirt.elanmanager.api.IElanService;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.internal.ElanBridgeManager;
import org.opendaylight.netvirt.elanmanager.api.IElanService;
}
public void updateTransportZone(String zoneNamePrefix, BigInteger dpnId) {
}
public void updateTransportZone(String zoneNamePrefix, BigInteger dpnId) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
Map<String, String> localIps = getDpnLocalIps(dpnId);
if (!localIps.isEmpty()) {
LOG.debug("Will use local_ips for transport zone update for dpn {} and zone name prefix {}", dpnId,
Map<String, String> localIps = getDpnLocalIps(dpnId);
if (!localIps.isEmpty()) {
LOG.debug("Will use local_ips for transport zone update for dpn {} and zone name prefix {}", dpnId,
}
public void deleteTransportZone(String zoneNamePrefix, BigInteger dpnId) {
}
public void deleteTransportZone(String zoneNamePrefix, BigInteger dpnId) {
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
Map<String, String> localIps = getDpnLocalIps(dpnId);
if (!localIps.isEmpty()) {
LOG.debug("Will use local_ips for transport zone delete for dpn {} and zone name prefix {}", dpnId,
Map<String, String> localIps = getDpnLocalIps(dpnId);
if (!localIps.isEmpty()) {
LOG.debug("Will use local_ips for transport zone delete for dpn {} and zone name prefix {}", dpnId,
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
BigInteger dpId = dpIdOpt.get();
Optional<DPNTEPsInfo> dpnTepsInfoOpt = getDpnTepsInfo(dpId, tx);
if (!dpnTepsInfoOpt.isPresent()) {
BigInteger dpId = dpIdOpt.get();
Optional<DPNTEPsInfo> dpnTepsInfoOpt = getDpnTepsInfo(dpId, tx);
if (!dpnTepsInfoOpt.isPresent()) {