From 43afca8431936c8e44e59548af7019fb63f36579 Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Wed, 18 Oct 2017 17:08:46 -0400 Subject: Omit service-type and service-role if empty The CreateGenericALaCarteServiceInstance flow does not use the decomposition building block, and hence there is no service-type or service-role for the service instance. SO should not put empty values into AAI; it should omit the elements completely. Issue: SO-237 Change-Id: Ic9504cd5d5c3a4e4cbe67ef5de0c56f51f3c6938 Signed-off-by: Rob Daugherty --- .../mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy index 0eb16a2d9e..18925d399e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy @@ -257,6 +257,8 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { } String statusLine = isBlank(oStatus) ? "" : "${oStatus}" + String serviceTypeLine = isBlank(serviceType) ? "" : "${serviceType}" + String serviceRoleLine = isBlank(serviceRole) ? "" : "${serviceRole}" AaiUtil aaiUriUtil = new AaiUtil(this) String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution) @@ -264,8 +266,8 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { String serviceInstanceData = """ ${serviceInstanceName} - ${serviceType} - ${serviceRole} + ${serviceTypeLine} + ${serviceRoleLine} ${statusLine} ${modelInvariantUuid} ${modelUuid} -- cgit 1.2.3-korg