summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorWitold Ficio Kopel <w.kopel@samsung.com>2019-03-26 09:17:02 +0100
committerWitold Ficio Kopel <w.kopel@samsung.com>2019-03-26 13:12:09 +0100
commit59700d14ff998413dada0cb2e0864e643edbb77e (patch)
treed066adaedc28efce511d5fc66750f34e91eedb22 /bpmn
parentaf46c0d4b30ecb5c8f36992e74adb86d7d5bbe06 (diff)
Eliminated printStackTrace() calls
Eliminated calls to printStackTrace() on Throwable as they go to stdout and are not handled by logger. Occurences has been replaced by calls to logger or modifications to nearby logger calls (Throwable passed as last parameter). Occurences in unit test classes left without modification. Change-Id: I6a771d60a3ea69ceecc29bb21358e565aa5ce101 Issue-ID: LOG-631 Signed-off-by: Witold Ficio Kopel <w.kopel@samsung.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy3
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy163
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy13
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy21
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy2
22 files changed, 134 insertions, 153 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
index 484be19137..1ceafb6684 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy
@@ -148,7 +148,7 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
} catch (BpmnError e) {
throw e
} catch (Exception e) {
- logger.error('Caught exception in ' + method, e)
+ logger.error('Caught exception in {}: {}', method, e.getMessage(), e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
}
}
@@ -522,8 +522,7 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
throw bpmnError
}
catch(Exception e) {
- e.printStackTrace()
- logger.debug('Unexpected error encountered - ' + e.getMessage())
+ logger.debug('Unexpected error encountered - {}', e.getMessage(), e)
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, e.getMessage())
}
finally {
@@ -645,7 +644,7 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
rollbackEnabled = defaultRollback
}
}
-
+
execution.setVariable(prefix+"backoutOnFailure", rollbackEnabled)
logger.debug('rollbackEnabled (aka backoutOnFailure): ' + rollbackEnabled)
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
index c1f9f5b0b3..e9e7d1ed7c 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
@@ -63,8 +63,8 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("CAAIVfMod_moduleExists",false)
execution.setVariable("CAAIVfMod_baseModuleConflict", false)
execution.setVariable("CAAIVfMod_vnfNameFromAAI", null)
-
-
+
+
// CreateAAIVfModule workflow response variable placeholders
execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode",null)
execution.setVariable("CAAIVfMod_queryGenericVnfResponse","")
@@ -80,14 +80,14 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("CreateAAIVfModuleResponse","")
execution.setVariable("RollbackData", null)
- }
-
+ }
+
// parse the incoming CREATE_VF_MODULE request and store the Generic VNF
// and VF Module data in the flow DelegateExecution
public void preProcessRequest(DelegateExecution execution) {
initProcessVariables(execution)
- def vnfId = execution.getVariable("vnfId")
+ def vnfId = execution.getVariable("vnfId")
if (vnfId == null || vnfId.isEmpty()) {
execution.setVariable("CAAIVfMod_newGenericVnf", true)
execution.setVariable("CAAIVfMod_vnfId","")
@@ -96,14 +96,14 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("CAAIVfMod_vnfId",vnfId)
}
- def vnfName = execution.getVariable("vnfName")
+ def vnfName = execution.getVariable("vnfName")
execution.setVariable("CAAIVfMod_vnfName", vnfName)
String vnfType = execution.getVariable("vnfType")
execution.setVariable("CAAIVfMod_vnfType", StringUtils.defaultString(vnfType))
execution.setVariable("CAAIVfMod_serviceId", execution.getVariable("serviceId"))
-
+
String personaModelId = execution.getVariable("personaModelId")
execution.setVariable("CAAIVfMod_personaId",StringUtils.defaultString(personaModelId))
@@ -219,8 +219,7 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", 201)
execution.setVariable("CAAIVfMod_createGenericVnfResponse", "Vnf Created")
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug("Exception occurred while executing AAI PUT:" + ex.getMessage())
+ logger.debug("Exception occurred while executing AAI PUT: {}", ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in createGenericVnf.")
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
index dc4871119e..7e46784af2 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleVolumeGroup.groovy
@@ -121,8 +121,7 @@ public class CreateAAIVfModuleVolumeGroup extends AbstractServiceTaskProcessor {
execution.setVariable('CAAIVfModVG_getVfModuleResponse', "VF-Module Not found!!")
}
}catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', 500)
execution.setVariable('CAAIVfModVG_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
}
@@ -174,8 +173,7 @@ public class CreateAAIVfModuleVolumeGroup extends AbstractServiceTaskProcessor {
logger.debug("CreateAAIVfModule Response code: " + 200)
logger.debug("CreateAAIVfModule Response: " + "Success")
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI PUT:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI PUT: {}', ex.getMessage(), ex)
execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', 500)
execution.setVariable('CAAIVfModVG_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
index 83f31450b8..4bce23eff7 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
@@ -76,7 +76,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
// send a GET request to AA&I to retrieve the Generic Vnf/Vf Module information based on a Vnf Id
// expect a 200 response with the information in the response body or a 404 if the Generic Vnf does not exist
public void queryAAIForGenericVnf(DelegateExecution execution) {
-
+
def vnfId = execution.getVariable("DAAIVfMod_vnfId")
try {
@@ -112,8 +112,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", 200)
execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", "Vnf Deleted")
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug("Exception occurred while executing AAI DELETE:" + ex.getMessage())
+ logger.debug("Exception occurred while executing AAI DELETE: {}", ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured during deleteGenericVnf")
}
}
@@ -131,8 +130,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", 200)
execution.setVariable("DAAIVfMod_deleteVfModuleResponse", "Vf Module Deleted")
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug("Exception occurred while executing AAI PUT:" + ex.getMessage())
+ logger.debug("Exception occurred while executing AAI PUT: {}", ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured during deleteVfModule")
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
index 740d9f70b6..f008130c32 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
@@ -151,8 +151,7 @@ public class GenerateVfModuleName extends AbstractServiceTaskProcessor{
}
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
index 92c1579aa0..f371ccef4d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
@@ -126,7 +126,7 @@ class MsoUtils {
/***** Utilities when using XmlParser *****/
-
+
/**
* Convert a Node into a String by deserializing it and formatting it.
*
@@ -883,7 +883,7 @@ class MsoUtils {
callbackUrlToUse = callbackUrlToUse.replaceAll("(http://)(.*)(:28080*)", {orig, first, torepl, last -> "${first}${qualifiedHostName}${last}"})
}
}catch(Exception e){
- log("DEBUG", "unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: " + e.printStackTrace())
+ logger.debug("Unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: {}", e.getMessage(), e)
}
return callbackUrlToUse
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
index d909a77cc2..a7bb707dff 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
@@ -166,7 +166,7 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor {
logger.debug(UrnPropertiesReader.getVariable("mso.adapters.sdnc.endpoint", execution))
}catch(Exception e){
- logger.debug('Internal Error occured during PreProcess Method: ', e)
+ logger.debug('Internal Error occured during PreProcess Method: {}', e.getMessage(), e)
exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PreProcess Method') // TODO: what message and error code?
}
logger.trace("End pre Process SDNCRequestScript ")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
index 9d7ce8234b..69d5f02df5 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
@@ -165,7 +165,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
- "BPMN", ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue(), ex);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
index c1d68c5f7c..f91bf54edc 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
@@ -161,7 +161,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
- "BPMN", ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue(), ex);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
index 796ee43cf4..a40bf59097 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
@@ -206,7 +206,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
// Construct payload
managementV6AddressEntry = updateGenericVnfNode(origRequest, 'management-v6-address')
}
-
+
// Handle orchestration-status
String orchestrationStatus = execution.getVariable('UAAIGenVnf_orchestrationStatus')
String orchestrationStatusEntry = null
@@ -214,7 +214,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
// Construct payload
orchestrationStatusEntry = updateGenericVnfNode(origRequest, 'orchestration-status')
}
-
+
org.onap.aai.domain.yang.GenericVnf payload = new org.onap.aai.domain.yang.GenericVnf();
payload.setVnfId(vnfId)
payload.setPersonaModelVersion(personaModelVersionEntry)
@@ -227,8 +227,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
try {
getAAIClient().update(uri,payload)
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI PATCH:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI PATCH: {}', ex.getMessage(), ex)
execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', 500)
execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', 'AAI PATCH Failed:' + ex.getMessage())
}
@@ -258,9 +257,9 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
return ""
}
else {
- return elementValue
+ return elementValue
}
-
+
}
/**
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
index 259a7872a3..1960cafb0f 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
@@ -69,7 +69,7 @@ class VidUtils {
public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId) {
createXmlVolumeRequest(requestMap, action, serviceInstanceId, '')
}
-
+
/**
* Create a volume-request XML using a map
@@ -84,9 +84,9 @@ class VidUtils {
def serviceName = ''
def modelCustomizationName = ''
def asdcServiceModelVersion = ''
-
+
def suppressRollback = requestMap.requestDetails.requestInfo.suppressRollback
-
+
def backoutOnFailure = ""
if(suppressRollback != null){
if ( suppressRollback == true) {
@@ -95,7 +95,7 @@ class VidUtils {
backoutOnFailure = "true"
}
}
-
+
def volGrpName = requestMap.requestDetails.requestInfo?.instanceName ?: ''
def serviceId = requestMap.requestDetails.requestParameters?.serviceId ?: ''
def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
@@ -108,16 +108,16 @@ class VidUtils {
modelCustomizationName = it.relatedInstance.modelInfo?.modelInstanceName
}
}
-
+
vnfType = serviceName + '/' + modelCustomizationName
-
+
def userParams = requestMap.requestDetails?.requestParameters?.userParams
def userParamsNode = ''
if(userParams != null) {
userParamsNode = buildUserParams(userParams)
}
def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationUuid ?: ''
-
+
String xmlReq = """
<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
@@ -145,9 +145,9 @@ class VidUtils {
// return a pretty-print of the volume-request xml without the preamble
return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
}
-
+
/**
- * A common method that can be used to build volume-params node from a map.
+ * A common method that can be used to build volume-params node from a map.
* @param Map userParams
* @return
*/
@@ -166,9 +166,9 @@ class VidUtils {
}
/**
- * A common method that can be used to extract 'requestDetails'
+ * A common method that can be used to extract 'requestDetails'
* @param String json
- * @return String json requestDetails
+ * @return String json requestDetails
*/
@Deprecated
public getJsonRequestDetails(String jsonInput) {
@@ -183,10 +183,10 @@ class VidUtils {
return rtn
} else {
return rtn
- }
+ }
}
}
-
+
/**
* A common method that can be used to extract 'requestDetails' in Xml
* @param String json
@@ -203,17 +203,17 @@ class VidUtils {
return XmlTool.normalize(XML.toString(jsonObj))
}
}
-
+
/**
* Create a network-request XML using a map
- * @param execution
- * @param xmlRequestDetails - requestDetails in xml
+ * @param execution
+ * @param xmlRequestDetails - requestDetails in xml
* @return
* Note: See latest version: createXmlNetworkRequestInstance()
*/
public String createXmlNetworkRequestInfra(execution, def networkJsonIncoming) {
-
+
def requestId = execution.getVariable("requestId")
def serviceInstanceId = execution.getVariable("serviceInstanceId")
def requestAction = execution.getVariable("requestAction")
@@ -225,13 +225,13 @@ class VidUtils {
def instanceName = reqMap.requestDetails.requestInfo.instanceName
def modelCustomizationId = reqMap.requestDetails.modelInfo.modelCustomizationId
if (modelCustomizationId == null) {
- modelCustomizationId = reqMap.requestDetails.modelInfo.modelCustomizationUuid !=null ?
+ modelCustomizationId = reqMap.requestDetails.modelInfo.modelCustomizationUuid !=null ?
reqMap.requestDetails.modelInfo.modelCustomizationUuid : ""
}
def modelName = reqMap.requestDetails.modelInfo.modelName
def lcpCloudRegionId = reqMap.requestDetails.cloudConfiguration.lcpCloudRegionId
def tenantId = reqMap.requestDetails.cloudConfiguration.tenantId
- def serviceId = reqMap.requestDetails.requestInfo.productFamilyId
+ def serviceId = reqMap.requestDetails.requestInfo.productFamilyId
def suppressRollback = reqMap.requestDetails.requestInfo.suppressRollback.toString()
def backoutOnFailure = "true"
if(suppressRollback != null){
@@ -241,7 +241,7 @@ class VidUtils {
backoutOnFailure = "true"
}
}
-
+
//def userParams = reqMap.requestDetails.requestParameters.userParams
//def userParamsNode = buildUserParams(userParams)
def userParams = reqMap.requestDetails?.requestParameters?.userParams
@@ -249,26 +249,26 @@ class VidUtils {
if(userParams != null) {
userParamsNode = buildUserParams(userParams)
}
-
+
//'sdncVersion' = current, '1610' (non-RPC SDNC) or '1702' (RPC SDNC)
def sdncVersion = execution.getVariable("sdncVersion")
-
+
String xmlReq = """
- <network-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
+ <network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
<request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
- <action>${MsoUtils.xmlEscape(requestAction)}</action>
- <source>VID</source>
+ <action>${MsoUtils.xmlEscape(requestAction)}</action>
+ <source>VID</source>
<service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- </request-info>
+ </request-info>
<network-inputs>
- <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
- <network-name>${MsoUtils.xmlEscape(instanceName)}</network-name>
+ <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
+ <network-name>${MsoUtils.xmlEscape(instanceName)}</network-name>
<network-type>${MsoUtils.xmlEscape(modelName)}</network-type>
- <modelCustomizationId>${MsoUtils.xmlEscape(modelCustomizationId)}</modelCustomizationId>
- <aic-cloud-region>${MsoUtils.xmlEscape(lcpCloudRegionId)}</aic-cloud-region>
+ <modelCustomizationId>${MsoUtils.xmlEscape(modelCustomizationId)}</modelCustomizationId>
+ <aic-cloud-region>${MsoUtils.xmlEscape(lcpCloudRegionId)}</aic-cloud-region>
<tenant-id>${MsoUtils.xmlEscape(tenantId)}</tenant-id>
- <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
<backout-on-failure>${MsoUtils.xmlEscape(backoutOnFailure)}</backout-on-failure>
<sdncVersion>${MsoUtils.xmlEscape(sdncVersion)}</sdncVersion>
</network-inputs>
@@ -281,8 +281,7 @@ class VidUtils {
return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
} catch(Exception e) {
- logger.debug("{} {}", "Error in Vid Utils", e.getCause())
- e.printStackTrace();
+ logger.debug("Error in Vid Utils: {}", e.getCause(), e)
throw e
}
}
@@ -299,7 +298,7 @@ class VidUtils {
def networkModelVersion = ""
def networkModelCustomizationUuid = ""
def networkModelInvariantUuid = ""
-
+
// verify the DB Catalog response JSON structure
def networkModelInfo = execution.getVariable("networkModelInfo")
def jsonSlurper = new JsonSlurper()
@@ -326,14 +325,14 @@ class VidUtils {
} catch (Exception ex) {
throw ex
}
- }
-
+ }
+
def serviceModelUuid = ""
def serviceModelName = ""
def serviceModelVersion = ""
def serviceModelCustomizationUuid = ""
def serviceModelInvariantUuid = ""
-
+
// verify the DB Catalog response JSON structure
def serviceModelInfo = execution.getVariable("serviceModelInfo")
def jsonServiceSlurper = new JsonSlurper()
@@ -361,8 +360,8 @@ class VidUtils {
throw ex
}
}
-
-
+
+
def subscriptionServiceType = execution.getVariable("subscriptionServiceType") != null ? execution.getVariable("subscriptionServiceType") : ""
def globalSubscriberId = execution.getVariable("globalSubscriberId") != null ? execution.getVariable("globalSubscriberId") : ""
def requestId = execution.getVariable("msoRequestId")
@@ -382,88 +381,88 @@ class VidUtils {
backoutOnFailure = "true"
}
}
-
+
//'sdncVersion' = current, '1610' (non-RPC SDNC) or '1702' (RPC SDNC)
def sdncVersion = execution.getVariable("sdncVersion")
-
+
def source = "VID"
def action = execution.getVariable("action")
-
+
def userParamsNode = ""
def userParams = execution.getVariable("networkInputParams")
if(userParams != null) {
userParamsNode = buildUserParams(userParams)
}
-
+
String xmlReq = """
- <network-request xmlns="http://www.w3.org/2001/XMLSchema">
- <request-info>
+ <network-request xmlns="http://www.w3.org/2001/XMLSchema">
+ <request-info>
<request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
- <action>${MsoUtils.xmlEscape(action)}</action>
- <source>${MsoUtils.xmlEscape(source)}</source>
+ <action>${MsoUtils.xmlEscape(action)}</action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
<service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
- </request-info>
- <network-inputs>
- <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
- <network-name>${MsoUtils.xmlEscape(networkName)}</network-name>
+ </request-info>
+ <network-inputs>
+ <network-id>${MsoUtils.xmlEscape(networkId)}</network-id>
+ <network-name>${MsoUtils.xmlEscape(networkName)}</network-name>
<network-type>${MsoUtils.xmlEscape(networkModelName)}</network-type>
<subscription-service-type>${MsoUtils.xmlEscape(subscriptionServiceType)}</subscription-service-type>
<global-customer-id>${MsoUtils.xmlEscape(globalSubscriberId)}</global-customer-id>
- <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudReqion)}</aic-cloud-region>
+ <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudReqion)}</aic-cloud-region>
<tenant-id>${MsoUtils.xmlEscape(tenantId)}</tenant-id>
- <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
+ <service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
<backout-on-failure>${MsoUtils.xmlEscape(backoutOnFailure)}</backout-on-failure>
<failIfExist>${MsoUtils.xmlEscape(failIfExist)}</failIfExist>
<networkModelInfo>
<modelName>${MsoUtils.xmlEscape(networkModelName)}</modelName>
<modelUuid>${MsoUtils.xmlEscape(networkModelUuid)}</modelUuid>
- <modelInvariantUuid>${MsoUtils.xmlEscape(networkModelInvariantUuid)}</modelInvariantUuid>
+ <modelInvariantUuid>${MsoUtils.xmlEscape(networkModelInvariantUuid)}</modelInvariantUuid>
<modelVersion>${MsoUtils.xmlEscape(networkModelVersion)}</modelVersion>
<modelCustomizationUuid>${MsoUtils.xmlEscape(networkModelCustomizationUuid)}</modelCustomizationUuid>
</networkModelInfo>
<serviceModelInfo>
<modelName>${MsoUtils.xmlEscape(serviceModelName)}</modelName>
<modelUuid>${MsoUtils.xmlEscape(serviceModelUuid)}</modelUuid>
- <modelInvariantUuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</modelInvariantUuid>
+ <modelInvariantUuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</modelInvariantUuid>
<modelVersion>${MsoUtils.xmlEscape(serviceModelVersion)}</modelVersion>
<modelCustomizationUuid>${MsoUtils.xmlEscape(serviceModelCustomizationUuid)}</modelCustomizationUuid>
-
- </serviceModelInfo>
- <sdncVersion>${MsoUtils.xmlEscape(sdncVersion)}</sdncVersion>
+
+ </serviceModelInfo>
+ <sdncVersion>${MsoUtils.xmlEscape(sdncVersion)}</sdncVersion>
</network-inputs>
<network-params>
${userParamsNode}
- </network-params>
+ </network-params>
</network-request>
"""
// return a pretty-print of the volume-request xml without the preamble
return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
-
+
}
-
+
/**
* Create a vnf-request XML using a map
- * @param requestMap - map created from VID JSON
+ * @param requestMap - map created from VID JSON
* @param action
* @return
*/
public String createXmlVfModuleRequest(execution, Map requestMap, String action, String serviceInstanceId) {
-
+
//def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
-
+
//relatedInstanceList.each {
// if (it.relatedInstance.modelInfo.modelType == 'vnf') {
// vnfType = it.relatedInstance.modelInfo.modelName
// vnfId = it.relatedInstance.modelInfo.modelInvariantId
// }
//}
-
+
def vnfName = ''
def asdcServiceModelInfo = ''
-
+
def relatedInstanceList = requestMap.requestDetails?.relatedInstanceList
-
-
+
+
if (relatedInstanceList != null) {
relatedInstanceList.each {
if (it.relatedInstance.modelInfo?.modelType == 'service') {
@@ -474,30 +473,30 @@ class VidUtils {
}
}
}
-
+
def vnfType = execution.getVariable('vnfType')
def vnfId = execution.getVariable('vnfId')
def vfModuleId = execution.getVariable('vfModuleId')
def volumeGroupId = execution.getVariable('volumeGroupId')
def userParams = requestMap.requestDetails?.requestParameters?.userParams
-
-
+
+
def userParamsNode = ''
if(userParams != null) {
userParamsNode = buildUserParams(userParams)
}
-
+
def isBaseVfModule = "false"
if (execution.getVariable('isBaseVfModule') == true) {
isBaseVfModule = "true"
}
-
+
def requestId = execution.getVariable("mso-request-id")
def vfModuleName = requestMap.requestDetails?.requestInfo?.instanceName ?: ''
def vfModuleModelName = requestMap.requestDetails?.modelInfo?.modelName ?: ''
def suppressRollback = requestMap.requestDetails?.requestInfo?.suppressRollback
-
+
def backoutOnFailure = ""
if(suppressRollback != null){
if ( suppressRollback == true) {
@@ -506,14 +505,14 @@ class VidUtils {
backoutOnFailure = "true"
}
}
-
+
def serviceId = requestMap.requestDetails?.requestParameters?.serviceId ?: ''
def aicCloudRegion = requestMap.requestDetails?.cloudConfiguration?.lcpCloudRegionId ?: ''
def tenantId = requestMap.requestDetails?.cloudConfiguration?.tenantId ?: ''
def personaModelId = requestMap.requestDetails?.modelInfo?.modelInvariantUuid ?: ''
def personaModelVersion = requestMap.requestDetails?.modelInfo?.modelUuid ?: ''
def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationUuid ?: ''
-
+
String xmlReq = """
<vnf-request>
<request-info>
@@ -524,17 +523,17 @@ class VidUtils {
</request-info>
<vnf-inputs>
<!-- not in use in 1610 -->
- <vnf-name>${MsoUtils.xmlEscape(vnfName)}</vnf-name>
+ <vnf-name>${MsoUtils.xmlEscape(vnfName)}</vnf-name>
<vnf-type>${MsoUtils.xmlEscape(vnfType)}</vnf-type>
<vnf-id>${MsoUtils.xmlEscape(vnfId)}</vnf-id>
<volume-group-id>${MsoUtils.xmlEscape(volumeGroupId)}</volume-group-id>
<vf-module-id>${MsoUtils.xmlEscape(vfModuleId)}</vf-module-id>
- <vf-module-name>${MsoUtils.xmlEscape(vfModuleName)}</vf-module-name>
+ <vf-module-name>${MsoUtils.xmlEscape(vfModuleName)}</vf-module-name>
<vf-module-model-name>${MsoUtils.xmlEscape(vfModuleModelName)}</vf-module-model-name>
<model-customization-id>${MsoUtils.xmlEscape(modelCustomizationId)}</model-customization-id>
<is-base-vf-module>${MsoUtils.xmlEscape(isBaseVfModule)}</is-base-vf-module>
<asdc-service-model-version>${MsoUtils.xmlEscape(asdcServiceModelInfo)}</asdc-service-model-version>
- <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudRegion)}</aic-cloud-region>
+ <aic-cloud-region>${MsoUtils.xmlEscape(aicCloudRegion)}</aic-cloud-region>
<tenant-id>${MsoUtils.xmlEscape(tenantId)}</tenant-id>
<service-id>${MsoUtils.xmlEscape(serviceId)}</service-id>
<backout-on-failure>${MsoUtils.xmlEscape(backoutOnFailure)}</backout-on-failure>
@@ -546,10 +545,10 @@ class VidUtils {
</vnf-params>
</vnf-request>
"""
-
+
// return a pretty-print of the volume-request xml without the preamble
return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
}
-
+
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
index ac67d949a5..aacd385a3b 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
@@ -294,7 +294,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} catch (IOException ex) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for VnfAdapter",
- "BPMN", ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue(), ex);
}
}
@@ -398,7 +398,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
vnfAdapterWorkflowException(execution, callback)
}
} catch (Exception e) {
- logger.debug("Error encountered within VnfAdapterRest ProcessCallback method", e)
+ logger.debug("Error encountered within VnfAdapterRest ProcessCallback method: {}", e.getMessage(), e)
exceptionUtil.buildAndThrowWorkflowException(execution, 7020, "Error encountered within VnfAdapterRest ProcessCallback method")
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
index 5352fc2fe0..2cc6415a50 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/validation/FlowValidatorRunner.java
@@ -146,7 +146,7 @@ public abstract class FlowValidatorRunner<S extends FlowValidator, E extends Flo
result.add(klass.newInstance());
}
} catch (InstantiationException | IllegalAccessException e) {
- logger.error("failed to build validator list for " + clazz.getName(), e);
+ logger.error("failed to build validator list for {}", clazz.getName(), e);
throw new RuntimeException(e);
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
index 19fe018e13..d588da38b0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
@@ -416,7 +416,7 @@ public class CreateNetworkInstance extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String errorException = " Bpmn error encountered in CreateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse()"
- logger.debug("Exception error in CreateNetworkInstance flow, buildErrorResponse(): " + ex.getMessage())
+ logger.debug("Exception error in CreateNetworkInstance flow, buildErrorResponse(): {}", ex.getMessage(), ex)
falloutHandlerRequest =
"""<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1"
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 7a606d515c..eface7b847 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
@@ -668,8 +668,7 @@ public class DoCreateVfModule extends VfModuleBase {
rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true")
execution.setVariable("rollbackData", rollbackData)
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while postProcessing CreateAAIVfModule request:' + ex.getMessage())
+ logger.debug('Exception occurred while postProcessing CreateAAIVfModule request: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Bad response from CreateAAIVfModule' + ex.getMessage())
}
logger.trace('Exited ' + method)
@@ -741,8 +740,7 @@ public class DoCreateVfModule extends VfModuleBase {
}
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
@@ -822,17 +820,16 @@ public class DoCreateVfModule extends VfModuleBase {
}
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
- logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+ logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e, e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModuleForStatus(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 5f160bb068..e1b0776d3b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -362,7 +362,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
resourceClient.connect(uri, siUri)
}catch(Exception ex) {
- logger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process ", ex)
+ logger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process: {}", ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process")
}
logger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index 05ccfa02ba..26233811ae 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -621,8 +621,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
logger.debug("Received orchestration status from A&AI: " + orchestrationStatus)
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
index 47aec46277..f0182e5614 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory
public class DoDeleteVfModuleFromVnf extends VfModuleBase {
private static final Logger logger = LoggerFactory.getLogger( DoDeleteVfModuleFromVnf.class);
-
+
def Prefix="DDVFMV_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -66,7 +66,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
initProcessVariables(execution)
try {
-
+
// Building Block-type request
// Set mso-request-id to request-id for VNF Adapter interface
@@ -75,7 +75,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
execution.setVariable("requestId", requestId)
logger.debug("msoRequestId: " + requestId)
String tenantId = execution.getVariable("tenantId")
- logger.debug("tenantId: " + tenantId)
+ logger.debug("tenantId: " + tenantId)
String cloudSiteId = execution.getVariable("lcpCloudRegionId")
execution.setVariable("cloudSiteId", cloudSiteId)
logger.debug("cloudSiteId: " + cloudSiteId)
@@ -102,15 +102,15 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
}
else {
execution.setVariable(Prefix + "serviceInstanceIdToSdnc", serviceInstanceId)
- }
+ }
String sdncVersion = execution.getVariable("sdncVersion")
if (sdncVersion == null) {
sdncVersion = "1707"
}
execution.setVariable(Prefix + "sdncVersion", sdncVersion)
- logger.debug("Incoming Sdnc Version is: " + sdncVersion)
-
+ logger.debug("Incoming Sdnc Version is: " + sdncVersion)
+
String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
@@ -122,8 +122,6 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
logger.debug("SDNC Callback URL: " + sdncCallbackUrl)
logger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
-
-
}catch(BpmnError b){
throw b
}catch(Exception e){
@@ -131,7 +129,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
}
}
-
+
public void queryAAIForVfModule(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.queryAAIForVfModule(' +
'execution=' + execution.getId() +
@@ -154,8 +152,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
execution.setVariable('DDVMFV_getVnfResponse', "Generic Vnf not found!")
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
execution.setVariable('DDVMFV_getVnfResponseCode', 500)
execution.setVariable('DDVFMV_getVnfResponse', 'AAI GET Failed:' + ex.getMessage())
}
@@ -169,7 +166,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVfModule(): ' + e.getMessage())
}
}
-
+
/**
* Validate the VF Module. That is, confirm that a VF Module with the input VF Module ID
* exists in the retrieved Generic VNF. Then, check to make sure that if that VF Module
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
index fb62babae9..ca367d0045 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -322,7 +322,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
}
if (vfModuleBaseEntry != null) {
vfModulesList.add(vfModuleBaseEntry)
- }
+ }
}
}else{
execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', 404)
@@ -331,8 +331,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
}
execution.setVariable("DDVAM_vfModules", vfModulesList)
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index 013f66b008..a05d2527b0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -1041,8 +1041,7 @@ public class DoUpdateVfModule extends VfModuleBase {
}
}
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
@@ -1051,7 +1050,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e, e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
index 3dd5e61246..eb788a85b7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -265,8 +265,7 @@ class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor {
}
execution.setVariable("DUVAM_vfModules", vfModulesList)
} catch (Exception ex) {
- ex.printStackTrace()
- logger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+ logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
}
logger.trace('Exited ' + method)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
index 0b46a5a849..b12da9f959 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
@@ -362,7 +362,7 @@ public class UpdateNetworkInstance extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
String errorException = " Bpmn error encountered in UpdateNetworkInstance flow. FalloutHandlerRequest, buildErrorResponse() - "
- logger.debug("Exception error in UpdateNetworkInstance flow, buildErrorResponse(): " + ex.getMessage())
+ logger.debug("Exception error in UpdateNetworkInstance flow, buildErrorResponse(): {}", ex.getMessage(), ex)
falloutHandlerRequest =
"""<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1"