Yuta HIGUCHI
Committed by Pavlin Radoslavov

DistributedFlowRuleStore: always add FlowEntry on batchStore

related to ONOS-481

[Merged from master]

Change-Id: I9f82c7d9736dab7326062af9c38ae6e290a9b818
(cherry picked from commit 08f156b4)
......@@ -421,10 +421,13 @@ public class DistributedFlowRuleStore
} else if (op.equals(FlowRuleOperation.ADD)) {
StoredFlowEntry flowEntry = new DefaultFlowEntry(flowRule);
DeviceId deviceId = flowRule.deviceId();
if (!flowEntries.containsEntry(deviceId, flowEntry)) {
flowEntries.put(deviceId, flowEntry);
toAdd.add(batchEntry);
}
Collection<StoredFlowEntry> ft = flowEntries.get(deviceId);
// always add requested FlowRule
// Note: 2 equal FlowEntry may have different treatment
ft.remove(flowEntry);
ft.add(flowEntry);
toAdd.add(batchEntry);
}
}
if (toAdd.isEmpty() && toRemove.isEmpty()) {
......