aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy27
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy2
7 files changed, 29 insertions, 20 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
index b43a96bdb0..ec2fed50c3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
@@ -200,6 +200,7 @@ public class DeleteGenericALaCarteServiceInstance extends AbstractServiceTaskPro
try {
String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
String source = execution.getVariable("source")
String msoCompletionRequest =
"""<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
@@ -209,8 +210,9 @@ public class DeleteGenericALaCarteServiceInstance extends AbstractServiceTaskPro
<action>DELETE</action>
<source>${MsoUtils.xmlEscape(source)}</source>
</request-info>
- <aetgt:status-message>Service Instance was deleted successfully.</aetgt:status-message>
- <aetgt:mso-bpel-name>DeleteGenericALaCarteServiceInstance</aetgt:mso-bpel-name>
+ <status-message>Service Instance was deleted successfully.</status-message>
+ <serviceInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</serviceInstanceId>
+ <mso-bpel-name>DeleteGenericALaCarteServiceInstance</mso-bpel-name>
</aetgt:MsoCompletionRequest>"""
// Format Response
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index 7ddfdece9a..83f2fe04db 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -395,13 +395,9 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
AaiUtil aaiUtil = new AaiUtil(this)
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).queryParam("resource-version", resourceVersion)
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).resourceVersion(resourceVersion)
def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
- if(resourceVersion !=null){
- deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
- }
-
msoLogger.debug("Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest)
APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
index 38836c3650..6d41923bdf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -94,6 +94,12 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String requestId = execution.getVariable("msoRequestId")
execution.setVariable("prefix", Prefix)
+
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
+ execution.setVariable("rollbackData", rollbackData)
setBasicDBAuthHeader(execution, isDebugEnabled)
//Inputs
@@ -409,7 +415,10 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception ex) {
//start rollback set up
- RollbackData rollbackData = new RollbackData()
+ def rollbackData = execution.getVariable("rollbackData")
+ if (rollbackData == null) {
+ rollbackData = new RollbackData()
+ }
def disableRollback = execution.getVariable("disableRollback")
rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString())
rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true")
@@ -506,11 +515,13 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
def sdncRequestId3 = UUID.randomUUID().toString()
String sdncDeactivate = sdncDelete.replace(">delete<", ">deactivate<").replace(">${sdncRequestId2}<", ">${sdncRequestId3}<")
def rollbackData = execution.getVariable("rollbackData")
- rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate)
- rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete)
- execution.setVariable("rollbackData", rollbackData)
+ if (rollbackData != null) {
+ rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate)
+ rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete)
+ execution.setVariable("rollbackData", rollbackData)
- msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+ msoLogger.debug("rollbackData:\n" + rollbackData.toString())
+ }
} catch (BpmnError e) {
throw e;
@@ -541,8 +552,10 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.debug("Good response from SDNC Adapter for service-instance topology assign: \n" + response)
def rollbackData = execution.getVariable("rollbackData")
- rollbackData.put("SERVICEINSTANCE", "rollbackSDNC", "true")
- execution.setVariable("rollbackData", rollbackData)
+ if (rollbackData != null) {
+ rollbackData.put("SERVICEINSTANCE", "rollbackSDNC", "true")
+ execution.setVariable("rollbackData", rollbackData)
+ }
}else{
msoLogger.debug("Bad Response from SDNC Adapter for service-instance assign")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 6783808826..58b90a1bf2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -720,7 +720,7 @@ public class DoCreateVfModule extends VfModuleBase {
def vfModuleName = execution.getVariable('DCVFM_vfModuleName')
AaiUtil aaiUriUtil = new AaiUtil(this)
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULES, vnfId).queryParam("vf-module-name",vfModuleName)
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, vnfId).queryParam("vf-module-name",vfModuleName)
String endPoint = aaiUriUtil.createAaiUri(uri)
try {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
index 3b0707a529..8968c751c5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
@@ -193,7 +193,7 @@ public class DoCreateVfModuleVolumeRollback extends AbstractServiceTaskProcessor
AaiUtil aaiUtil = new AaiUtil(this)
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId).queryParam("resource-version", resourceVersion)
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId).resourceVersion(resourceVersion)
def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
index 03e47cf141..73fd78f0c0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
@@ -271,7 +271,7 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
AaiUtil aaiUtil = new AaiUtil(this)
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).queryParam("resource-version", resourceVersion)
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).resourceVersion(resourceVersion)
def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
@@ -284,8 +284,6 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
msoLogger.debug("AAI delete volume group return code: " + returnCode)
msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
- msoLogger.debug("AAI delete volume group return code: " + returnCode)
- msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
ExceptionUtil exceptionUtil = new ExceptionUtil()
if (returnCode=='200' || (returnCode == '204')) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
index b7f31d7823..82e27ec116 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -173,7 +173,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
def endPoint = UrnPropertiesReader.getVariable("aai.endpoint", execution) +
- '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/' + UriUtils.encode(aicCloudRegion, "UTF-8") +
+ '/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/' + UriUtils.encode(aicCloudRegion, "UTF-8") +
'/volume-groups/volume-group/' + UriUtils.encode(volumeGroupId, "UTF-8")
msoLogger.debug('Sending GET to AAI endpoint \'' + endPoint + '\'')