summaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'resource-assignment/provider/src/main/java')
-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 ab73dab1b..57796768f 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);