aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy8
1 files changed, 6 insertions, 2 deletions
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" +