for (BigInteger dpnId : elanDpnInterfacesByName.keySet()) {
for (String interfaceName : elanDpnInterfacesByName.get(dpnId)) {
LOG.debug("Install Dhcp Entries for dpId: {} interface : {}", dpnId, interfaceName);
- DhcpAllocationPoolAddJob job = new DhcpAllocationPoolAddJob(dhcpAllocationPoolManager, dataBroker,
- interfaceName, dpnId);
+ DhcpAllocationPoolAddJob job = new DhcpAllocationPoolAddJob(dataBroker,
+ interfaceName);
dataStoreJobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), job,
DhcpMConstants.RETRY_COUNT);
}
Map<BigInteger, List<String>> elanDpnInterfacesByName = getDpnInterfacesByNetwork(networkId);
for (BigInteger dpnId : elanDpnInterfacesByName.keySet()) {
for (String interfaceName : elanDpnInterfacesByName.get(dpnId)) {
- DhcpAllocationPoolRemoveJob job = new DhcpAllocationPoolRemoveJob(dhcpAllocationPoolManager, dataBroker,
- interfaceName, dpnId);
+ DhcpAllocationPoolRemoveJob job = new DhcpAllocationPoolRemoveJob(dataBroker,
+ interfaceName);
dataStoreJobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), job,
DhcpMConstants.RETRY_COUNT);
}
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
vmMacAddress, NwConstants.ADD_FLOW, mdsalUtil, tx);
}
- public void handleTunnelStateDown(IpAddress tunnelIp, BigInteger interfaceDpn,
- List<ListenableFuture<Void>> futures) {
+ public List<ListenableFuture<Void>> handleTunnelStateDown(IpAddress tunnelIp, BigInteger interfaceDpn) {
LOG.trace("In handleTunnelStateDown tunnelIp {}, interfaceDpn {}", tunnelIp, interfaceDpn);
if (interfaceDpn == null) {
- return;
+ return Collections.emptyList();
}
try {
synchronized (getTunnelIpDpnKey(tunnelIp, interfaceDpn)) {
Set<Pair<IpAddress, String>> tunnelElanPairSet =
designatedDpnsToTunnelIpElanNameCache.get(interfaceDpn);
if (tunnelElanPairSet == null || tunnelElanPairSet.isEmpty()) {
- return;
+ return Collections.emptyList();
}
WriteTransaction tx = broker.newWriteOnlyTransaction();
for (Pair<IpAddress, String> tunnelElanPair : tunnelElanPairSet) {
LOG.trace("Couldn't find device for given tunnelIpElanPair {} in L2GwConnCache",
tunnelElanPair);
tx.cancel();
- return;
+ return Collections.emptyList();
}
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(broker);
dpns.remove(interfaceDpn);
updateCacheAndInstallNewFlows(interfaceDpn, dpns, tunnelElanPair, tx);
}
}
- futures.add(tx.submit());
+ return Collections.singletonList(tx.submit());
}
} catch (ExecutionException e) {
LOG.error("Error in handleTunnelStateDown {}", e.getMessage());
LOG.trace("Exception details {}", e);
+ return Collections.emptyList();
}
}
return tunnelInterface.getOperStatus() == OperStatus.Up;
}
- public void handleTunnelStateUp(IpAddress tunnelIp, BigInteger interfaceDpn, List<ListenableFuture<Void>> futures) {
+ public List<ListenableFuture<Void>> handleTunnelStateUp(IpAddress tunnelIp, BigInteger interfaceDpn) {
LOG.trace("In handleTunnelStateUp tunnelIp {}, interfaceDpn {}", tunnelIp, interfaceDpn);
synchronized (getTunnelIpDpnKey(tunnelIp, interfaceDpn)) {
Set<Pair<IpAddress, String>> tunnelIpElanPair =
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(broker);
if (tunnelIpElanPair == null || tunnelIpElanPair.isEmpty()) {
LOG.trace("There are no undesignated DPNs");
- return;
+ return Collections.emptyList();
}
WriteTransaction tx = broker.newWriteOnlyTransaction();
for (Pair<IpAddress, String> pair : tunnelIpElanPair) {
}
}
}
- futures.add(tx.submit());
+ return Collections.singletonList(tx.submit());
}
}
package org.opendaylight.netvirt.dhcpservice;
-import com.google.common.util.concurrent.ListenableFuture;
-
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collections;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
@Override
protected void remove(InstanceIdentifier<Interface> identifier, Interface del) {
dataStoreJobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(del.getName()), () -> {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
IfTunnel tunnelInterface = del.getAugmentation(IfTunnel.class);
IfL2vlan vlanInterface = del.getAugmentation(IfL2vlan.class);
String interfaceName = del.getName();
LOG.trace("Calling handleTunnelStateDown for tunnelIp {} and interface {}",
tunnelIp, interfaceName);
}
- dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp,
- interfce.getDatapathNodeIdentifier(), futures);
- return futures;
+ return dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp,
+ interfce.getDatapathNodeIdentifier());
}
}
if (vlanInterface != null) {
WriteTransaction unbindTx = dataBroker.newWriteOnlyTransaction();
DhcpServiceUtils.unbindDhcpService(interfaceName, unbindTx);
- futures.add(unbindTx.submit());
+ return Collections.singletonList(unbindTx.submit());
}
- return futures;
+ return Collections.emptyList();
}, DhcpMConstants.RETRY_COUNT);
}
@Override
protected void add(InstanceIdentifier<Interface> identifier, Interface add) {
dataStoreJobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(add.getName()), () -> {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
String interfaceName = add.getName();
IfL2vlan vlanInterface = add.getAugmentation(IfL2vlan.class);
if (vlanInterface == null) {
- return futures;
+ return Collections.emptyList();
}
Port port = dhcpManager.getNeutronPort(interfaceName);
Subnet subnet = dhcpManager.getNeutronSubnet(port);
LOG.debug("Binding DHCP service for interface {}", interfaceName);
}
DhcpServiceUtils.bindDhcpService(interfaceName, NwConstants.DHCP_TABLE, bindServiceTx);
- futures.add(bindServiceTx.submit());
+ return Collections.singletonList(bindServiceTx.submit());
}
- return futures;
+ return Collections.emptyList();
}, DhcpMConstants.RETRY_COUNT);
}
NodeConnectorId nodeConnectorId = new NodeConnectorId(ofportIds.get(0));
BigInteger dpnId = BigInteger.valueOf(MDSALUtil.getDpnIdFromPortName(nodeConnectorId));
String interfaceName = update.getName();
- DhcpInterfaceUpdateJob job = new DhcpInterfaceUpdateJob(dhcpManager, dhcpExternalTunnelManager, dataBroker,
+ DhcpInterfaceUpdateJob job = new DhcpInterfaceUpdateJob(dhcpExternalTunnelManager, dataBroker,
interfaceName, dpnId, update.getOperStatus(), interfaceManager);
dataStoreJobCoordinator.enqueueJob(DhcpServiceUtils.getJobKey(interfaceName), job, DhcpMConstants.RETRY_COUNT);
}
*/
package org.opendaylight.netvirt.dhcpservice;
-import com.google.common.util.concurrent.ListenableFuture;
import java.math.BigInteger;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
DataStoreJobCoordinator portDataStoreCoordinator = DataStoreJobCoordinator.getInstance();
portDataStoreCoordinator.enqueueJob(getJobKey(del), () -> {
WriteTransaction wrtConfigTxn = broker.newWriteOnlyTransaction();
- List<ListenableFuture<Void>> futures = new ArrayList<>();
DhcpServiceUtils.removeSubnetDhcpPortData(del, subnetDhcpPortIdfr -> wrtConfigTxn
.delete(LogicalDatastoreType.CONFIGURATION, subnetDhcpPortIdfr));
processArpResponderForElanDpns(del, arpInput -> {
arpInput.getInterfaceName(), arpInput.getSpa(), arpInput.getSha(), arpInput.getDpId());
elanService.removeArpResponderFlow(arpInput);
});
- futures.add(wrtConfigTxn.submit());
- return futures;
+ return Collections.singletonList(wrtConfigTxn.submit());
});
}
if (isVnicTypeDirectOrMacVtap(del)) {
DataStoreJobCoordinator portDataStoreCoordinator = DataStoreJobCoordinator.getInstance();
portDataStoreCoordinator.enqueueJob(getJobKey(add), () -> {
WriteTransaction wrtConfigTxn = broker.newWriteOnlyTransaction();
- List<ListenableFuture<Void>> futures = new ArrayList<>();
DhcpServiceUtils.createSubnetDhcpPortData(add, (subnetDhcpPortIdfr, subnetToDhcpport) -> wrtConfigTxn
.put(LogicalDatastoreType.CONFIGURATION, subnetDhcpPortIdfr, subnetToDhcpport));
processArpResponderForElanDpns(add, arpInput -> {
arpInput.getInterfaceName(), arpInput.getSpa(), arpInput.getSha()));
elanService.addArpResponderFlow(builder.buildForInstallFlow());
});
- futures.add(wrtConfigTxn.submit());
- return futures;
+ return Collections.singletonList(wrtConfigTxn.submit());
});
}
if (!isVnicTypeDirectOrMacVtap(add)) {
*/
package org.opendaylight.netvirt.dhcpservice.jobs;
-import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.ListenableFuture;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
-
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.genius.mdsalutil.NwConstants;
-import org.opendaylight.netvirt.dhcpservice.DhcpAllocationPoolManager;
import org.opendaylight.netvirt.dhcpservice.DhcpServiceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class DhcpAllocationPoolAddJob implements Callable<List<ListenableFuture<Void>>> {
- private static final Logger LOG = LoggerFactory.getLogger(DhcpAllocationPoolAddJob.class);
- private final DhcpAllocationPoolManager dhcpAllocationPoolManager;
- DataBroker dataBroker;
- String interfaceName;
- BigInteger dpnId;
-
- private static final FutureCallback<Void> DEFAULT_CALLBACK = new FutureCallback<Void>() {
- @Override
- public void onSuccess(Void result) {
- LOG.debug("Success in Datastore write operation");
- }
-
- @Override
- public void onFailure(Throwable error) {
- LOG.error("Error in Datastore write operation", error);
- }
- };
+ private final DataBroker dataBroker;
+ private final String interfaceName;
- public DhcpAllocationPoolAddJob(DhcpAllocationPoolManager dhcpAllocationPoolManager,
- DataBroker dataBroker, String interfaceName, BigInteger dpnId) {
- super();
- this.dhcpAllocationPoolManager = dhcpAllocationPoolManager;
+ public DhcpAllocationPoolAddJob(DataBroker dataBroker, String interfaceName) {
this.dataBroker = dataBroker;
this.interfaceName = interfaceName;
- this.dpnId = dpnId;
}
@Override
- public List<ListenableFuture<Void>> call() throws Exception {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
- installDhcpEntries(interfaceName, dpnId, futures);
- return futures;
+ public List<ListenableFuture<Void>> call() {
+ return installDhcpEntries(interfaceName);
}
- private void installDhcpEntries(String interfaceName, BigInteger dpId, List<ListenableFuture<Void>> futures) {
+ private List<ListenableFuture<Void>> installDhcpEntries(String interfaceName) {
WriteTransaction bindServiceTx = dataBroker.newWriteOnlyTransaction();
DhcpServiceUtils.bindDhcpService(interfaceName, NwConstants.DHCP_TABLE, bindServiceTx);
- futures.add(bindServiceTx.submit());
+ return Collections.singletonList(bindServiceTx.submit());
}
}
\ No newline at end of file
*/
package org.opendaylight.netvirt.dhcpservice.jobs;
-import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.ListenableFuture;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
-
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.netvirt.dhcpservice.DhcpAllocationPoolManager;
import org.opendaylight.netvirt.dhcpservice.DhcpServiceUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class DhcpAllocationPoolRemoveJob implements Callable<List<ListenableFuture<Void>>> {
- private static final Logger LOG = LoggerFactory.getLogger(DhcpAllocationPoolRemoveJob.class);
- private final DhcpAllocationPoolManager dhcpAllocationPoolManager;
- DataBroker dataBroker;
- String interfaceName;
- BigInteger dpnId;
-
- private static final FutureCallback<Void> DEFAULT_CALLBACK = new FutureCallback<Void>() {
- @Override
- public void onSuccess(Void result) {
- LOG.debug("Success in Datastore write operation");
- }
-
- @Override
- public void onFailure(Throwable error) {
- LOG.error("Error in Datastore write operation", error);
- }
- };
+ private final DataBroker dataBroker;
+ private final String interfaceName;
- public DhcpAllocationPoolRemoveJob(DhcpAllocationPoolManager dhcpAllocationPoolManager,
- DataBroker dataBroker, String interfaceName, BigInteger dpnId) {
+ public DhcpAllocationPoolRemoveJob(DataBroker dataBroker, String interfaceName) {
super();
- this.dhcpAllocationPoolManager = dhcpAllocationPoolManager;
this.dataBroker = dataBroker;
this.interfaceName = interfaceName;
- this.dpnId = dpnId;
}
@Override
public List<ListenableFuture<Void>> call() throws Exception {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
- unInstallDhcpEntries(interfaceName, dpnId, futures);
- return futures;
+ return unInstallDhcpEntries(interfaceName);
}
- private void unInstallDhcpEntries(String interfaceName, BigInteger dpId, List<ListenableFuture<Void>> futures) {
+ private List<ListenableFuture<Void>> unInstallDhcpEntries(String interfaceName) {
WriteTransaction unbindServiceTx = dataBroker.newWriteOnlyTransaction();
DhcpServiceUtils.unbindDhcpService(interfaceName, unbindServiceTx);
- futures.add(unbindServiceTx.submit());
+ return Collections.singletonList(unbindServiceTx.submit());
}
}
public class DhcpInterfaceAddJob implements Callable<List<ListenableFuture<Void>>> {
private static final Logger LOG = LoggerFactory.getLogger(DhcpInterfaceAddJob.class);
- DhcpManager dhcpManager;
- DhcpExternalTunnelManager dhcpExternalTunnelManager;
- DataBroker dataBroker;
+ private final DhcpManager dhcpManager;
+ private final DhcpExternalTunnelManager dhcpExternalTunnelManager;
+ private final DataBroker dataBroker;
private final Interface interfaceAdd;
- BigInteger dpnId;
- IInterfaceManager interfaceManager;
+ private final BigInteger dpnId;
+ private final IInterfaceManager interfaceManager;
private final IElanService elanService;
private static final FutureCallback<Void> DEFAULT_CALLBACK = new FutureCallback<Void>() {
@Override
@Override
public List<ListenableFuture<Void>> call() throws Exception {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
String interfaceName = interfaceAdd.getName();
LOG.trace("Received add DCN for interface {}, dpid {}", interfaceName, dpnId);
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface =
IpAddress tunnelIp = tunnelInterface.getTunnelDestination();
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(dataBroker);
if (dpns.contains(dpnId)) {
- dhcpExternalTunnelManager.handleTunnelStateUp(tunnelIp, dpnId, futures);
+ return dhcpExternalTunnelManager.handleTunnelStateUp(tunnelIp, dpnId);
}
- return futures;
+ return Collections.emptyList();
}
}
if (!dpnId.equals(DhcpMConstants.INVALID_DPID)) {
LOG.debug("DHCP is not enabled for port {}", port.getName());
return Collections.emptyList();
}
+ List<ListenableFuture<Void>> futures = new ArrayList<>();
LOG.info("DhcpInterfaceEventListener add isEnableDhcp:{}", subnet.isEnableDhcp());
- installDhcpEntries(interfaceAdd.getName(), dpnId, futures);
+ futures.addAll(installDhcpEntries(interfaceAdd.getName(), dpnId));
LOG.trace("Checking ElanDpnInterface {} for dpn {} ", interfaceName, dpnId);
String subnetId = subnet.getUuid().getValue();
java.util.Optional<SubnetToDhcpPort> subnetToDhcp = DhcpServiceUtils
builder.setInstructions(ArpResponderUtil.getInterfaceInstructions(interfaceManager, interfaceName,
subnetToDhcp.get().getPortFixedip(), subnetToDhcp.get().getPortMacaddress()));
elanService.addArpResponderFlow(builder.buildForInstallFlow());
+ return futures;
}
- return futures;
+ return Collections.emptyList();
}
- private void installDhcpEntries(String interfaceName, BigInteger dpId, List<ListenableFuture<Void>> futures) {
+ private List<ListenableFuture<Void>> installDhcpEntries(String interfaceName, BigInteger dpId) {
String vmMacAddress = getAndUpdateVmMacAddress(interfaceName);
WriteTransaction flowTx = dataBroker.newWriteOnlyTransaction();
dhcpManager.installDhcpEntries(dpId, vmMacAddress, flowTx);
- futures.add(flowTx.submit());
+ return Collections.singletonList(flowTx.submit());
}
private String getAndUpdateVmMacAddress(String interfaceName) {
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.ListenableFuture;
import java.math.BigInteger;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
public class DhcpInterfaceRemoveJob implements Callable<List<ListenableFuture<Void>>> {
private static final Logger LOG = LoggerFactory.getLogger(DhcpInterfaceRemoveJob.class);
- DhcpManager dhcpManager;
- DhcpExternalTunnelManager dhcpExternalTunnelManager;
- DataBroker dataBroker;
- Interface interfaceDel;
- BigInteger dpnId;
- IInterfaceManager interfaceManager;
+ private final DhcpManager dhcpManager;
+ private final DhcpExternalTunnelManager dhcpExternalTunnelManager;
+ private final DataBroker dataBroker;
+ private final Interface interfaceDel;
+ private final BigInteger dpnId;
+ private final IInterfaceManager interfaceManager;
private final IElanService elanService;
private static final FutureCallback<Void> DEFAULT_CALLBACK = new FutureCallback<Void>() {
@Override
@Override
public List<ListenableFuture<Void>> call() throws Exception {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
String interfaceName = interfaceDel.getName();
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface =
interfaceManager.getInterfaceInfoFromConfigDataStore(interfaceName);
IpAddress tunnelIp = tunnelInterface.getTunnelDestination();
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(dataBroker);
if (dpns.contains(dpnId)) {
- dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp, dpnId, futures);
+ return dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp, dpnId);
}
- return futures;
+ return Collections.emptyList();
}
}
Port port = dhcpManager.getNeutronPort(interfaceName);
elanService.removeArpResponderFlow(arpInput);
}
}
- unInstallDhcpEntries(interfaceDel.getName(), dpnId, futures);
- return futures;
+ return unInstallDhcpEntries(interfaceDel.getName(), dpnId);
}
- private void unInstallDhcpEntries(String interfaceName, BigInteger dpId, List<ListenableFuture<Void>> futures) {
+ private List<ListenableFuture<Void>> unInstallDhcpEntries(String interfaceName, BigInteger dpId) {
String vmMacAddress = getAndRemoveVmMacAddress(interfaceName);
WriteTransaction flowTx = dataBroker.newWriteOnlyTransaction();
dhcpManager.unInstallDhcpEntries(dpId, vmMacAddress, flowTx);
- futures.add(flowTx.submit());
+ return Collections.singletonList(flowTx.submit());
}
private String getAndRemoveVmMacAddress(String interfaceName) {
import com.google.common.util.concurrent.ListenableFuture;
import java.math.BigInteger;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.netvirt.dhcpservice.DhcpExternalTunnelManager;
-import org.opendaylight.netvirt.dhcpservice.DhcpManager;
import org.opendaylight.netvirt.dhcpservice.DhcpServiceUtils;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.Tunnel;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
public class DhcpInterfaceUpdateJob implements Callable<List<ListenableFuture<Void>>> {
private static final Logger LOG = LoggerFactory.getLogger(DhcpInterfaceUpdateJob.class);
- DhcpManager dhcpManager;
- DhcpExternalTunnelManager dhcpExternalTunnelManager;
- DataBroker dataBroker;
- String interfaceName;
- BigInteger dpnId;
- OperStatus operStatus;
- IInterfaceManager interfaceManager;
+ private final DhcpExternalTunnelManager dhcpExternalTunnelManager;
+ private final DataBroker dataBroker;
+ private final String interfaceName;
+ private final BigInteger dpnId;
+ private final OperStatus operStatus;
+ private final IInterfaceManager interfaceManager;
- public DhcpInterfaceUpdateJob(DhcpManager dhcpManager, DhcpExternalTunnelManager dhcpExternalTunnelManager,
+ public DhcpInterfaceUpdateJob(DhcpExternalTunnelManager dhcpExternalTunnelManager,
DataBroker dataBroker, String interfaceName, BigInteger dpnId,
OperStatus operStatus, IInterfaceManager interfaceManager) {
super();
- this.dhcpManager = dhcpManager;
this.dhcpExternalTunnelManager = dhcpExternalTunnelManager;
this.dataBroker = dataBroker;
this.interfaceName = interfaceName;
@Override
public List<ListenableFuture<Void>> call() throws Exception {
- List<ListenableFuture<Void>> futures = new ArrayList<>();
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface iface =
interfaceManager.getInterfaceInfoFromConfigDataStore(interfaceName);
if (iface == null) {
LOG.trace("Interface {} is not present in the config DS", interfaceName);
- return futures;
+ return Collections.emptyList();
}
if (Tunnel.class.equals(iface.getType())) {
IfTunnel tunnelInterface = iface.getAugmentation(IfTunnel.class);
List<BigInteger> dpns = DhcpServiceUtils.getListOfDpns(dataBroker);
if (dpns.contains(dpnId)) {
if (operStatus == OperStatus.Down) {
- dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp, dpnId, futures);
+ return dhcpExternalTunnelManager.handleTunnelStateDown(tunnelIp, dpnId);
} else if (operStatus == OperStatus.Up) {
- dhcpExternalTunnelManager.handleTunnelStateUp(tunnelIp, dpnId, futures);
+ return dhcpExternalTunnelManager.handleTunnelStateUp(tunnelIp, dpnId);
}
}
}
}
- return futures;
+ return Collections.emptyList();
}
}
\ No newline at end of file