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;
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) {
- int ifTag = interfaceInfo.getInterfaceTag();
- Flow flow = MDSALUtil.buildFlow(NwConstants.ELAN_FILTER_EQUALS_TABLE,
+ try {
+ 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,
+ 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);
+ mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flowEntity);
+ } catch (Exception e) {
+ LOG.error("Error removing flow", e);
+ throw new RuntimeException("Error removing flow", e);
+ }
}
private List<Bucket> getRemoteBCGroupBucketInfos(ElanInstance elanInfo, int bucketKeyStart,