aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-22 20:59:51 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-22 20:59:51 +0000
commit9ea575f58802c09141b427cf584120d6c43c0559 (patch)
tree328a117a04b8c15d9ff6c153f30eafbce33212e2
parent1f3c718338364db35ef73f1dedbe5a1679172f78 (diff)
parent9be37c03ba6296c07d9910079061542d8160a9fc (diff)
Merge "RA: Fix Problems with resource query results"
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java
index ab73dab1..57796768 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/comp/EndPointAllocatorImpl.java
@@ -221,6 +221,9 @@ public class EndPointAllocatorImpl implements EndPointAllocator {
List<Resource> rlist = resourceManager.queryResources(resourceName, assetIdFilter);
for (Resource r : rlist) {
+ if (r.allocationItems == null || r.allocationItems.isEmpty()) {
+ continue;
+ }
log.info("ResourceName:" + r.resourceKey.resourceName + " assetId:" + r.resourceKey.assetId);
@@ -252,7 +255,7 @@ public class EndPointAllocatorImpl implements EndPointAllocator {
r = resourceManager.getResource(resourceName, assetId);
}
- if (r != null) {
+ if (r != null && r.allocationItems != null && !r.allocationItems.isEmpty()) {
log.info("ResourceName:" + r.resourceKey.resourceName + " assetId:" + r.resourceKey.assetId);
ResourceData rd = getResourceData(r);