diff options
author | sarada prasad sahoo <sarada.prasad.sahoo@huawei.com> | 2019-07-22 16:55:12 +0530 |
---|---|---|
committer | sarada prasad sahoo <sarada.prasad.sahoo@huawei.com> | 2019-07-26 15:15:57 +0530 |
commit | fd1e1a795f881d60f10ba196697af04c7fa00f3c (patch) | |
tree | 0099f18d50ceb97c826425729a1404835b3394b0 /bpmn/MSOCommonBPMN/src | |
parent | 7e9581d1cab9604abdf0c3397877a100567bc33c (diff) |
Enhanced List Level flow with backward support
Modified the e2e service instance flow to
support both new list types groups along with
backward compatibility to support old types
alloted resources, network etc.
Change-Id: I1cb128e259c54b80009840914b2c1cee8cf8a4df
Issue-ID: SO-1393
Signed-off-by: sarada prasad sahoo <sarada.prasad.sahoo@huawei.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java | 12 |
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"); } |