From: Rob Daugherty Date: Wed, 18 Oct 2017 21:08:46 +0000 (-0400) Subject: Omit service-type and service-role if empty X-Git-Tag: v1.1.0~131^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F19611%2F1;p=so.git 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 --- 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}