commit | 86bebed7ca9eddfa5f0ece6f30d13d5d71724e0c | [log] [tgz] |
---|---|---|
author | yoonseon <yoonseon@onlab.us> | Fri Feb 03 15:23:57 2017 -0800 |
committer | Yoonseon Han <yoonseon@onlab.us> | Thu Mar 09 04:45:22 2017 +0000 |
tree | 80a5c5378101c4b1e341337d7a1a49b84362a4ad | |
parent | 0aba3e8a067041f2ca5b1d28a7e837424e1cc009 [diff] [blame] |
[ONOS-5936] (vCore) Virtual FlowObjective Manager and Store Changes 1. FlowObjective manager for virtual network is added 2. VirtualFlowObjective store is added 3. SimpleVirtualFlowObjectiveStore is implementation 4. Unit tests are added Change-Id: I18ff1d440d1f85ca96fff36a33a8b67566031e2c
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualFlowRuleStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualFlowRuleStore.java index 5f71b57..0952574 100644 --- a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualFlowRuleStore.java +++ b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualFlowRuleStore.java
@@ -151,8 +151,12 @@ @Override public int getFlowRuleCount(NetworkId networkId) { - int sum = 0; + + if (flowEntries.get(networkId) == null) { + return 0; + } + for (ConcurrentMap<FlowId, List<StoredFlowEntry>> ft : flowEntries.get(networkId).values()) { for (List<StoredFlowEntry> fes : ft.values()) {