1710 Rebase - Second Attempt
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / groovy / org / openecomp / mso / bpmn / infrastructure / scripts / DeleteVfModuleVolumeInfraV1.groovy
index 7bda7b4..547b5f3 100644 (file)
@@ -132,18 +132,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
                execution.setVariable('DELVfModVol_volumeParams', utils.getNodeXml(request, 'volume-params'))\r
                execution.setVariable('DELVfModVol_cloudRegion', utils.getNodeText1(request, 'aic-cloud-region'))\r
 \r
-               try {\r
-                       // Catalog DB headers Authorization\r
-                       String basicAuthValueDB = execution.getVariable("URN_mso_adapters_db_auth")\r
-                       utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)\r
-                       \r
-                       def encodedString = utils.getBasicAuth(basicAuthValueDB, execution.getVariable("URN_mso_msoKey"))\r
-                       execution.setVariable("BasicAuthHeaderValueDB",encodedString)\r
-               } catch (IOException ex) {\r
-                       String dataErrorMessage = " Unable to encode Catalog DB user/password string - " + ex.getMessage()\r
-                       utils.log("DEBUG", dataErrorMessage, isDebugLogEnabled)\r
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)\r
-               }\r
+               setBasicDBAuthHeader(execution, isDebugLogEnabled)\r
                \r
                logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)\r
        }\r
@@ -436,7 +425,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
        public void prepareDBRequest (Execution execution, isDebugLogEnabled) {\r
 \r
                WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")\r
-\r
+               ExceptionUtil exceptionUtil = new ExceptionUtil();\r
                def requestId = execution.getVariable('DELVfModVol_requestId')\r
                def volOutputs = execution.getVariable('DELVfModVol_volumeOutputs')\r
                def statusMessage = "VolumeGroup successfully deleted"\r
@@ -450,7 +439,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
                        requestStatus = "FAILURE"\r
                        progress = ""\r
                }\r
-\r
+               \r
                String updateInfraRequest = """\r
                        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"\r
                                        xmlns:req="http://org.openecomp.mso/requestsdb">\r