import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ListenableFuture;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ExecutionException;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
mdsalManager.addFlowToTx(interfaceInfo.getDpId(), flowEntry, writeFlowGroupTx);
}
- // TODO skitt Fix the exception handling here
- @SuppressWarnings("checkstyle:IllegalCatch")
- @SuppressFBWarnings("REC_CATCH_EXCEPTION")
public void removeFilterEqualsTable(ElanInstance elanInfo, InterfaceInfo interfaceInfo,
- TypedReadWriteTransaction<Configuration> flowTx) {
- try {
- int ifTag = interfaceInfo.getInterfaceTag();
- Flow flow = MDSALUtil.buildFlow(NwConstants.ELAN_FILTER_EQUALS_TABLE,
- getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "group"));
+ TypedReadWriteTransaction<Configuration> flowTx) throws ExecutionException, InterruptedException {
+ int ifTag = interfaceInfo.getInterfaceTag();
+ Flow flow = MDSALUtil.buildFlow(NwConstants.ELAN_FILTER_EQUALS_TABLE,
+ getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "group"));
- mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flow);
+ mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flow);
- Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE,
- getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "drop"), 10, elanInfo.getElanInstanceName(), 0,
- 0, ElanConstants.COOKIE_ELAN_FILTER_EQUALS.add(BigInteger.valueOf(ifTag)),
- getMatchesForFilterEqualsLPortTag(ifTag), MDSALUtil.buildInstructionsDrop());
+ Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE,
+ getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "drop"), 10, elanInfo.getElanInstanceName(), 0,
+ 0, ElanConstants.COOKIE_ELAN_FILTER_EQUALS.add(BigInteger.valueOf(ifTag)),
+ getMatchesForFilterEqualsLPortTag(ifTag), MDSALUtil.buildInstructionsDrop());
- mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flowEntity);
- } catch (Exception e) {
- LOG.error("Error removing flow", e);
- throw new RuntimeException("Error removing flow", e);
- }
+ mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flowEntity);
}
private List<Bucket> getRemoteBCGroupBucketInfos(ElanInstance elanInfo, int bucketKeyStart,