commit | 84ff8fcd94fa66e7d83680ba2f5f2e1ecdecc71f | [log] [tgz] |
---|---|---|
author | Satish K <satishk@huawei.com> | Thu May 12 17:51:13 2016 +0530 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu May 12 18:44:25 2016 +0000 |
tree | df6751cad49e5af9ca94358036c810fa9e2d36be | |
parent | 1797282926f5d3360b19fe7658255e314e0a0960 [diff] |
Resource Store Bug Fix: Query allocated resources based on consumer id always return the Original continous resource value and not the allocated value of this consumer Change-Id: I186a57783be1852c33d591c95b8ecebf32cfd56f
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceStore.java index d5f4567..6ab6235 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentContinuousResourceStore.java
@@ -138,6 +138,6 @@ .flatMap(x -> x.value().allocations().stream() .map(y -> Maps.immutableEntry(x.value().original(), y))) .filter(x -> x.getValue().consumer().equals(consumer)) - .map(x -> x.getKey()); + .map(x -> (ContinuousResource) (x.getValue().resource())); } }