commit | 244311924c0f9980c2f353ed0dfe7d966d590b11 | [log] [tgz] |
---|---|---|
author | Saurav Das <sauravdas@alumni.stanford.edu> | Mon Mar 07 19:13:00 2016 -0800 |
committer | Ray Milkey <ray@onlab.us> | Mon Mar 21 18:04:20 2016 +0000 |
tree | 3eb67b1df56ece51b6adf44dac11d315fc028683 | |
parent | 21f4b73629ac54064f2c7902894cf340962c460d [diff] |
CLI command to help debug the mapping of next-Objectives to the groups that are created by device drivers. Change-Id: Iff9e04e5e96b2cabbdb40e83215315d2e27791a6
diff --git a/core/store/dist/src/main/java/org/onosproject/store/flowobjective/impl/DistributedFlowObjectiveStore.java b/core/store/dist/src/main/java/org/onosproject/store/flowobjective/impl/DistributedFlowObjectiveStore.java index 75a9b89..534289c 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flowobjective/impl/DistributedFlowObjectiveStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flowobjective/impl/DistributedFlowObjectiveStore.java
@@ -37,6 +37,9 @@ import static org.slf4j.LoggerFactory.getLogger; +import java.util.HashMap; +import java.util.Map; + /** * Manages the inventory of created next groups. */ @@ -106,6 +109,18 @@ } @Override + public Map<Integer, NextGroup> getAllGroups() { + Map<Integer, NextGroup> nextGroupMappings = new HashMap<>(); + for (int key : nextGroups.keySet()) { + NextGroup nextGroup = getNextGroup(key); + if (nextGroup != null) { + nextGroupMappings.put(key, nextGroup); + } + } + return nextGroupMappings; + } + + @Override public int allocateNextId() { return (int) nextIds.incrementAndGet(); }