Remove unnecessary global map
Small refactoring - the currentOperations map was not needed and
was removed.
Change-Id: Idc06ea2ea616a5609992d2a04e0d75a49539f560
diff --git a/src/main/java/net/onrc/onos/core/matchaction/MatchActionComponent.java b/src/main/java/net/onrc/onos/core/matchaction/MatchActionComponent.java
index 83ad467..da24d4d 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/MatchActionComponent.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/MatchActionComponent.java
@@ -366,19 +366,6 @@
}
}
- private final HashSet<MatchAction> currentOperations = new HashSet<>();
-
- private boolean processMatchActionEntries(
- final List<MatchActionOperationEntry> entries) {
- int successfulOperations = 0;
- for (final MatchActionOperationEntry entry : entries) {
- if (currentOperations.add(entry.getTarget())) {
- successfulOperations++;
- }
- }
- return entries.size() == successfulOperations;
- }
-
@Override
public boolean addMatchAction(MatchAction matchAction) {
return false;
@@ -386,14 +373,14 @@
@Override
public Set<MatchAction> getMatchActions() {
- // return Collections.unmodifiableSet(currentOperations);
- return new HashSet<MatchAction>(matchActionMap.values());
+ return new HashSet<>(matchActionMap.values());
}
@Override
public boolean executeOperations(final MatchActionOperations operations) {
installMatchActionOperations(operations);
- return processMatchActionEntries(operations.getOperations());
+ // TODO how to generate an actual error response here
+ return true;
}
@Override