This drops exception declarations which are never used.
Change-Id: I754690dcd1aa17dcd9b56fb290dcf173d2f6fc08
Signed-off-by: Stephen Kitt <skitt@redhat.com>
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.Nullable;
cancelPreviousReplayJob();
}
Runnable task = () -> {
- try {
- LOG.info("running bgp replay task ");
- if (get() == null) {
- String host = getConfigHost();
- int port = getConfigPort();
- LOG.info("connecting to bgp host {} ", host);
- bgpRouter.connect(host, port);
- LOG.info("no config to push in bgp replay task ");
- return;
- }
- setStaleStartTime(System.currentTimeMillis());
- LOG.info("started creating stale fibDSWriter map ");
- createStaleFibMap();
- setStaleEndTime(System.currentTimeMillis());
- LOG.info("took {} msecs for stale fibDSWriter map creation ", getStaleEndTime() - getStaleStartTime());
- LOG.info("started bgp config replay ");
- setCfgReplayStartTime(System.currentTimeMillis());
- boolean replaySucceded = replay();
- setCfgReplayEndTime(System.currentTimeMillis());
- LOG.info("took {} msecs for bgp replay ", getCfgReplayEndTime() - getCfgReplayStartTime());
- if (replaySucceded) {
- LOG.info("starting the stale cleanup timer");
- long routeSyncTime = getStalePathtime(BGP_RESTART_ROUTE_SYNC_SEC, config.getAsId());
- setStaleCleanupTime(routeSyncTime);
- routeCleanupFuture = executor.schedule(new RouteCleanup(), routeSyncTime, TimeUnit.SECONDS);
- } else {
- staledFibEntriesMap.clear();
- }
- } catch (InterruptedException | TimeoutException | ExecutionException eCancel) {
- LOG.error("Stale Cleanup Task Cancelled", eCancel);
+ LOG.info("running bgp replay task ");
+ if (get() == null) {
+ String host = getConfigHost();
+ int port = getConfigPort();
+ LOG.info("connecting to bgp host {} ", host);
+ bgpRouter.connect(host, port);
+ LOG.info("no config to push in bgp replay task ");
+ return;
+ }
+ setStaleStartTime(System.currentTimeMillis());
+ LOG.info("started creating stale fibDSWriter map ");
+ createStaleFibMap();
+ setStaleEndTime(System.currentTimeMillis());
+ LOG.info("took {} msecs for stale fibDSWriter map creation ", getStaleEndTime() - getStaleStartTime());
+ LOG.info("started bgp config replay ");
+ setCfgReplayStartTime(System.currentTimeMillis());
+ boolean replaySucceded = replay();
+ setCfgReplayEndTime(System.currentTimeMillis());
+ LOG.info("took {} msecs for bgp replay ", getCfgReplayEndTime() - getCfgReplayStartTime());
+ if (replaySucceded) {
+ LOG.info("starting the stale cleanup timer");
+ long routeSyncTime = getStalePathtime(BGP_RESTART_ROUTE_SYNC_SEC, config.getAsId());
+ setStaleCleanupTime(routeSyncTime);
+ routeCleanupFuture = executor.schedule(new RouteCleanup(), routeSyncTime, TimeUnit.SECONDS);
+ } else {
+ staledFibEntriesMap.clear();
}
};
lastReplayJobFt = executor.submit(task);
}
@SuppressWarnings("checkstyle:IllegalCatch")
- public synchronized boolean replay() throws InterruptedException, TimeoutException, ExecutionException {
+ public synchronized boolean replay() {
boolean replaySucceded = true;
String host = getConfigHost();
int port = getConfigPort();
}
@Override
- protected Object doExecute() throws Exception {
+ protected Object doExecute() {
if (op == null) {
session.getConsole().println("Please provide valid operation");
usage();
}
@Override
- protected Object doExecute() throws Exception {
+ protected Object doExecute() {
PrintStream ps = session.getConsole();
if (debug) {
import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.genius.infra.Datastore;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
}
public static InstanceIdentifier<Pods> getPodUUIDforPodName(String podName, DataBroker dataBroker)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ throws ExecutionException, InterruptedException {
ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();
InstanceIdentifier<PodIdentifier> id = InstanceIdentifier.builder(PodidentifierInfo.class)
.child(PodIdentifier.class, new PodIdentifierKey(podName)).build();
org.opendaylight.yang.gen.v1.urn.opendaylight.coe.northbound.pod
.rev170611.pod_attributes.Interface podInterface,
TypedReadWriteTransaction<Datastore.Configuration> wrtConfigTxn)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ throws ExecutionException, InterruptedException {
String elanInstanceName = buildElanInstanceName(nodeIp, networkNS);
InstanceIdentifier<ElanInstance> id = createElanInstanceIdentifier(elanInstanceName);
ElanInstance existingElanInstance = wrtConfigTxn.read(id).get().orNull();
public static void createVpnInstance(String vpnName, List<String> rd, List<String> irt, List<String> ert,
VpnInstance.Type type, long l3vni, IpVersionChoice ipVersion,
- TypedReadWriteTransaction<Datastore.Configuration> tx)
- throws ReadFailedException {
+ TypedReadWriteTransaction<Datastore.Configuration> tx) {
List<VpnTarget> vpnTargetList = new ArrayList<>();
LOG.debug("Creating/Updating a new vpn-instance node: {} ", vpnName);
}
@Override
- protected Object doExecute() throws Exception {
+ protected Object doExecute() {
session.getConsole().println("Printing Designated Dpns To TunnelIp and ElanName cache "
+ "(DesignatedDpnsToTunnelIpElanNameCache)");
dhcpExternalTunnelManager.getDesignatedDpnsToTunnelIpElanNameCache().forEach(
package org.opendaylight.netvirt.elan.internal;
-import static java.util.Collections.emptyList;
-
import com.google.common.base.Optional;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.ArrayList;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
tx -> ElanUtils.updateOperationalDataStore(idManager, update, new ArrayList<>(), tx)),
LOG, "Error updating ELAN tag in ELAN instance");
} else {
- jobCoordinator.enqueueJob(elanName, () -> {
- try {
- return elanInterfaceManager.handleunprocessedElanInterfaces(update);
- } catch (ElanException e) {
- LOG.error("update() failed for ElanInstance: {}", identifier.toString(), e);
- return emptyList();
- }
- }, ElanConstants.JOB_MAX_RETRIES);
+ jobCoordinator.enqueueJob(elanName, () -> elanInterfaceManager.handleunprocessedElanInterfaces(update),
+ ElanConstants.JOB_MAX_RETRIES);
}
}
}
import org.opendaylight.genius.utils.ServiceIndex;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayMulticastUtils;
}), LOG, "Error procedding added ELAN interface");
}
- List<ListenableFuture<Void>> handleunprocessedElanInterfaces(ElanInstance elanInstance) throws ElanException {
+ List<ListenableFuture<Void>> handleunprocessedElanInterfaces(ElanInstance elanInstance) {
List<ListenableFuture<Void>> futures = new ArrayList<>();
Queue<ElanInterface> elanInterfaces = unProcessedElanInterfaces.get(elanInstance.getElanInstanceName());
if (elanInterfaces == null || elanInterfaces.isEmpty()) {
}
void programRemoteDmacFlow(ElanInstance elanInstance, InterfaceInfo interfaceInfo,
- WriteTransaction writeFlowGroupTx) throws ElanException {
+ WriteTransaction writeFlowGroupTx) {
ElanDpnInterfacesList elanDpnInterfacesList = elanUtils
.getElanDpnInterfacesList(elanInstance.getElanInstanceName());
List<DpnInterfaces> dpnInterfaceLists = null;
@SuppressWarnings("checkstyle:ForbidCertainMethod")
List<ListenableFuture<Void>> addElanInterface(ElanInterface elanInterface,
- InterfaceInfo interfaceInfo, ElanInstance elanInstance) throws ElanException {
+ InterfaceInfo interfaceInfo, ElanInstance elanInstance) {
Preconditions.checkNotNull(elanInstance, "elanInstance cannot be null");
Preconditions.checkNotNull(interfaceInfo, "interfaceInfo cannot be null");
Preconditions.checkNotNull(elanInterface, "elanInterface cannot be null");
@SuppressWarnings("checkstyle:ForbidCertainMethod")
List<ListenableFuture<Void>> setupEntriesForElanInterface(ElanInstance elanInstance,
- ElanInterface elanInterface, InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn)
- throws ElanException {
+ ElanInterface elanInterface, InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn) {
String elanInstanceName = elanInstance.getElanInstanceName();
String interfaceName = elanInterface.getName();
WriteTransaction tx = broker.newWriteOnlyTransaction();
private void installEntriesForElanInterface(ElanInstance elanInstance, ElanInterface elanInterface,
InterfaceInfo interfaceInfo, boolean isFirstInterfaceInDpn, WriteTransaction tx,
- WriteTransaction writeFlowGroupTx) throws ElanException {
+ WriteTransaction writeFlowGroupTx) {
if (!isOperational(interfaceInfo)) {
return;
}
// Install DMAC entry on dst DPN
@SuppressWarnings("checkstyle:ForbidCertainMethod")
public List<ListenableFuture<Void>> installDMacAddressTables(ElanInstance elanInfo, InterfaceInfo interfaceInfo,
- BigInteger dstDpId) throws ElanException {
+ BigInteger dstDpId) {
String interfaceName = interfaceInfo.getInterfaceName();
ElanInterfaceMac elanInterfaceMac = elanUtils.getElanInterfaceMacByInterfaceName(interfaceName);
if (elanInterfaceMac != null && elanInterfaceMac.getMacEntry() != null) {
* the external tunnel
* @param intrf
* the interface
- * @throws ElanException in case of issues creating the flow objects
*/
- public void handleExternalTunnelStateEvent(ExternalTunnel externalTunnel, Interface intrf) throws ElanException {
+ public void handleExternalTunnelStateEvent(ExternalTunnel externalTunnel, Interface intrf) {
if (!validateExternalTunnelStateEvent(externalTunnel, intrf)) {
return;
}
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncClusteredDataTreeChangeListenerBase;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
import org.opendaylight.netvirt.elan.utils.ElanUtils;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.Tunnel;
elanClusterUtils.runOnlyInOwnerNode("external tunnel update", () -> {
LOG.debug("running external tunnel update job for interface {} added", interfaceName);
- try {
- handleExternalTunnelUpdate(interfaceName, intrf);
- } catch (ElanException e) {
- LOG.error("Failed to add Interface {}", identifier.toString());
- }
+ handleExternalTunnelUpdate(interfaceName, intrf);
});
}
}
}
- private void handleExternalTunnelUpdate(String interfaceName, Interface update) throws ElanException {
+ private void handleExternalTunnelUpdate(String interfaceName, Interface update) {
ExternalTunnel externalTunnel = elanUtils.getExternalTunnel(interfaceName, LogicalDatastoreType.CONFIGURATION);
if (externalTunnel != null) {
LOG.debug("handling external tunnel update event for ext device dst {} src {} ",
import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elan.utils.ElanConstants;
}
@Override
- public List<ListenableFuture<Void>> call() throws Exception {
+ public List<ListenableFuture<Void>> call() {
Optional<ElanInterface> elanInterface = elanInterfaceCache.get(interfaceName);
if (!elanInterface.isPresent()) {
LOG.debug("ElanInterface Not present for interfaceName {} for add event", interfaceName);
}
private void addMacEntryToDsAndSetupFlows(String elanName, TypedWriteTransaction<Operational> interfaceTx,
- TypedWriteTransaction<Configuration> flowTx, int macTimeOut) throws ElanException {
+ TypedWriteTransaction<Configuration> flowTx, int macTimeOut) {
LOG.trace("Adding mac address {} and interface name {} to ElanInterfaceForwardingEntries and "
+ "ElanForwardingTables DS", macAddress, interfaceName);
BigInteger timeStamp = new BigInteger(String.valueOf(System.currentTimeMillis()));
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public List<ListenableFuture<Void>> call() throws Exception {
+ public List<ListenableFuture<Void>> call() {
try {
return dataChangeListener.addElanInterface(elanInterface, interfaceInfo, elanInstance);
} catch (RuntimeException e) {
@Override
- public List<ListenableFuture<Void>> call() throws Exception {
+ public List<ListenableFuture<Void>> call() {
LOG.info("Handling elan interface {} add for elan {} ", elanInterface.getName(),
elanInstance.getElanInstanceName());
return dataChangeListener.setupEntriesForElanInterface(elanInstance, elanInterface, interfaceInfo,
package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
import com.google.common.base.Optional;
-import java.util.concurrent.ExecutionException;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
InstanceIdentifier<Node> connectedNodePath,
InstanceIdentifier<Node> haNodePath,
ReadWriteTransaction tx)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ throws ReadFailedException {
if (haNodePath == null) {
return;
}
Optional<Node> haGlobalCfg,
Optional<Node> haPSCfg,
ReadWriteTransaction tx)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ throws ReadFailedException {
if (haNodePath == null) {
return;
}
package org.opendaylight.netvirt.elan.l2gw.ha.handlers;
import com.google.common.base.Optional;
-import java.util.concurrent.ExecutionException;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
InstanceIdentifier<Node> connectedNodePath,
InstanceIdentifier<Node> haNodePath,
ReadWriteTransaction tx)
- throws ReadFailedException, ExecutionException, InterruptedException;
+ throws ReadFailedException;
void handleChildNodeReConnected(Node connectedNode,
InstanceIdentifier<Node> connectedNodePath,
Optional<Node> haGlobalCfg,
Optional<Node> haPSCfg,
ReadWriteTransaction tx)
- throws ReadFailedException, ExecutionException, InterruptedException;
+ throws ReadFailedException;
void copyChildGlobalOpUpdateToHAParent(InstanceIdentifier<Node> haPath,
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import java.util.concurrent.ExecutionException;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
void onPsNodeUpdate(Node haPSUpdated,
Node haPSOriginal,
DataObjectModification<Node> mod,
- ReadWriteTransaction tx) throws InterruptedException, ExecutionException, ReadFailedException {
+ ReadWriteTransaction tx) {
//copy the ps node data to children
String psId = haPSUpdated.getNodeId().getValue();
Set<InstanceIdentifier<Node>> childSwitchIds = getPSChildrenIdsForHAPSNode(psId);
Node haUpdated,
Node haOriginal,
DataObjectModification<Node> mod,
- ReadWriteTransaction tx)
- throws InterruptedException, ExecutionException, ReadFailedException {
+ ReadWriteTransaction tx) {
Set<InstanceIdentifier<Node>> childNodeIds = getHwvtepNodeHACache().getChildrenForHANode(key);
for (InstanceIdentifier<Node> haChildNodeId : childNodeIds) {
haEventHandler.copyHAGlobalUpdateToChild(haChildNodeId, mod, tx);
Node updatedChildNode,
Node originalChildNode,
DataObjectModification<Node> mod,
- ReadWriteTransaction tx) throws ReadFailedException {
+ ReadWriteTransaction tx) {
String oldHAId = HwvtepHAUtil.getHAIdFromManagerOtherConfig(originalChildNode);
if (!Strings.isNullOrEmpty(oldHAId)) { //was already ha child
void onPsNodeUpdate(Node updatedChildPSNode,
Node originalChildPSNode,
DataObjectModification<Node> mod,
- ReadWriteTransaction tx) throws ReadFailedException {
+ ReadWriteTransaction tx) {
InstanceIdentifier<Node> childGlobalPath = HwvtepHAUtil.getGlobalNodePathFromPSNode(updatedChildPSNode);
if (isNotHAChild(childGlobalPath)) {
return;
}
private void processUpdatedNodes(Collection<DataTreeModification<Node>> changes,
- ReadWriteTransaction tx)
- throws ReadFailedException, ExecutionException, InterruptedException {
+ ReadWriteTransaction tx) {
for (DataTreeModification<Node> change : changes) {
final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
final DataObjectModification<Node> mod = change.getRootNode();
private void processDisconnectedNodes(Collection<DataTreeModification<Node>> changes,
ReadWriteTransaction tx)
- throws InterruptedException, ExecutionException, ReadFailedException {
+ throws ReadFailedException {
for (DataTreeModification<Node> change : changes) {
final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
final DataObjectModification<Node> mod = change.getRootNode();
}
void onGlobalNodeUpdate(InstanceIdentifier<Node> key, Node updated, Node original,
- DataObjectModification<Node> mod, ReadWriteTransaction tx)
- throws ReadFailedException, InterruptedException, ExecutionException {
+ DataObjectModification<Node> mod, ReadWriteTransaction tx) {
}
void onPsNodeUpdate(Node updated, Node original,
- DataObjectModification<Node> mod, ReadWriteTransaction tx)
- throws ReadFailedException, InterruptedException, ExecutionException {
+ DataObjectModification<Node> mod, ReadWriteTransaction tx) {
}
import org.opendaylight.genius.utils.hwvtep.HwvtepUtils;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
import org.opendaylight.netvirt.elan.l2gw.ha.HwvtepHAUtil;
* the elan
* @param interfaceName
* the interface name
- * @throws ElanException in case of issues creating the flow objects
*/
public void installL2gwDeviceMacsInDpn(BigInteger dpnId, NodeId l2gwDeviceNodeId, ElanInstance elan,
- String interfaceName) throws ElanException {
+ String interfaceName) {
L2GatewayDevice l2gwDevice = ElanL2GwCacheUtils.getL2GatewayDeviceFromCache(elan.getElanInstanceName(),
l2gwDeviceNodeId.getValue());
if (l2gwDevice == null) {
* the elan
* @param interfaceName
* the interface name
- * @throws ElanException in case of issues creating the flow objects
*/
public void installDmacFlowsOnDpn(BigInteger dpnId, L2GatewayDevice l2gwDevice, ElanInstance elan,
- String interfaceName) throws ElanException {
+ String interfaceName) {
String elanName = elan.getElanInstanceName();
Collection<LocalUcastMacs> l2gwDeviceLocalMacs = l2gwDevice.getUcastLocalMacs();
* the elan
* @param interfaceName
* the interface name
- * @throws ElanException in case of issues creating the flow objects
*/
- public void installElanL2gwDevicesLocalMacsInDpn(BigInteger dpnId, ElanInstance elan, String interfaceName)
- throws ElanException {
+ public void installElanL2gwDevicesLocalMacsInDpn(BigInteger dpnId, ElanInstance elan, String interfaceName) {
ConcurrentMap<String, L2GatewayDevice> elanL2GwDevicesFromCache = ElanL2GwCacheUtils
.getInvolvedL2GwDevices(elan.getElanInstanceName());
if (elanL2GwDevicesFromCache != null) {
import org.opendaylight.genius.mdsalutil.MatchInfo;
import org.opendaylight.genius.mdsalutil.NwConstants;
import org.opendaylight.genius.utils.batching.ResourceBatchingManager;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
* the interface name
*
* @return the dmac flows
- * @throws ElanException in case of issues creating the flow objects
*/
public List<ListenableFuture<Void>> installDmacFlowsToExternalRemoteMac(BigInteger dpnId,
String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
- String interfaceName) throws ElanException {
+ String interfaceName) {
synchronized (ElanUtils.getElanMacDPNKey(elanTag, macAddress, dpnId)) {
Flow flow = buildDmacFlowForExternalRemoteMac(dpnId, extDeviceNodeId, elanTag, vni, macAddress,
displayName);
* Indicates if flows must be installed or removed.
* @param interfaceName
* the interface name
- * @throws ElanException in case of issues creating the flow objects
* @see org.opendaylight.genius.mdsalutil.MDSALUtil.MdsalOp
*/
public void setupDmacFlowsToExternalRemoteMac(BigInteger dpId, String extNodeId, Long elanTag, Long vni,
- String macAddress, String elanInstanceName, MDSALUtil.MdsalOp addOrRemove, String interfaceName)
- throws ElanException {
+ String macAddress, String elanInstanceName, MDSALUtil.MdsalOp addOrRemove, String interfaceName) {
if (addOrRemove == MDSALUtil.MdsalOp.CREATION_OP) {
installDmacFlowsToExternalRemoteMac(dpId, extNodeId, elanTag, vni, macAddress, elanInstanceName,
interfaceName);
private List<ListenableFuture<Void>> installEtreeDmacFlowsToExternalRemoteMac(
BigInteger dpnId, String extDeviceNodeId, Long elanTag,
- Long vni, String macAddress, String displayName, String interfaceName) throws ElanException {
+ Long vni, String macAddress, String displayName, String interfaceName) {
EtreeLeafTagName etreeLeafTag = elanEtreeUtils.getEtreeLeafTagByElanTag(elanTag);
if (etreeLeafTag != null) {
return Lists.newArrayList(
public List<ListenableFuture<Void>> installDmacFlowsToExternalRemoteMacInBatch(
BigInteger dpnId, String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
- String interfaceName) throws ElanException {
+ String interfaceName) {
Flow flow = buildDmacFlowForExternalRemoteMac(dpnId, extDeviceNodeId, elanTag, vni, macAddress,
displayName);
private List<ListenableFuture<Void>> installEtreeDmacFlowsToExternalRemoteMacInBatch(
BigInteger dpnId, String extDeviceNodeId, Long elanTag, Long vni, String macAddress, String displayName,
- String interfaceName) throws ElanException {
+ String interfaceName) {
EtreeLeafTagName etreeLeafTag = elanEtreeUtils.getEtreeLeafTagByElanTag(elanTag);
if (etreeLeafTag != null) {
import org.opendaylight.genius.mdsalutil.packet.IPv4;
import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
-import org.opendaylight.netvirt.elan.ElanException;
import org.opendaylight.netvirt.elan.arp.responder.ArpResponderUtil;
import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
* true if remote dmac flows should be configured as well
* @param writeFlowGroupTx
* the flow group tx
- * @throws ElanException in case of issues creating the flow objects
*/
public void setupMacFlows(ElanInstance elanInfo, InterfaceInfo interfaceInfo,
long macTimeout, String macAddress, boolean configureRemoteFlows,
- WriteTransaction writeFlowGroupTx) throws ElanException {
+ WriteTransaction writeFlowGroupTx) {
synchronized (getElanMacDPNKey(elanInfo.getElanTag(), macAddress, interfaceInfo.getDpId())) {
setupKnownSmacFlow(elanInfo, interfaceInfo, macTimeout, macAddress, mdsalManager,
writeFlowGroupTx);
}
public void setupDMacFlowOnRemoteDpn(ElanInstance elanInfo, InterfaceInfo interfaceInfo, BigInteger dstDpId,
- String macAddress, WriteTransaction writeFlowTx) throws ElanException {
+ String macAddress, WriteTransaction writeFlowTx) {
String elanInstanceName = elanInfo.getElanInstanceName();
setupRemoteDmacFlow(dstDpId, interfaceInfo.getDpId(), interfaceInfo.getInterfaceTag(), elanInfo.getElanTag(),
macAddress, elanInstanceName, writeFlowTx, interfaceInfo.getInterfaceName(), elanInfo);
private void setupOrigDmacFlows(ElanInstance elanInfo, InterfaceInfo interfaceInfo, String macAddress,
boolean configureRemoteFlows, IMdsalApiManager mdsalApiManager,
- WriteTransaction writeFlowGroupTx)
- throws ElanException {
+ WriteTransaction writeFlowGroupTx) {
BigInteger dpId = interfaceInfo.getDpId();
String ifName = interfaceInfo.getInterfaceName();
long ifTag = interfaceInfo.getInterfaceTag();
public void setupRemoteDmacFlow(BigInteger srcDpId, BigInteger destDpId, int lportTag, long elanTag, String
macAddress, String displayName, WriteTransaction writeFlowGroupTx, String interfaceName, ElanInstance
- elanInstance) throws ElanException {
+ elanInstance) {
if (interfaceManager.isExternalInterface(interfaceName)) {
LOG.debug("Ignoring install remote DMAC {} flow on provider interface {} elan {}",
macAddress, interfaceName, elanInstance.getElanInstanceName());
@Override
@PreDestroy
- public void close() throws Exception {
+ public void close() {
if (registeredVpnEosListener != null) {
registeredVpnEosListener.close();
}
@Override
@PreDestroy
- public void close() throws Exception {}
+ public void close() {}
@Override
public boolean amIOwner() {
@Override
@PreDestroy
- public void close() throws Exception {
+ public void close() {
LOG.info("{} closed", getClass().getSimpleName());
}
}
}
@Override
- public List<ListenableFuture<Void>> call() throws Exception {
+ public List<ListenableFuture<Void>> call() {
List<ListenableFuture<Void>> futures = new ArrayList<>();
vpnUtil.removeMipAdjAndLearntIp(vpnName, interfaceName, ipAddress);
return futures;