summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-07-26 12:10:09 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-26 12:10:09 +0000
commit8a7393fee2cb596241ab4eec04bd786b00bcd3da (patch)
tree8915d1e16467dedc2dd90d00fc7a3f55c23c49ea /bpmn/MSOCommonBPMN
parent267c00c92281e147d1dc14f4630204c3927f9f59 (diff)
parentfd1e1a795f881d60f10ba196697af04c7fa00f3c (diff)
Merge "Enhanced List Level flow with backward support"
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index b814d6c595..8d02fa3e4f 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -113,7 +113,17 @@ public class ResourceRequestBuilder {
if (resource.getResourceType() == ResourceType.VNF) {
for (String eachResource : resourceList) {
String resCusUuid = JsonUtils.getJsonValue(eachResource, "resourceCustomizationUuid");
- if ((null != resCusUuid) && resCusUuid.equals(resource.getModelInfo().getModelCustomizationUuid())) {
+ // in case of external api invocation customizatoin id is coming null
+ if (resCusUuid == null || resCusUuid.contains("null") || resCusUuid.isEmpty()) {
+ logger.info("resource resolved using model uuid");
+ String uuid = (String) JsonUtils.getJsonValue(eachResource, "resourceUuid");
+ if ((null != uuid) && uuid.equals(resource.getModelInfo().getModelUuid())) {
+ logger.info("found resource uuid" + uuid);
+ String resourceParameters = JsonUtils.getJsonValue(eachResource, "parameters");
+ locationConstraints = JsonUtils.getJsonValue(resourceParameters, "locationConstraints");
+ }
+ } else if (resCusUuid.equals(resource.getModelInfo().getModelCustomizationUuid())) {
+ logger.info("resource resolved using customization-id");
String resourceParameters = JsonUtils.getJsonValue(eachResource, "parameters");
locationConstraints = JsonUtils.getJsonValue(resourceParameters, "locationConstraints");
}