diff options
author | Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com> | 2018-12-07 14:16:08 -0500 |
---|---|---|
committer | Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com> | 2018-12-07 14:16:30 -0500 |
commit | 2b1e9dcfb722c0a7b19bf1da87fbeec6b8c30e98 (patch) | |
tree | 9d586da2be8978d1bd03b2e829a985135870c1c3 /bpmn/MSOCommonBPMN/src/main | |
parent | 3b56cf0c1763c45b7673a087107c5e1553dd4f40 (diff) |
remove multiline strings with A&AI client
do not use multiline strings with A&AI client
Change-Id: I6c88e198601479dda1c09edc7717289beae5dc60
Issue-ID: SO-1302
Signed-off-by: Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy index 6691a82352..354ece9e63 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy @@ -174,14 +174,12 @@ public class UpdateAAIVfModule extends AbstractServiceTaskProcessor { personaModelVersionEntry = updateVfModuleNode(origRequest, 'persona-model-version') } String contrailServiceInstanceFqdnEntry = updateVfModuleNode(origRequest, 'contrail-service-instance-fqdn') - def payload = """ - { ${orchestrationStatusEntry} - ${heatStackIdEntry} - ${personaModelVersionEntry} - ${contrailServiceInstanceFqdnEntry} - "vf-module-id": "${vfModuleId}" - } - """ + org.onap.aai.domain.yang.VfModule payload = new org.onap.aai.domain.yang.VfModule(); + payload.setVfModuleId(vfModuleId) + payload.setOrchestrationStatus(orchestrationStatusEntry) + payload.setHeatStackId(heatStackIdEntry) + payload.setPersonaModelVersion(personaModelVersionEntry) + payload.setContrailServiceInstanceFqdn(contrailServiceInstanceFqdnEntry) try { AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId) @@ -210,16 +208,16 @@ public class UpdateAAIVfModule extends AbstractServiceTaskProcessor { private String updateVfModuleNode(String origRequest, String elementName) { if (!utils.nodeExists(origRequest, elementName)) { - return "" + return null } def elementValue = utils.getNodeText(origRequest, elementName) if (elementValue.equals('DELETE')) { - // Set the element being deleted to null - return """"${elementName}": null,""" + // Set the element being deleted to empty string + return "" } else { - return """"${elementName}": "${elementValue}",""" + return elementValue } } |