diff options
author | Rob Daugherty <rd472p@att.com> | 2017-10-18 17:08:46 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2017-10-18 17:08:46 -0400 |
commit | 43afca8431936c8e44e59548af7019fb63f36579 (patch) | |
tree | e33ed955199471728c30bf20abea400dbe694726 /bpmn/MSOInfrastructureBPMN/src/main/groovy/org | |
parent | d55ca28ac5ccbc3644318449291df1725bf0b047 (diff) |
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 <rd472p@att.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy | 6 |
1 files changed, 4 insertions, 2 deletions
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) ? "" : "<orchestration-status>${oStatus}</orchestration-status>" + String serviceTypeLine = isBlank(serviceType) ? "" : "<service-type>${serviceType}</service-type>" + String serviceRoleLine = isBlank(serviceRole) ? "" : "<service-role>${serviceRole}</service-role>" AaiUtil aaiUriUtil = new AaiUtil(this) String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution) @@ -264,8 +266,8 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor { String serviceInstanceData = """<service-instance xmlns=\"${namespace}\"> <service-instance-name>${serviceInstanceName}</service-instance-name> - <service-type>${serviceType}</service-type> - <service-role>${serviceRole}</service-role> + ${serviceTypeLine} + ${serviceRoleLine} ${statusLine} <model-invariant-id>${modelInvariantUuid}</model-invariant-id> <model-version-id>${modelUuid}</model-version-id> |