From dbb53cabbff772880134699eb81dee775d7df8df Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Wed, 31 Oct 2018 14:35:05 -0700 Subject: Send correct resourceModuleName Issue-ID: SO-1178 Change-Id: I593ec7db0bac3e0b343bd0eb960977d0110fd9b8 Signed-off-by: Marcus G K Williams --- .../main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 197589efa1..c7312c453c 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -159,6 +159,8 @@ class OofUtils { utils.log("DEBUG", "Allotted Resource: " + resource.toString(), isDebugEnabled) def serviceResourceId = resource.getResourceId() + def toscaNodeType = resource.getToscaNodeType() + def resourceModuleName = toscaNodeType.substring(toscaNodeType.lastIndexOf(".") + 1) def resourceModelInvariantId = resource.getModelInfo().getModelInvariantUuid() def resourceModelVersionId = resource.getModelInfo().getModelUuid() def resourceModelName = resource.getModelInfo().getModelName() @@ -174,7 +176,7 @@ class OofUtils { String demand = " {\n" + - " \"resourceModuleName\": \"${resourceModelName}\",\n" + + " \"resourceModuleName\": \"${resourceModuleName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + @@ -200,6 +202,8 @@ class OofUtils { utils.log("DEBUG", "VNF Resource: " + vnfResource.toString(), isDebugEnabled) ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo() + def toscaNodeType = vnfResource.getToscaNodeType() + def resourceModuleName = toscaNodeType.substring(toscaNodeType.lastIndexOf(".") + 1) def serviceResourceId = vnfResource.getResourceId() def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid() def resourceModelName = vnfResourceModelInfo.getModelName() @@ -212,7 +216,7 @@ class OofUtils { String placementDemand = " {\n" + - " \"resourceModuleName\": \"${resourceModelName}\",\n" + + " \"resourceModuleName\": \"${resourceModuleName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + -- cgit 1.2.3-korg