summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy9
-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/SDNCAdapterUtils.groovy274
-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/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy7
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java36
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn116
-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/CreateVfModuleInfra.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy19
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy23
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy7
-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
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java22
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java130
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java60
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java338
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java13
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java97
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json6
64 files changed, 1000 insertions, 516 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..4670b11b71 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")
}
}
@@ -416,7 +416,7 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
*@param name
*@return
**/
- public String getVariable(DelegateExecution execution, String name) {
+ public static String getVariable(DelegateExecution execution, String name) {
def myObj = execution.getVariable(name)
if(myObj instanceof VariableMap){
VariableMap serializedObjectMap = (VariableMap) myObj
@@ -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/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
index e6d54b8681..eb832224db 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
@@ -47,22 +47,19 @@ class SDNCAdapterUtils {
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
+ MsoUtils msoUtils = new MsoUtils()
- private AbstractServiceTaskProcessor taskProcessor
-
- public SDNCAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
+ public SDNCAdapterUtils() {
}
String SDNCAdapterFeatureRequest(DelegateExecution execution, String requestName, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, requestName)
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def featureInformation = utils.getNodeXml(request, 'feature-information', false)
- def featureParameters = utils.getNodeXml(request, 'feature-parameters', false)
+ def request = AbstractServiceTaskProcessor.getVariable(execution, requestName)
+ def requestInformation = msoUtils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = msoUtils.getNodeXml(request, 'service-information', false)
+ def featureInformation = msoUtils.getNodeXml(request, 'feature-information', false)
+ def featureParameters = msoUtils.getNodeXml(request, 'feature-parameters', false)
def requestId = execution.getVariable('testReqId') // for junits
if(requestId==null){
@@ -71,10 +68,10 @@ class SDNCAdapterUtils {
def svcInstanceId = execution.getVariable("mso-service-instance-id")
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsFeatureInformation = utils.removeXmlNamespaces(featureInformation)
- def nnsFeatureParameters = utils.removeXmlNamespaces(featureParameters)
+ def nnsRequestInformation = msoUtils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = msoUtils.removeXmlNamespaces(serviceInformation)
+ def nnsFeatureInformation = msoUtils.removeXmlNamespaces(featureInformation)
+ def nnsFeatureParameters = msoUtils.removeXmlNamespaces(featureParameters)
String sdncAdapterFeatureRequest = """
<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
@@ -95,18 +92,17 @@ class SDNCAdapterUtils {
<sdncadapterworkflow:SDNCTimeOutValueInMinutes>${MsoUtils.xmlEscape(timeoutValueInMinutes)}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
"""
- sdncAdapterFeatureRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterFeatureRequest))
+ sdncAdapterFeatureRequest = msoUtils.removeXmlPreamble(msoUtils.formatXml(sdncAdapterFeatureRequest))
return sdncAdapterFeatureRequest
}
String SDNCAdapterActivateVnfRequest(DelegateExecution execution, String action, String callbackURL, String serviceOperation, String msoAction, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
+ def request = AbstractServiceTaskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = msoUtils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = msoUtils.getNodeXml(request, 'service-information', false)
+ def vnfInformationList = msoUtils.getNodeXml(request, 'vnf-information-list', false)
def requestId = execution.getVariable('testReqId') // for junits
if(requestId==null){
@@ -115,9 +111,9 @@ class SDNCAdapterUtils {
def svcInstanceId = execution.getVariable("mso-service-instance-id")
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsVnfInformationList = utils.removeXmlNamespaces(vnfInformationList)
+ def nnsRequestInformation = msoUtils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = msoUtils.removeXmlNamespaces(serviceInformation)
+ def nnsVnfInformationList = msoUtils.removeXmlNamespaces(vnfInformationList)
String sdncAdapterActivateVnfRequest = """
<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1"
@@ -138,15 +134,14 @@ class SDNCAdapterUtils {
<sdncadapterworkflow:SDNCTimeOutValueInMinutes>${MsoUtils.xmlEscape(timeoutValueInMinutes)}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
"""
- sdncAdapterActivateVnfRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterActivateVnfRequest))
+ sdncAdapterActivateVnfRequest = msoUtils.removeXmlPreamble(msoUtils.formatXml(sdncAdapterActivateVnfRequest))
return sdncAdapterActivateVnfRequest
}
String SDNCAdapterL3ToHigherLayerRequest(DelegateExecution execution, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
- def utils=new MsoUtils()
def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
+ def request = AbstractServiceTaskProcessor.getVariable(execution, prefix+'Request')
String requestInformation = """<request-information>
<request-id>${MsoUtils.xmlEscape(execution.getVariable("mso-request-id"))}</request-id>
@@ -164,8 +159,8 @@ class SDNCAdapterUtils {
}else if("delete".equalsIgnoreCase(action)){
xml.'request-action'.replaceBody('deleteTrinityBonding')
}
- requestInformation = utils.removeXmlPreamble(groovy.xml.XmlUtil.serialize(xml))
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+ requestInformation = msoUtils.removeXmlPreamble(groovy.xml.XmlUtil.serialize(xml))
+ def nnsRequestInformation = msoUtils.removeXmlNamespaces(requestInformation)
def requestId = execution.getVariable('testReqId') // for junits
if(requestId==null){
@@ -234,7 +229,7 @@ class SDNCAdapterUtils {
<sdncadapterworkflow:SDNCTimeOutValueInMinutes>${MsoUtils.xmlEscape(timeoutValueInMinutes)}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
"""
- sdncAdapterL3ToHLRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterL3ToHLRequest))
+ sdncAdapterL3ToHLRequest = msoUtils.removeXmlPreamble(msoUtils.formatXml(sdncAdapterL3ToHLRequest))
return sdncAdapterL3ToHLRequest
}
@@ -243,13 +238,12 @@ class SDNCAdapterUtils {
private void SDNCAdapterActivateRequest(DelegateExecution execution, String resultVar, String svcAction,
String svcOperation, String additionalData) {
- def utils=new MsoUtils()
def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def serviceParameters = utils.getNodeXml(request, 'service-parameters', false)
+ def request = AbstractServiceTaskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = msoUtils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = msoUtils.getNodeXml(request, 'service-information', false)
+ def serviceParameters = msoUtils.getNodeXml(request, 'service-parameters', false)
def requestId = execution.getVariable('testReqId') // for junits
if(requestId==null){
@@ -269,18 +263,18 @@ class SDNCAdapterUtils {
workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
}
- def l2HomingInformation = utils.getNodeXml(serviceParameters, 'l2-homing-information', false)
- def internetEvcAccessInformation = utils.getNodeXml(serviceParameters, 'internet-evc-access-information', false)
- def vrLan = utils.getNodeXml(serviceParameters, 'vr-lan', false)
- def upceVmsServiceInformation = utils.getNodeXml(serviceParameters, 'ucpe-vms-service-information', false)
+ def l2HomingInformation = msoUtils.getNodeXml(serviceParameters, 'l2-homing-information', false)
+ def internetEvcAccessInformation = msoUtils.getNodeXml(serviceParameters, 'internet-evc-access-information', false)
+ def vrLan = msoUtils.getNodeXml(serviceParameters, 'vr-lan', false)
+ def upceVmsServiceInformation = msoUtils.getNodeXml(serviceParameters, 'ucpe-vms-service-information', false)
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsl2HomingInformation = utils.removeXmlNamespaces(l2HomingInformation)
- def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
- def nnsVrLan = utils.removeXmlNamespaces(vrLan)
- def nnsUpceVmsServiceInformation = utils.removeXmlNamespaces(upceVmsServiceInformation)
+ def nnsRequestInformation = msoUtils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = msoUtils.removeXmlNamespaces(serviceInformation)
+ def nnsl2HomingInformation = msoUtils.removeXmlNamespaces(l2HomingInformation)
+ def nnsInternetEvcAccessInformation = msoUtils.removeXmlNamespaces(internetEvcAccessInformation)
+ def nnsVrLan = msoUtils.removeXmlNamespaces(vrLan)
+ def nnsUpceVmsServiceInformation = msoUtils.removeXmlNamespaces(upceVmsServiceInformation)
if (additionalData == null) {
additionalData = ""
@@ -319,7 +313,7 @@ class SDNCAdapterUtils {
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
"""
- content = utils.removeXmlPreamble(utils.formatXML(content))
+ content = msoUtils.removeXmlPreamble(msoUtils.formatXml(content))
execution.setVariable(resultVar, content)
}
@@ -343,7 +337,7 @@ class SDNCAdapterUtils {
* @param isAic3 boolean to indicate whether request is for AIC3.0
*/
public void sdncReservePrep(DelegateExecution execution, String action, String resultVar, boolean isAic3) {
- sdncPrep(execution, resultVar, action , 'service-configuration-operation', null, isAic3, this.taskProcessor)
+ sdncPrep(execution, resultVar, action , 'service-configuration-operation', null, isAic3)
}
/**
@@ -356,8 +350,8 @@ class SDNCAdapterUtils {
* RequestData element (may be null)
*/
public void sdncPrep(DelegateExecution execution, String resultVar, String svcAction,
- String svcOperation, String additionalData, AbstractServiceTaskProcessor taskProcessor) {
- sdncPrep(execution, resultVar, svcAction, svcOperation, additionalData, false, taskProcessor)
+ String svcOperation, String additionalData) {
+ sdncPrep(execution, resultVar, svcAction, svcOperation, additionalData, false)
}
/**
@@ -370,7 +364,7 @@ class SDNCAdapterUtils {
* @param isAic3 boolean to indicate whether request is for AIC3.0
*/
public void sdncPrep(DelegateExecution execution, String resultVar, String svcAction,
- String svcOperation, String additionalData, boolean isAic3, AbstractServiceTaskProcessor taskProcessor) {
+ String svcOperation, String additionalData, boolean isAic3) {
def method = getClass().getSimpleName() + '.sdncPrep(' +
'execution=' + execution.getId() +
', resultVar=' + resultVar +
@@ -380,14 +374,14 @@ class SDNCAdapterUtils {
')'
logger.trace('Entered ' + method)
- MsoUtils utils = taskProcessor.utils
+
try {
def prefix = execution.getVariable('prefix')
- def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = utils.getNodeXml(request, 'request-information', false)
- def serviceInformation = utils.getNodeXml(request, 'service-information', false)
- def serviceParameters = utils.getChildNodes(request, 'service-parameters')
- def requestAction = utils.getNodeText(request, 'request-action')
+ def request = AbstractServiceTaskProcessor.getVariable(execution, prefix+'Request')
+ def requestInformation = msoUtils.getNodeXml(request, 'request-information', false)
+ def serviceInformation = msoUtils.getNodeXml(request, 'service-information', false)
+ def serviceParameters = msoUtils.getChildNodes(request, 'service-parameters')
+ def requestAction = msoUtils.getNodeText(request, 'request-action')
def timeoutInMinutes = UrnPropertiesReader.getVariable('mso.sdnc.timeout.firewall.minutes',execution)
@@ -407,23 +401,23 @@ class SDNCAdapterUtils {
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
}
- def l2HomingInformation = utils.getNodeXml(request, 'l2-homing-information', false)
- def internetEvcAccessInformation = utils.getNodeXml(request, 'internet-evc-access-information', false)
- def vrLan = utils.getNodeXml(request, 'vr-lan', false)
- def upceVmsServiceInfo = utils.getNodeXml(request, 'ucpe-vms-service-information', false)
- def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
-
- def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
- def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
- def nnsl2HomingInformation = utils.removeXmlNamespaces(l2HomingInformation)
- def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
- def nnsVrLan = utils.removeXmlNamespaces(vrLan)
- def nnsUpceVmsServiceInfo = utils.removeXmlNamespaces(upceVmsServiceInfo)
- def nnsVnfInformationList = utils.removeXmlNamespaces(vrLan)
+ def l2HomingInformation = msoUtils.getNodeXml(request, 'l2-homing-information', false)
+ def internetEvcAccessInformation = msoUtils.getNodeXml(request, 'internet-evc-access-information', false)
+ def vrLan = msoUtils.getNodeXml(request, 'vr-lan', false)
+ def upceVmsServiceInfo = msoUtils.getNodeXml(request, 'ucpe-vms-service-information', false)
+ def vnfInformationList = msoUtils.getNodeXml(request, 'vnf-information-list', false)
+
+ def nnsRequestInformation = msoUtils.removeXmlNamespaces(requestInformation)
+ def nnsServiceInformation = msoUtils.removeXmlNamespaces(serviceInformation)
+ def nnsl2HomingInformation = msoUtils.removeXmlNamespaces(l2HomingInformation)
+ def nnsInternetEvcAccessInformation = msoUtils.removeXmlNamespaces(internetEvcAccessInformation)
+ def nnsVrLan = msoUtils.removeXmlNamespaces(vrLan)
+ def nnsUpceVmsServiceInfo = msoUtils.removeXmlNamespaces(upceVmsServiceInfo)
+ def nnsVnfInformationList = msoUtils.removeXmlNamespaces(vrLan)
def nnsinternetSvcChangeDetails = ""
if(requestAction!=null && requestAction.equals("ChangeLayer3ServiceProvRequest")){
- def internetSvcChangeDetails = utils.removeXmlNamespaces(serviceParameters)
+ def internetSvcChangeDetails = msoUtils.removeXmlNamespaces(serviceParameters)
nnsinternetSvcChangeDetails = """<internet-service-change-details>
${internetSvcChangeDetails}
</internet-service-change-details>"""
@@ -466,7 +460,7 @@ class SDNCAdapterUtils {
</sdncadapterworkflow:SDNCAdapterWorkflowRequest>
"""
- content = utils.removeXmlPreamble(utils.formatXML(content))
+ content = msoUtils.removeXmlPreamble(msoUtils.formatXml(content))
execution.setVariable(resultVar, content)
logger.debug(resultVar + ' = ' + System.lineSeparator() + content)
@@ -506,7 +500,6 @@ class SDNCAdapterUtils {
* RequestData element (may be null)
*/
public String sdncTopologyRequestV2 (DelegateExecution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, L3Network queryAAIResponse, String additionalData) {
- def utils=new MsoUtils()
// SNDC is expecting request Id for header as unique each call.
String hdrRequestId = ""
@@ -521,17 +514,17 @@ class SDNCAdapterUtils {
try {
requestId = execution.getVariable("mso-request-id")
} catch (Exception ex) {
- requestId = utils.getNodeText(requestXML, "request-id")
+ requestId = msoUtils.getNodeText(requestXML, "request-id")
}
String aicCloudRegion = cloudRegionId
String tenantId = ""
- if (utils.nodeExists(requestXML, "tenant-id")) {
- tenantId = utils.getNodeText(requestXML, "tenant-id")
+ if (msoUtils.nodeExists(requestXML, "tenant-id")) {
+ tenantId = msoUtils.getNodeText(requestXML, "tenant-id")
}
String networkType = ""
- if (utils.nodeExists(requestXML, "network-type")) {
- networkType = utils.getNodeText(requestXML, "network-type")
+ if (msoUtils.nodeExists(requestXML, "network-type")) {
+ networkType = msoUtils.getNodeText(requestXML, "network-type")
}
// Replace/Use the value of network-type from aai query (vs input) during Delete Network flows.
@@ -540,20 +533,20 @@ class SDNCAdapterUtils {
}
String serviceId = ""
- if (utils.nodeExists(requestXML, "service-id")) {
- serviceId = utils.getNodeText(requestXML, "service-id")
+ if (msoUtils.nodeExists(requestXML, "service-id")) {
+ serviceId = msoUtils.getNodeText(requestXML, "service-id")
}
String networkName = ""
// Replace/Use the value of network-name from aai query (vs input) if it was already set in AAI
if (queryAAIResponse != null) {
networkName = queryAAIResponse.getNetworkName()
}
- if (networkName.isEmpty() && utils.nodeExists(requestXML, "network-name")) {
- networkName = utils.getNodeText(requestXML, "network-name")
+ if (networkName.isEmpty() && msoUtils.nodeExists(requestXML, "network-name")) {
+ networkName = msoUtils.getNodeText(requestXML, "network-name")
}
String source = ""
- if (utils.nodeExists(requestXML, "source")) {
- source = utils.getNodeText(requestXML, "source")
+ if (msoUtils.nodeExists(requestXML, "source")) {
+ source = msoUtils.getNodeText(requestXML, "source")
}
// get resourceLink from subflow execution variable
@@ -631,7 +624,6 @@ class SDNCAdapterUtils {
* RequestData element (may be null)
*/
public String sdncTopologyRequestRsrc (DelegateExecution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, String additionalData) {
- def utils=new MsoUtils()
// SNDC is expecting request Id for header as unique each call.
String hdrRequestId = ""
@@ -655,35 +647,35 @@ class SDNCAdapterUtils {
String aicCloudRegion = cloudRegionId
String tenantId = ""
- if (utils.nodeExists(requestXML, "tenant-id")) {
- tenantId = utils.getNodeText(requestXML, "tenant-id")
+ if (msoUtils.nodeExists(requestXML, "tenant-id")) {
+ tenantId = msoUtils.getNodeText(requestXML, "tenant-id")
}
String networkType = ""
- if (utils.nodeExists(requestXML, "network-type")) {
- networkType = utils.getNodeText(requestXML, "network-type")
+ if (msoUtils.nodeExists(requestXML, "network-type")) {
+ networkType = msoUtils.getNodeText(requestXML, "network-type")
}
String subscriptionServiceType = ""
- if (utils.nodeExists(requestXML, "subscription-service-type")) {
- subscriptionServiceType = utils.getNodeText(requestXML, "subscription-service-type")
+ if (msoUtils.nodeExists(requestXML, "subscription-service-type")) {
+ subscriptionServiceType = msoUtils.getNodeText(requestXML, "subscription-service-type")
}
String globalCustomerId = ""
- if (utils.nodeExists(requestXML, "global-customer-id")) {
- globalCustomerId = utils.getNodeText(requestXML, "global-customer-id")
+ if (msoUtils.nodeExists(requestXML, "global-customer-id")) {
+ globalCustomerId = msoUtils.getNodeText(requestXML, "global-customer-id")
}
String serviceId = ""
- if (utils.nodeExists(requestXML, "service-id")) {
- serviceId = utils.getNodeText(requestXML, "service-id")
+ if (msoUtils.nodeExists(requestXML, "service-id")) {
+ serviceId = msoUtils.getNodeText(requestXML, "service-id")
}
String networkName = ""
- if (utils.nodeExists(requestXML, "network-name")) {
- networkName = utils.getNodeText(requestXML, "network-name")
+ if (msoUtils.nodeExists(requestXML, "network-name")) {
+ networkName = msoUtils.getNodeText(requestXML, "network-name")
}
String source = ""
- if (utils.nodeExists(requestXML, "source")) {
- source = utils.getNodeText(requestXML, "source")
+ if (msoUtils.nodeExists(requestXML, "source")) {
+ source = msoUtils.getNodeText(requestXML, "source")
}
// get resourceLink from subflow execution variable
@@ -704,28 +696,28 @@ class SDNCAdapterUtils {
}
// network-information from 'networkModelInfo' // verify the DB Catalog response
- String networkModelInfo = utils.getNodeXml(requestXML, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
- String modelInvariantUuid = utils.getNodeText(networkModelInfo, "modelInvariantUuid") !=null ?
- utils.getNodeText(networkModelInfo, "modelInvariantUuid") : ""
- String modelCustomizationUuid = utils.getNodeText(networkModelInfo, "modelCustomizationUuid") !=null ?
- utils.getNodeText(networkModelInfo, "modelCustomizationUuid") : ""
- String modelUuid = utils.getNodeText(networkModelInfo, "modelUuid") !=null ?
- utils.getNodeText(networkModelInfo, "modelUuid") : ""
- String modelVersion = utils.getNodeText(networkModelInfo, "modelVersion") !=null ?
- utils.getNodeText(networkModelInfo, "modelVersion") : ""
- String modelName = utils.getNodeText(networkModelInfo, "modelName") !=null ?
- utils.getNodeText(networkModelInfo, "modelName") : ""
+ String networkModelInfo = msoUtils.getNodeXml(requestXML, "networkModelInfo", false).replace("tag0:","").replace(":tag0","")
+ String modelInvariantUuid = msoUtils.getNodeText(networkModelInfo, "modelInvariantUuid") !=null ?
+ msoUtils.getNodeText(networkModelInfo, "modelInvariantUuid") : ""
+ String modelCustomizationUuid = msoUtils.getNodeText(networkModelInfo, "modelCustomizationUuid") !=null ?
+ msoUtils.getNodeText(networkModelInfo, "modelCustomizationUuid") : ""
+ String modelUuid = msoUtils.getNodeText(networkModelInfo, "modelUuid") !=null ?
+ msoUtils.getNodeText(networkModelInfo, "modelUuid") : ""
+ String modelVersion = msoUtils.getNodeText(networkModelInfo, "modelVersion") !=null ?
+ msoUtils.getNodeText(networkModelInfo, "modelVersion") : ""
+ String modelName = msoUtils.getNodeText(networkModelInfo, "modelName") !=null ?
+ msoUtils.getNodeText(networkModelInfo, "modelName") : ""
// service-information from 'networkModelInfo' // verify the DB Catalog response
- String serviceModelInfo = utils.getNodeXml(requestXML, "serviceModelInfo", false).replace("tag0:","").replace(":tag0","")
- String serviceModelInvariantUuid = utils.getNodeText(serviceModelInfo, "modelInvariantUuid") !=null ?
- utils.getNodeText(serviceModelInfo, "modelInvariantUuid") : ""
- String serviceModelUuid = utils.getNodeText(serviceModelInfo, "modelUuid") !=null ?
- utils.getNodeText(serviceModelInfo, "modelUuid") : ""
- String serviceModelVersion = utils.getNodeText(serviceModelInfo, "modelVersion") !=null ?
- utils.getNodeText(serviceModelInfo, "modelVersion") : ""
- String serviceModelName = utils.getNodeText(serviceModelInfo, "modelName") !=null ?
- utils.getNodeText(serviceModelInfo, "modelName") : ""
+ String serviceModelInfo = msoUtils.getNodeXml(requestXML, "serviceModelInfo", false).replace("tag0:","").replace(":tag0","")
+ String serviceModelInvariantUuid = msoUtils.getNodeText(serviceModelInfo, "modelInvariantUuid") !=null ?
+ msoUtils.getNodeText(serviceModelInfo, "modelInvariantUuid") : ""
+ String serviceModelUuid = msoUtils.getNodeText(serviceModelInfo, "modelUuid") !=null ?
+ msoUtils.getNodeText(serviceModelInfo, "modelUuid") : ""
+ String serviceModelVersion = msoUtils.getNodeText(serviceModelInfo, "modelVersion") !=null ?
+ msoUtils.getNodeText(serviceModelInfo, "modelVersion") : ""
+ String serviceModelName = msoUtils.getNodeText(serviceModelInfo, "modelName") !=null ?
+ msoUtils.getNodeText(serviceModelInfo, "modelName") : ""
String content =
@@ -808,27 +800,27 @@ class SDNCAdapterUtils {
}else{
// we need to peer into the request data for error
- def String sdncAdapterWorkflowResponse = taskProcessor.utils.getNodeXml(response, 'response-data', false)
+ def String sdncAdapterWorkflowResponse = msoUtils.getNodeXml(response, 'response-data', false)
def String decodedXml = sdncAdapterWorkflowResponse.replace('<?xml version="1.0" encoding="UTF-8"?>', "")
- decodedXml = taskProcessor.utils.getNodeXml(response, 'RequestData')
+ decodedXml = msoUtils.getNodeXml(response, 'RequestData')
logger.debug("decodedXml:\n" + decodedXml)
int requestDataResponseCode = 200
def String requestDataResponseMessage = ''
try{
- if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
- } else if (taskProcessor.utils.nodeExists(sdncAdapterWorkflowResponse, "ResponseMessage")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(sdncAdapterWorkflowResponse, "ResponseMessage")
+ if (msoUtils.nodeExists(decodedXml, "response-message")) {
+ requestDataResponseMessage = msoUtils.getNodeText(decodedXml, "response-message")
+ } else if (msoUtils.nodeExists(sdncAdapterWorkflowResponse, "ResponseMessage")) {
+ requestDataResponseMessage = msoUtils.getNodeText(sdncAdapterWorkflowResponse, "ResponseMessage")
}
}catch(Exception e){
logger.debug('Error caught while decoding resposne ' + e.getMessage())
}
- if(taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+ if(msoUtils.nodeExists(decodedXml, "response-code")) {
logger.debug("response-code node Exist ")
- String code = taskProcessor.utils.getNodeText(decodedXml, "response-code")
+ String code = msoUtils.getNodeText(decodedXml, "response-code")
if(code.isEmpty() || code.equals("")){
// if response-code is blank then Success
logger.debug("response-code node is empty")
@@ -837,9 +829,9 @@ class SDNCAdapterUtils {
requestDataResponseCode = code.toInteger()
logger.debug("response-code is: " + requestDataResponseCode)
}
- }else if(taskProcessor.utils.nodeExists(sdncAdapterWorkflowResponse, "ResponseCode")){
+ }else if(msoUtils.nodeExists(sdncAdapterWorkflowResponse, "ResponseCode")){
logger.debug("ResponseCode node Exist ")
- String code = taskProcessor.utils.getNodeText(sdncAdapterWorkflowResponse, "ResponseCode")
+ String code = msoUtils.getNodeText(sdncAdapterWorkflowResponse, "ResponseCode")
if(code.isEmpty() || code.equals("")){
// if ResponseCode blank then Success
logger.debug("ResponseCode node is empty")
@@ -918,7 +910,7 @@ class SDNCAdapterUtils {
if (success) {
// we need to look inside the request data for error
- def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
+ def String callbackRequestData = msoUtils.getNodeXml(response, 'RequestData', false)
def String decodedXml = callbackRequestData
logger.debug("decodedXml:\n" + decodedXml)
@@ -926,17 +918,17 @@ class SDNCAdapterUtils {
def requestDataResponseMessage = ''
int intDataResponseCode = 200
- if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+ if (msoUtils.nodeExists(decodedXml, "response-code")) {
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code"))
- if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
- requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+ requestDataResponseCode = ((String) msoUtils.getNodeText(decodedXml, "response-code"))
+ if (msoUtils.nodeExists(decodedXml, "response-message")) {
+ requestDataResponseMessage = msoUtils.getNodeText(decodedXml, "response-message")
}
- }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(decodedXml, "ResponseCode")).toInteger()
- }else if(taskProcessor.utils.nodeExists(response, "ResponseCode")){
- requestDataResponseCode = ((String) taskProcessor.utils.getNodeText(response, "ResponseCode")).toInteger()
- requestDataResponseMessage = taskProcessor.utils.getNodeText(response, "ResponseMessage")
+ }else if(msoUtils.nodeExists(decodedXml, "ResponseCode")){
+ requestDataResponseCode = ((String) msoUtils.getNodeText(decodedXml, "ResponseCode")).toInteger()
+ }else if(msoUtils.nodeExists(response, "ResponseCode")){
+ requestDataResponseCode = ((String) msoUtils.getNodeText(response, "ResponseCode")).toInteger()
+ requestDataResponseMessage = msoUtils.getNodeText(response, "ResponseMessage")
}
logger.debug("SDNC callback response-code: " + requestDataResponseCode)
@@ -944,8 +936,8 @@ class SDNCAdapterUtils {
// Get the AAI Status to determine if rollback is needed on ASSIGN
def aai_status = ''
- if (taskProcessor.utils.nodeExists(decodedXml, "aai-status")) {
- aai_status = ((String) taskProcessor.utils.getNodeText(decodedXml, "aai-status"))
+ if (msoUtils.nodeExists(decodedXml, "aai-status")) {
+ aai_status = ((String) msoUtils.getNodeText(decodedXml, "aai-status"))
logger.debug("SDNC sent AAI STATUS code: " + aai_status)
}
if (aai_status != null && !aai_status.equals("")) {
@@ -955,8 +947,8 @@ class SDNCAdapterUtils {
// Get the result string to determine if rollback is needed on ASSIGN in Add Bonding flow only
def sdncResult = ''
- if (taskProcessor.utils.nodeExists(decodedXml, "result")) {
- sdncResult = ((String) taskProcessor.utils.getNodeText(decodedXml, "result"))
+ if (msoUtils.nodeExists(decodedXml, "result")) {
+ sdncResult = ((String) msoUtils.getNodeText(decodedXml, "result"))
logger.debug("SDNC sent result: " + sdncResult)
}
if (sdncResult != null && !sdncResult.equals("")) {
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/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
index 260a9420c8..8af6e809f4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
@@ -49,7 +49,7 @@ public class ExtractPojosForBB {
public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key) throws BBObjectNotFoundException {
return extractByKey(execution, key, execution.getLookupMap().get(key));
}
- protected <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
+ public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
throws BBObjectNotFoundException {
Optional<T> result = Optional.empty();
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
index 29abe4413b..0b2ef928ad 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java
@@ -25,11 +25,11 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers;
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader;
-import org.onap.ccsdk.apps.controllerblueprints.common.api.EventType;
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceInput;
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceOutput;
+import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader;
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType;
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput;
import org.onap.so.client.PreconditionFailedException;
import org.onap.so.client.RestPropertiesLoader;
import org.onap.so.client.cds.beans.AbstractCDSPropertiesBean;
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
index 51dd77d383..570acf4524 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
@@ -53,12 +53,7 @@ public class SDNCAdapterUtilsTest {
map = new HashMap<String,Object>()
svcex = mock(ExecutionEntity.class)
wfex = null
- tp = new AbstractServiceTaskProcessor() {
- @Override
- public void preProcessRequest(DelegateExecution execution) {
- }
- };
- utils = new SDNCAdapterUtils(tp)
+ utils = new SDNCAdapterUtils()
// svcex gets its variables from "map"
when(svcex.getVariable(any())).thenAnswer(
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
index a83337fc5b..5271bb3c53 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
@@ -22,13 +22,17 @@ package org.onap.so.bpmn.core.domain;
import static org.junit.Assert.*;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
public class VnfResourceTest {
-
+
+ private final static String ALL_VF_MODULES_JSON =
+ "{\"ArrayList\":[{\"resourceType\":\"MODULE\",\"resourceInstance\":{},\"homingSolution\":{\"license\":{},\"rehome\":false},\"vfModuleName\":\"vfModuleName\",\"vfModuleType\":\"vfModuleType\",\"heatStackId\":\"heatStackId\",\"hasVolumeGroup\":true,\"isBase\":true,\"vfModuleLabel\":\"vfModuleLabel\",\"initialCount\":0},{\"resourceType\":\"MODULE\",\"resourceInstance\":{},\"homingSolution\":{\"license\":{},\"rehome\":false},\"vfModuleName\":\"vfModuleName\",\"vfModuleType\":\"vfModuleType\",\"heatStackId\":\"heatStackId\",\"hasVolumeGroup\":true,\"isBase\":true,\"vfModuleLabel\":\"vfModuleLabel\",\"initialCount\":0}]}";
+
private VnfResource vnf= new VnfResource();
List<ModuleResource> moduleResources;
@@ -63,4 +67,34 @@ public class VnfResourceTest {
assertTrue(vnfResource != null);
}
+ @Test
+ public void testVfModules() {
+
+ moduleResources = new ArrayList<>();
+
+ ModuleResource moduleresource = new ModuleResource();
+ moduleresource.setVfModuleName("vfModuleName");
+ moduleresource.setHeatStackId("heatStackId");
+ moduleresource.setIsBase(true);
+ moduleresource.setVfModuleLabel("vfModuleLabel");
+ moduleresource.setInitialCount(0);
+ moduleresource.setVfModuleType("vfModuleType");
+ moduleresource.setHasVolumeGroup(true);
+
+ moduleResources.add(moduleresource);
+
+ vnf.setModules(moduleResources);
+ assertEquals(vnf.getVfModules(), moduleResources);
+
+ List<ModuleResource> moduleResources = vnf.getAllVfModuleObjects();
+ assertEquals(1, moduleResources.size());
+
+ vnf.addVfModule(moduleresource);
+ moduleResources = vnf.getAllVfModuleObjects();
+ assertEquals(2, moduleResources.size());
+
+ assertEquals(ALL_VF_MODULES_JSON, vnf.getAllVfModulesJson());
+
+ }
+
}
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn
new file mode 100644
index 0000000000..92ac5f9f5b
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigDeployVnfBB.bpmn
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1556kf5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
+ <bpmn:process id="ConfigDeployVnfBB" name="ConfigDeployVnfBB" isExecutable="true">
+ <bpmn:startEvent id="Start" name="Start">
+ <bpmn:outgoing>SequenceFlow_0pd4jka</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:serviceTask id="UpdateAAIConfigured" name="Update AAI Configured" camunda:expression="${ConfigDeployVnf.updateAAIConfigured(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_1tb7fs1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00u29dm</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="End" name="End">
+ <bpmn:incoming>SequenceFlow_00u29dm</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0pd4jka" sourceRef="Start" targetRef="UpdateAAIConfigure" />
+ <bpmn:sequenceFlow id="SequenceFlow_03xbj4e" sourceRef="AbstractCDSBB" targetRef="ExclusiveGateway_0duh80v" />
+ <bpmn:sequenceFlow id="SequenceFlow_00u29dm" sourceRef="UpdateAAIConfigured" targetRef="End" />
+ <bpmn:callActivity id="AbstractCDSBB" name="Abstract CDS (CDS Call)" calledElement="AbstractCDSProcessingBB">
+ <bpmn:extensionElements>
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="executionObject" target="executionObject" />
+ <camunda:out source="CDSStatus" target="CDSStatus" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0kruy8t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_03xbj4e</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:serviceTask id="UpdateAAIConfigure" name="Update AAI Configure" camunda:expression="${ConfigDeployVnf.updateAAIConfigure(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0pd4jka</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0moyu92</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0moyu92" sourceRef="UpdateAAIConfigure" targetRef="PreProcessAbstractCDSProcessing" />
+ <bpmn:sequenceFlow id="SequenceFlow_0kruy8t" sourceRef="PreProcessAbstractCDSProcessing" targetRef="AbstractCDSBB" />
+ <bpmn:serviceTask id="PreProcessAbstractCDSProcessing" name="PreProcess Abstract CDS Processing" camunda:expression="${ConfigDeployVnf.preProcessAbstractCDSProcessing(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0moyu92</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0kruy8t</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0duh80v" default="SequenceFlow_0o50k2d">
+ <bpmn:incoming>SequenceFlow_03xbj4e</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1tb7fs1</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0o50k2d</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1tb7fs1" name="success" sourceRef="ExclusiveGateway_0duh80v" targetRef="UpdateAAIConfigured">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("CDSStatus").equals("Success")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0o50k2d" sourceRef="ExclusiveGateway_0duh80v" targetRef="EndEvent_0wwnq4u" />
+ <bpmn:endEvent id="EndEvent_0wwnq4u">
+ <bpmn:incoming>SequenceFlow_0o50k2d</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_0zsv500" />
+ </bpmn:endEvent>
+ </bpmn:process>
+ <bpmn:error id="Error_0zsv500" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ConfigDeployVnfBB">
+ <bpmndi:BPMNEdge id="SequenceFlow_0pd4jka_di" bpmnElement="SequenceFlow_0pd4jka">
+ <di:waypoint x="542" y="248" />
+ <di:waypoint x="607" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_03xbj4e_di" bpmnElement="SequenceFlow_03xbj4e">
+ <di:waypoint x="1039" y="248" />
+ <di:waypoint x="1089" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00u29dm_di" bpmnElement="SequenceFlow_00u29dm">
+ <di:waypoint x="1327" y="248" />
+ <di:waypoint x="1399" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start">
+ <dc:Bounds x="506" y="230" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="512" y="273" width="25" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0c9apxl_di" bpmnElement="UpdateAAIConfigured">
+ <dc:Bounds x="1227" y="208" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0p7ssqo_di" bpmnElement="End">
+ <dc:Bounds x="1399" y="230" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1407" y="273" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0vg7uiv_di" bpmnElement="AbstractCDSBB">
+ <dc:Bounds x="939" y="208" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_05zt0do_di" bpmnElement="UpdateAAIConfigure">
+ <dc:Bounds x="607" y="208" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0moyu92_di" bpmnElement="SequenceFlow_0moyu92">
+ <di:waypoint x="707" y="248" />
+ <di:waypoint x="770" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0kruy8t_di" bpmnElement="SequenceFlow_0kruy8t">
+ <di:waypoint x="870" y="248" />
+ <di:waypoint x="939" y="248" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0m4kmps_di" bpmnElement="PreProcessAbstractCDSProcessing">
+ <dc:Bounds x="770" y="208" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0duh80v_di" bpmnElement="ExclusiveGateway_0duh80v" isMarkerVisible="true">
+ <dc:Bounds x="1089" y="223" width="50" height="50" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tb7fs1_di" bpmnElement="SequenceFlow_1tb7fs1">
+ <di:waypoint x="1139" y="248" />
+ <di:waypoint x="1227" y="248" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1163" y="230" width="41" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o50k2d_di" bpmnElement="SequenceFlow_0o50k2d">
+ <di:waypoint x="1114" y="273" />
+ <di:waypoint x="1114" y="348" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1p3d0t4_di" bpmnElement="EndEvent_0wwnq4u">
+ <dc:Bounds x="1096" y="348" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
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/CreateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
index 712512fdc9..fa9fe62df4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -268,7 +268,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
*/
public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
String responseCodeVar, String errorResponseVar) {
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
index c0e8d5a6ba..e941d50155 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
@@ -349,7 +349,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
logger.debug("SDNCResponse: " + response)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
index ce9df87799..a12c2f4b85 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
@@ -156,7 +156,7 @@ public class DoCreateE2EServiceInstanceRollback extends AbstractServiceTaskProce
logger.debug("SDNCResponse: " + response)
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
index 41bae326a5..22c8a11fae 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -1081,7 +1081,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "assignSDNCResponse")
@@ -1109,7 +1109,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "activateSDNCResponse")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
index c144dc0f46..41a302f5f1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
@@ -244,7 +244,7 @@ public class DoCreateNetworkInstanceRollback extends AbstractServiceTaskProcesso
rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
String rollbackSDNCReturnInnerCode = ""
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
rollbackSDNCResponse = rollbackSDNCResponse
rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
if (rollbackSDNCReturnCode == "200") {
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 163bd0f583..bf52b11de2 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
@@ -491,7 +491,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
String response = execution.getVariable("sdncAdapterResponse")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
index a337087105..1eeba493f4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
@@ -149,7 +149,7 @@ public class DoCreateServiceInstanceRollback extends AbstractServiceTaskProcesso
logger.debug("SDNCResponse: " + response)
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
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..6b4fc840f7 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
@@ -84,7 +84,7 @@ public class DoCreateVfModule extends VfModuleBase {
String Prefix="DCVFM_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
OofInfraUtils oofInfraUtils = new OofInfraUtils()
CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create()
DecomposeJsonUtil decomposeJsonUtils = new DecomposeJsonUtil()
@@ -598,7 +598,7 @@ public class DoCreateVfModule extends VfModuleBase {
*/
public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
String responseCodeVar, String errorResponseVar) {
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
}
@@ -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())
}
}
@@ -1638,7 +1635,7 @@ public class DoCreateVfModule extends VfModuleBase {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
String sdncResponse = response
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index 07ffa38498..65f6f76a21 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -463,7 +463,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
WorkflowException workflowException = execution.getVariable("WorkflowException")
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
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..fb5c0fa0aa 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
@@ -61,7 +61,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
VidUtils vidUtils = new VidUtils(this)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
OofInfraUtils oofInfraUtils = new OofInfraUtils()
/**
@@ -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")
@@ -530,7 +530,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
logger.debug("SDNCResponse: " + response)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
index 3209f52fef..7ea32d2a60 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
@@ -315,7 +315,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
String sdncResponse = response
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index a54d90b2bf..2558f7eff5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -691,7 +691,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
String deleteSDNCResponseDecodeXml = execution.getVariable(Prefix + "deleteSDNCResponse")
@@ -719,7 +719,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
String assignSDNCResponseDecodeXml = execution.getVariable(Prefix + "deactivateSDNCResponse")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
index d09fb03445..36c145b0e0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
@@ -220,7 +220,7 @@ public class DoDeleteNetworkInstanceRollback extends AbstractServiceTaskProcesso
rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
String rollbackSDNCReturnInnerCode = ""
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
if (rollbackSDNCReturnCode == "200") {
if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index 2e1cca54a6..0c676b5589 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -258,7 +258,7 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
logger.debug("SDNCResponse: " + response)
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
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..b21dcf3433 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
@@ -375,7 +375,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
WorkflowException workflowException = execution.getVariable("WorkflowException")
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
@@ -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..e5306c40de 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
@@ -342,7 +339,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
logger.debug("SDNCResponse: " + response)
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..9bd3388b79 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
@@ -60,7 +60,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
VidUtils vidUtils = new VidUtils(this)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
/**
* This method gets and validates the incoming
@@ -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)
@@ -501,7 +500,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
logger.debug("SDNCResponse: " + response)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
index ce61595680..430c16bbef 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -946,7 +946,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
String changeAssignSDNCResponseDecodeXml = execution.getVariable(Prefix + "changeAssignSDNCResponse")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
index 1b98451fbe..371e54ca75 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
@@ -204,7 +204,7 @@ public class DoUpdateNetworkInstanceRollback extends AbstractServiceTaskProcesso
rollbackSDNCReturnCode = execution.getVariable(Prefix + "rollbackSDNCReturnCode")
String rollbackSDNCResponse = execution.getVariable(Prefix + "rollbackSDNCResponse")
String rollbackSDNCReturnInnerCode = ""
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
rollbackSDNCResponse = rollbackSDNCResponse.replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
if (rollbackSDNCReturnCode == "200") {
if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
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..abbcf66323 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
@@ -988,7 +988,7 @@ public class DoUpdateVfModule extends VfModuleBase {
logger.debug("workflowException: " + workflowException)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
logger.debug("SDNCResponse: " + response)
@@ -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"
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index 24589a0893..2c5b6430e6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -511,7 +511,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
index f27b3d94b1..58c0ef2dcf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
@@ -167,7 +167,7 @@ public class DoCreateAllottedResourceBRGRollback extends AbstractServiceTaskProc
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index b6e7470834..61dd13b4e2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -446,7 +446,7 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
index ad2c9e155d..44e27d99cf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
@@ -168,7 +168,7 @@ public class DoCreateAllottedResourceTXCRollback extends AbstractServiceTaskProc
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
index ca1b2ded2a..9dcee3dfb2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
@@ -302,7 +302,7 @@ public class DoDeleteAllottedResourceBRG extends AbstractServiceTaskProcessor{
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
index 0da6fd26f4..43e095859e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
@@ -306,7 +306,7 @@ public class DoDeleteAllottedResourceTXC extends AbstractServiceTaskProcessor{
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
logger.debug("SDNCResponse: " + response)
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+ SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index bc6770cc81..82b61c17b5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -538,4 +538,26 @@ public class AAIUpdateTasks {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}
+
+ public void updateOrchestrationStausConfigDeployConfigureVnf(BuildingBlockExecution execution){
+ try{
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+ aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.CONFIGURE);
+
+ }catch(Exception ex){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+
+ }
+
+ public void updateOrchestrationStausConfigDeployConfiguredVnf(BuildingBlockExecution execution){
+ try{
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+ aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.CONFIGURED);
+
+ }catch(Exception ex){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
new file mode 100644
index 0000000000..1bc7c0f574
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
@@ -0,0 +1,130 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+
+package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
+
+import java.util.UUID;
+
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.infrastructure.aai.tasks.AAIUpdateTasks;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.cds.beans.AbstractCDSPropertiesBean;
+import org.onap.so.client.cds.beans.ConfigDeployPropertiesForVnf;
+import org.onap.so.client.cds.beans.ConfigDeployRequestVnf;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * Get vnf related data and config Deploy
+ *
+ */
+@Component
+public class ConfigDeployVnf {
+ private static final Logger logger = LoggerFactory.getLogger(ConfigDeployVnf.class);
+ private final static String ORIGINATOR_ID = "SO";
+ private final static String ACTION_NAME = "config-deploy";
+ private final static String MODE = "async";
+
+ @Autowired
+ private ExceptionBuilder exceptionUtil;
+ @Autowired
+ private ExtractPojosForBB extractPojosForBB;
+ @Autowired
+ private AAIUpdateTasks aaiUpdateTask;
+
+ /**
+ * Update vnf orch status to configure in AAI
+ *
+ * @param execution
+ */
+ public void updateAAIConfigure(BuildingBlockExecution execution) {
+ aaiUpdateTask.updateOrchestrationStausConfigDeployConfigureVnf(execution);
+
+ }
+ /**
+ * Getting the vnf object and set in execution object
+ *
+ * @param execution
+ *
+ *
+ */
+ public void preProcessAbstractCDSProcessing(BuildingBlockExecution execution) {
+
+
+ logger.info("Start preProcessAbstractCDSProcessing");
+ try {
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+
+ ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
+
+ ConfigDeployPropertiesForVnf configDeployPropertiesForVnf = new ConfigDeployPropertiesForVnf();
+ configDeployPropertiesForVnf.setServiceInstanceId(serviceInstance.getServiceInstanceId());
+ configDeployPropertiesForVnf.setServiceModelUuid(serviceInstance.getModelInfoServiceInstance().getModelUuid());
+ configDeployPropertiesForVnf.setVnfCustomizationUuid(vnf.getModelInfoGenericVnf().getModelCustomizationUuid());
+ configDeployPropertiesForVnf.setVnfId(vnf.getVnfId());
+ configDeployPropertiesForVnf.setVnfName(vnf.getVnfName());
+
+ ConfigDeployRequestVnf configDeployRequestVnf = new ConfigDeployRequestVnf();
+
+ configDeployRequestVnf.setResolutionKey(vnf.getVnfName());
+ configDeployRequestVnf.setConfigDeployPropertiesForVnf(configDeployPropertiesForVnf);
+
+ String blueprintName = vnf.getBlueprintName();
+ String blueprintVersion = vnf.getBlueprintVersion();
+ AbstractCDSPropertiesBean abstractCDSPropertiesBean = new AbstractCDSPropertiesBean();
+
+ abstractCDSPropertiesBean.setBlueprintName(blueprintName);
+ abstractCDSPropertiesBean.setBlueprintVersion(blueprintVersion);
+ abstractCDSPropertiesBean.setRequestObject(configDeployRequestVnf.toString());
+
+
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+
+ abstractCDSPropertiesBean.setOriginatorId( ORIGINATOR_ID);
+ abstractCDSPropertiesBean.setRequestId(gBBInput.getRequestContext().getMsoRequestId());
+ abstractCDSPropertiesBean.setSubRequestId(UUID.randomUUID().toString());
+ abstractCDSPropertiesBean.setActionName(ACTION_NAME);
+ abstractCDSPropertiesBean.setMode(MODE);
+
+ execution.setVariable("executionObject", abstractCDSPropertiesBean);
+
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
+ /**
+ * Update vnf orch status to configured in AAI
+ *
+ * @param execution
+ */
+ public void updateAAIConfigured(BuildingBlockExecution execution) {
+ aaiUpdateTask.updateOrchestrationStausConfigDeployConfiguredVnf(execution);
+
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java
new file mode 100644
index 0000000000..e93e216ea3
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Intel Corp. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.client.adapter.vnf.mapper;
+
+import java.io.Serializable;
+
+public class AttributeNameValue implements Serializable {
+ private final static long serialVersionUID = -5215028275587848311L;
+
+ private String attributeName;
+ private Object attributeValue;
+
+ public AttributeNameValue(String attributeName, Object attributeValue) {
+ this.attributeName = attributeName;
+ this.attributeValue = attributeValue;
+ }
+
+ public String getAttributeName() {
+ return attributeName;
+ }
+
+ public void setAttributeName(String attributeName) {
+ this.attributeName = attributeName;
+ }
+
+ public Object getAttributeValue() {
+ return attributeValue;
+ }
+
+ public void setAttributeValue(Object attributeValue) {
+ this.attributeValue = attributeValue;
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder().append("{\"attribute_name\": \"")
+ .append(attributeName.toString())
+ .append("\", \"attribute_value\": \"")
+ .append(attributeValue.toString())
+ .append("\"}").toString();
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index 258bea9a01..dc113e5abc 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,6 +36,7 @@ import java.util.Optional;
import javax.annotation.PostConstruct;
+import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang3.StringUtils;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
@@ -78,6 +79,7 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.entity.MsoRequest;
import org.onap.so.jsonpath.JsonPathUtil;
+import org.onap.so.openstack.utils.MsoMulticloudUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -94,7 +96,7 @@ public class VnfAdapterVfModuleObjectMapper {
@Autowired
protected VnfAdapterObjectMapperUtils vnfAdapterObjectMapperUtils;
private static List<String> sdncResponseParamsToSkip = asList("vnf_id", "vf_module_id", "vnf_name", "vf_module_name");
-
+
private ObjectMapper mapper = new ObjectMapper();
private static final JsonPathUtil jsonPath = JsonPathUtil.getInstance();
private static final String SUB_INT = "subint";
@@ -110,23 +112,23 @@ public class VnfAdapterVfModuleObjectMapper {
private static final String FLOATING_IP = "_floating_ip";
private static final String FLOATING_V6_IP = "_floating_v6_ip";
private static final String UNDERSCORE = "_";
-
+
@PostConstruct
public void init () {
mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
}
-
- public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
+
+ public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule, VolumeGroup volumeGroup, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
CreateVfModuleRequest createVfModuleRequest = new CreateVfModuleRequest();
-
+
createVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
createVfModuleRequest.setCloudOwner(cloudRegion.getCloudOwner());
createVfModuleRequest.setTenantId(cloudRegion.getTenantId());
createVfModuleRequest.setVfModuleId(vfModule.getVfModuleId());
createVfModuleRequest.setVfModuleName(vfModule.getVfModuleName());
createVfModuleRequest.setVnfId(genericVnf.getVnfId());
- createVfModuleRequest.setVnfType(genericVnf.getVnfType());
+ createVfModuleRequest.setVnfType(genericVnf.getVnfType());
createVfModuleRequest.setVnfVersion(serviceInstance.getModelInfoServiceInstance().getModelVersion());
createVfModuleRequest.setVfModuleType(vfModule.getModelInfoVfModule().getModelName());
createVfModuleRequest.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID());
@@ -134,38 +136,38 @@ public class VnfAdapterVfModuleObjectMapper {
createVfModuleRequest.setVolumeGroupId(volumeGroup.getVolumeGroupId());
createVfModuleRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
}
- VfModule baseVfModule = getBaseVfModule(genericVnf);
+ VfModule baseVfModule = getBaseVfModule(genericVnf);
if (baseVfModule != null) {
createVfModuleRequest.setBaseVfModuleId(baseVfModule.getVfModuleId());
createVfModuleRequest.setBaseVfModuleStackId(baseVfModule.getHeatStackId());
}
createVfModuleRequest.setVfModuleParams(buildVfModuleParamsMap(requestContext, serviceInstance, genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse));
-
- createVfModuleRequest.setSkipAAI(true);
+
+ createVfModuleRequest.setSkipAAI(true);
createVfModuleRequest.setBackout(Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled()));
createVfModuleRequest.setFailIfExists(true);
-
- MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance);
+
+ MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance);
createVfModuleRequest.setMsoRequest(msoRequest);
-
+
String messageId = vnfAdapterObjectMapperUtils.getRandomUuid();
createVfModuleRequest.setMessageId(messageId);
createVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId));
-
+
return createVfModuleRequest;
}
-
+
private MsoRequest buildMsoRequest(RequestContext requestContext,ServiceInstance serviceInstance) {
MsoRequest msoRequest = new MsoRequest();
msoRequest.setRequestId(requestContext.getMsoRequestId());
msoRequest.setServiceInstanceId(serviceInstance.getServiceInstanceId());
- return msoRequest;
+ return msoRequest;
}
-
- private Map<String,Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
+
+ private Map<String,Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
-
-
+
+
GenericResourceApiVnfTopology vnfTop= mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnfTopology.class);
GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class);
GenericResourceApiVnftopologyVnfTopology vnfTopology = vnfTop.getVnfTopology();
@@ -181,19 +183,41 @@ public class VnfAdapterVfModuleObjectMapper {
buildParamsMapFromVfModuleSdncResponse(paramsMap, vfModuleTopology, false);
buildParamsMapFromVnfSdncResponse(paramsMap, vnfTopology, networkRoleMap, false);
}
-
+
+ // build the sdnc_directives from paramsMap
+ buildDirectivesParamFromMap(paramsMap, MsoMulticloudUtils.SDNC_DIRECTIVES, paramsMap);
+ buildDirectivesParamFromMap(paramsMap, MsoMulticloudUtils.USER_DIRECTIVES, requestContext.getUserParams());
+
buildMandatoryParamsMap(paramsMap, serviceInstance, genericVnf, vfModule);
-
+
// Parameters received from the request should overwrite any parameters received from SDNC
paramsMap.putAll(requestContext.getUserParams());
-
+
if (vfModule.getCloudParams() != null) {
paramsMap.putAll(vfModule.getCloudParams());
}
return paramsMap;
}
-
- private void buildMandatoryParamsMap(Map<String,Object> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) {
+
+ private void buildDirectivesParamFromMap(Map<String, Object> paramsMap, String directive, Map<String, Object> srcMap) {
+ StringBuilder directives = new StringBuilder();
+ if (srcMap.size() > 0) {
+ directives.append("{ \"attributes\": [ ");
+ int i = 0;
+ for (String attributeName : srcMap.keySet()) {
+ directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString()));
+ if (i < (srcMap.size()-1))
+ directives.append(", ");
+ i++;
+ }
+ directives.append("] }");
+ } else {
+ directives.append("{}");
+ }
+ paramsMap.put(directive, directives.toString());
+ }
+
+ private void buildMandatoryParamsMap(Map<String,Object> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) {
paramsMap.put("vnf_id", genericVnf.getVnfId());
paramsMap.put("vnf_name", genericVnf.getVnfName());
paramsMap.put("vf_module_id", vfModule.getVfModuleId());
@@ -205,26 +229,26 @@ public class VnfAdapterVfModuleObjectMapper {
Integer vfModuleIndex = vfModule.getModuleIndex();
if (vfModuleIndex != null) {
paramsMap.put("vf_module_index", vfModuleIndex.toString());
- }
+ }
}
-
- private void buildParamsMapFromVnfSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException {
+
+ private void buildParamsMapFromVnfSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException {
// Get VNF parameters from SDNC response
GenericResourceApiParam vnfParametersData = vnfTopology.getVnfParametersData();
buildParamsMapFromSdncParams(paramsMap, vnfParametersData);
-
+
if(!skipVnfResourceAssignments) {
- GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments();
+ GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments();
if (vnfResourceAssignments != null) {
// Availability Zones
buildAvailabilityZones(paramsMap, vnfResourceAssignments);
// VNF Networks
- buildVnfNetworks(paramsMap, vnfResourceAssignments, networkRoleMap);
+ buildVnfNetworks(paramsMap, vnfResourceAssignments, networkRoleMap);
}
}
}
-
- private void buildAvailabilityZones (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
+
+ private void buildAvailabilityZones (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsAvailabilityZones availabilityZones = vnfResourceAssignments.getAvailabilityZones();
if (availabilityZones != null) {
List<String> availabilityZonesList = availabilityZones.getAvailabilityZone();
@@ -235,7 +259,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
private void buildVnfNetworks (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments, Map<String,String> networkRoleMap) {
GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks = vnfResourceAssignments.getVnfNetworks();
if (vnfNetworks != null) {
@@ -247,41 +271,41 @@ public class VnfAdapterVfModuleObjectMapper {
String vnfNetworkKey = networkRoleMap.get(networkRole);
if (vnfNetworkKey == null || vnfNetworkKey.isEmpty()) {
vnfNetworkKey = networkRole;
- }
-
+ }
+
String vnfNetworkNeutronIdValue = vnfNetwork.getNeutronId();
paramsMap.put(vnfNetworkKey + "_net_id", vnfNetworkNeutronIdValue);
String vnfNetworkNetNameValue = vnfNetwork.getNetworkName();
paramsMap.put(vnfNetworkKey + "_net_name", vnfNetworkNetNameValue);
String vnfNetworkNetFqdnValue = vnfNetwork.getContrailNetworkFqdn();
paramsMap.put(vnfNetworkKey + "_net_fqdn", vnfNetworkNetFqdnValue);
-
+
buildVnfNetworkSubnets(paramsMap, vnfNetwork, vnfNetworkKey);
-
+
}
}
}
}
-
+
private void buildVnfNetworkSubnets(Map<String,Object> paramsMap, GenericResourceApiVnfNetworkData vnfNetwork, String vnfNetworkKey) {
String vnfNetworkString = convertToString(vnfNetwork);
Optional<String> ipv4Ips = jsonPath.locateResult(vnfNetworkString, "$.subnets-data.subnet-data[*].[?(@.ip-version == 'ipv4' && @.dhcp-enabled == 'Y')].subnet-id");
if(ipv4Ips.isPresent())
addPairToMap(paramsMap, vnfNetworkKey, SUBNET_ID, ipv4Ips.get());
-
+
Optional<String> ipv6Ips = jsonPath.locateResult(vnfNetworkString, "$.subnets-data.subnet-data[*].[?(@.ip-version == 'ipv6' && @.dhcp-enabled == 'Y')].subnet-id");
if(ipv6Ips.isPresent())
addPairToMap(paramsMap, vnfNetworkKey, V6_SUBNET_ID, ipv6Ips.get());
- }
+ }
- private void buildParamsMapFromVfModuleSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException {
+ private void buildParamsMapFromVfModuleSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException {
// Get VF Module parameters from SDNC response
GenericResourceApiParam vfModuleParametersData = vfModuleTopology.getVfModuleParameters();
buildParamsMapFromSdncParams(paramsMap, vfModuleParametersData);
-
- if(!skipVfModuleAssignments) {
+
+ if(!skipVfModuleAssignments) {
GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = vfModuleTopology.getVfModuleAssignments();
- if (vfModuleAssignments != null) {
+ if (vfModuleAssignments != null) {
// VNF-VMS
GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms vms = vfModuleAssignments.getVms();
if (vms != null) {
@@ -289,7 +313,7 @@ public class VnfAdapterVfModuleObjectMapper {
if (vmsList != null) {
for (GenericResourceApiVmTopologyData vm : vmsList){
String key = vm.getVmType();
- buildVfModuleVmNames(paramsMap, vm, key);
+ buildVfModuleVmNames(paramsMap, vm, key);
GenericResourceApiVmtopologydataVmNetworks vmNetworks = vm.getVmNetworks();
if (vmNetworks != null) {
List<GenericResourceApiVmNetworkData> vmNetworksList = vmNetworks.getVmNetwork();
@@ -297,49 +321,49 @@ public class VnfAdapterVfModuleObjectMapper {
for(int n = 0; n < vmNetworksList.size(); n++){
GenericResourceApiVmNetworkData network = vmNetworksList.get(n);
network.getNetworkRoleTag();
- String networkKey = network.getNetworkRole();
+ String networkKey = network.getNetworkRole();
// Floating IPs
- buildVfModuleFloatingIps(paramsMap, network, key, networkKey);
+ buildVfModuleFloatingIps(paramsMap, network, key, networkKey);
// Interface Route Prefixes
- buildVfModuleInterfaceRoutePrefixes(paramsMap, network, key, networkKey);
+ buildVfModuleInterfaceRoutePrefixes(paramsMap, network, key, networkKey);
// SRIOV Parameters
- buildVfModuleSriovParameters(paramsMap, network, networkKey);
+ buildVfModuleSriovParameters(paramsMap, network, networkKey);
// IPV4 and IPV6 Addresses
buildVfModuleNetworkInformation(paramsMap, network, key, networkKey);
-
+
buildVlanInformation(paramsMap, network, key, networkKey);
-
+
}
}
}
-
+
buildParamsMapFromVfModuleForHeatTemplate(paramsMap, vm);
}
- }
- }
+ }
+ }
}
}
}
-
+
protected void buildVlanInformation(Map<String, Object> paramsMap,
GenericResourceApiVmNetworkData network, String key, String networkKey) {
-
+
String networkString = convertToString(network);
String vlanFilterKey = key + UNDERSCORE + networkKey + UNDERSCORE + "vlan_filter";
String privateVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "private_vlans";
String publicVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "public_vlans";
String guestVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "guest_vlans";
-
+
if (network.getSegmentationId() != null) {
paramsMap.put(vlanFilterKey, network.getSegmentationId());
}
-
+
List<String> privateVlans = jsonPath.locateResultList(networkString, "$.related-networks.related-network[?(@.vlan-tags.is-private == true)].vlan-tags.upper-tag-id");
List<String> publicVlans = jsonPath.locateResultList(networkString, "$.related-networks.related-network[?(@.vlan-tags.is-private == false)].vlan-tags.upper-tag-id");
List<String> concat = new ArrayList<>(privateVlans);
concat.addAll(publicVlans);
Collection<String> guestVlans = new HashSet<>(concat);
-
+
if (!privateVlans.isEmpty()) {
paramsMap.put(privateVlansKey, Joiner.on(",").join(privateVlans));
}
@@ -358,7 +382,7 @@ public class VnfAdapterVfModuleObjectMapper {
List<String> valueList = vmNames.getVmName();
if (valueList != null) {
for(int i = 0; i < valueList.size(); i++){
- String value = valueList.get(i);
+ String value = valueList.get(i);
if (i != valueList.size() - 1) {
values += value + ",";
}
@@ -371,7 +395,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
private void buildVfModuleFloatingIps(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
GenericResourceApiVmnetworkdataFloatingIps floatingIps = network.getFloatingIps();
if (floatingIps != null) {
@@ -395,7 +419,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
private void buildVfModuleInterfaceRoutePrefixes(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
GenericResourceApiVmnetworkdataInterfaceRoutePrefixes interfaceRoutePrefixes = network.getInterfaceRoutePrefixes();
if (interfaceRoutePrefixes != null) {
@@ -404,14 +428,14 @@ public class VnfAdapterVfModuleObjectMapper {
sbInterfaceRoutePrefixes.append("[");
if (interfaceRoutePrefixesList != null) {
for(int a = 0; a < interfaceRoutePrefixesList.size(); a++){
- String interfaceRoutePrefixValue = interfaceRoutePrefixesList.get(a);
+ String interfaceRoutePrefixValue = interfaceRoutePrefixesList.get(a);
if (a != interfaceRoutePrefixesList.size() - 1) {
sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ",");
}
else {
- sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}");
+ sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}");
}
- }
+ }
sbInterfaceRoutePrefixes.append("]");
if (interfaceRoutePrefixesList.size() > 0) {
paramsMap.put(key + UNDERSCORE + networkKey + "_route_prefixes", sbInterfaceRoutePrefixes.toString());
@@ -419,7 +443,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
private void buildVfModuleSriovParameters(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String networkKey) {
// SRIOV Parameters
GenericResourceApiVmnetworkdataSriovParameters sriovParameters = network.getSriovParameters();
@@ -430,14 +454,14 @@ public class VnfAdapterVfModuleObjectMapper {
StringBuilder sriovFilterBuf = new StringBuilder();
if (heatVlanFiltersList != null) {
for(int a = 0; a < heatVlanFiltersList.size(); a++){
- String heatVlanFilterValue = heatVlanFiltersList.get(a);
+ String heatVlanFilterValue = heatVlanFiltersList.get(a);
if (a != heatVlanFiltersList.size() - 1) {
sriovFilterBuf.append(heatVlanFilterValue).append(",");
}
else {
- sriovFilterBuf.append(heatVlanFilterValue);
+ sriovFilterBuf.append(heatVlanFilterValue);
}
- }
+ }
if (heatVlanFiltersList.size() > 0) {
paramsMap.put(networkKey + "_ATT_VF_VLAN_FILTER", sriovFilterBuf.toString());
}
@@ -445,13 +469,13 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
private void buildVfModuleNetworkInformation(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
-
+
GenericResourceApiVmnetworkdataNetworkInformationItems networkInformationItems = network.getNetworkInformationItems();
StringBuilder sbIpv4Ips = new StringBuilder();
StringBuilder sbIpv6Ips = new StringBuilder();
-
+
if (networkInformationItems != null) {
List<GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkInformationItem> networkInformationItemList = networkInformationItems.getNetworkInformationItem();
if (networkInformationItemList != null) {
@@ -461,7 +485,7 @@ public class VnfAdapterVfModuleObjectMapper {
GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkinformationitemNetworkIps ips = ipAddress.getNetworkIps();
if (ips != null) {
List<String> ipsList = ips.getNetworkIp();
- if (ipsList != null) {
+ if (ipsList != null) {
String ipVersion = ipAddress.getIpVersion();
for (int b = 0; b < ipsList.size(); b++) {
String ipAddressValue = ipsList.get(b);
@@ -472,7 +496,7 @@ public class VnfAdapterVfModuleObjectMapper {
else {
sbIpv4Ips.append(ipAddressValue);
}
- paramsMap.put(key + UNDERSCORE + networkKey + IP + UNDERSCORE + b, ipAddressValue);
+ paramsMap.put(key + UNDERSCORE + networkKey + IP + UNDERSCORE + b, ipAddressValue);
}
else if (ipVersion.equals("ipv6")) {
if (b != ipsList.size() - 1) {
@@ -481,11 +505,11 @@ public class VnfAdapterVfModuleObjectMapper {
else {
sbIpv6Ips.append(ipAddressValue);
}
- paramsMap.put(key + UNDERSCORE + networkKey + V6_IP + UNDERSCORE + b, ipAddressValue);
- }
+ paramsMap.put(key + UNDERSCORE + networkKey + V6_IP + UNDERSCORE + b, ipAddressValue);
+ }
}
paramsMap.put(key + UNDERSCORE + networkKey + "_ips", sbIpv4Ips.toString());
- paramsMap.put(key + UNDERSCORE + networkKey + "_v6_ips", sbIpv6Ips.toString());
+ paramsMap.put(key + UNDERSCORE + networkKey + "_v6_ips", sbIpv6Ips.toString());
}
}
}
@@ -493,43 +517,43 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
/*
* Build Mapping from GenericResourceApi SDNC for Heat Template so that AIC - PO gets accurate requests for vf module assignments.
* Build Count of SubInterfaces, VLAN Tag, network_name, network_id,
* ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template
- */
+ */
private void buildParamsMapFromVfModuleForHeatTemplate(Map<String,Object> paramsMap, GenericResourceApiVmTopologyData vm) {
GenericResourceApiVmtopologydataVmNames vmNames = vm.getVmNames();
-
+
if (vmNames != null) {
-
+
List<GenericResourceApiVmtopologydataVmnamesVnfcNames> vnfcNamesList = vmNames.getVnfcNames();
if (vnfcNamesList != null) {
-
+
for(int i = 0; i < vnfcNamesList.size(); i++){
-
+
GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames = vnfcNamesList.get(i);
parseVnfcNamesData(paramsMap, vnfcNames);
}
}
}
}
-
+
/*
* Parse vnfcNames data to build Mapping from GenericResourceApi SDNC for Heat Template.
- */
+ */
private void parseVnfcNamesData(Map<String,Object> paramsMap, GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames) {
-
+
if (vnfcNames != null) {
GenericResourceApiVnfcNetworkData vnfcNetworks = vnfcNames.getVnfcNetworks();
if (vnfcNetworks != null) {
List<GenericResourceApiVnfcnetworkdataVnfcNetworkData> vnfcNetworkdataList = vnfcNetworks.getVnfcNetworkData();
-
+
if (vnfcNetworkdataList != null) {
-
+
for(int networkDataIdx = 0; networkDataIdx < vnfcNetworkdataList.size(); networkDataIdx++){
-
+
GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata = vnfcNetworkdataList.get(networkDataIdx);
parseVnfcNetworkData(paramsMap, vnfcNetworkdata, networkDataIdx);
}
@@ -537,72 +561,72 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
-
+
/*
* Parse VnfcNetworkData to build Mapping from GenericResourceApi SDNC for Heat Template.
* Build Count of SubInterfaces, VLAN Tag, network_name, network_id,
* ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template
- */
+ */
private void parseVnfcNetworkData(Map<String,Object> paramsMap, GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata, int networkDataIdx) {
-
+
String vmTypeKey = vnfcNetworkdata.getVnfcType();
GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts vnfcPorts = vnfcNetworkdata.getVnfcPorts();
if (vnfcPorts != null) {
- List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort();
- if (vnfcPortList != null) {
+ List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort();
+ if (vnfcPortList != null) {
for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){
-
+
GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx);
GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces();
-
+
String vnicSubInterfacesString = convertToString(vnicSubInterfaces);
- String networkRoleKey = vnfcPort.getCommonSubInterfaceRole();
+ String networkRoleKey = vnfcPort.getCommonSubInterfaceRole();
String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx);
String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx);
-
+
buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces);
-
+
buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString);
-
+
buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString);
}
}
}
}
-
+
/*
* Build "count" (calculating the total number of sub-interfaces) for Heat Template
* Building Criteria : {vm-type}_subint_{network-role}_port_{index}_subintcount
* vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role
* Example: fw_subint_ctrl_port_0_subintcount
- *
+ *
*/
private void buildVfModuleSubInterfacesCount(Map<String,Object> paramsMap, String keyPrefix, GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces) {
List<GenericResourceApiSubinterfacenetworkdataSubInterfaceNetworkData> subInterfaceNetworkDataList = vnicSubInterfaces.getSubInterfaceNetworkData();
-
+
if ( (subInterfaceNetworkDataList != null) && !subInterfaceNetworkDataList.isEmpty() ) {
addPairToMap(paramsMap, keyPrefix, SUB_INT_COUNT, String.valueOf(subInterfaceNetworkDataList.size()));
}
}
-
+
protected String createVnfcSubInterfaceKey(String vmTypeKey, int networkDataIdx, String networkRoleKey, int portIdx) {
-
+
return Joiner.on(UNDERSCORE).join(Arrays.asList(vmTypeKey, networkDataIdx, SUB_INT, networkRoleKey, PORT, portIdx));
}
-
+
protected String createGlobalVnfcSubInterfaceKey(String vmTypeKey,String networkRoleKey, int portIdx) {
-
+
return Joiner.on(UNDERSCORE).join(Arrays.asList(vmTypeKey, SUB_INT, networkRoleKey, PORT, portIdx));
}
@@ -611,10 +635,10 @@ public class VnfAdapterVfModuleObjectMapper {
* Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_vlan_ids
* vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role
* Example: fw_0_subint_ctrl_port_0_vlan_ids
- *
+ *
*/
protected void buildVfModuleVlanTag(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> vlanTagIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].vlan-tag-id");
addPairToMap(paramsMap, keyPrefix, VLAN_IDS, vlanTagIds);
@@ -624,12 +648,12 @@ public class VnfAdapterVfModuleObjectMapper {
* Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_net_names
* vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role
* Example: fw_0_subint_ctrl_port_0_net_names
- *
+ *
*/
protected void buildVfModuleNetworkName(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> neworkNames = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-name");
-
+
addPairToMap(paramsMap, keyPrefix, NET_NAMES, neworkNames);
}
@@ -638,25 +662,25 @@ public class VnfAdapterVfModuleObjectMapper {
* Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_net_ids
* vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role
* Example: fw_0_subint_ctrl_port_0_net_ids
- *
+ *
*/
protected void buildVfModuleNetworkId(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> neworkIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-id");
-
+
addPairToMap(paramsMap, keyPrefix, NET_IDS, neworkIds);
}
-
+
/*
* Build ip_address for V4 for Heat Template
- * Building Criteria :
+ * Building Criteria :
* {vm-type}_{index}_subint_{network-role}_port_{index}_ip_{index} -- for ipV4
* key = vm-type, networkRoleKey = NetWork-Role
*/
protected void buildVfModuleIpV4AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> ipv4Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv4')].network-ips.network-ip[*]");
-
+
addPairToMap(paramsMap, keyPrefix, IP, ipv4Ips);
for (int i = 0; i < ipv4Ips.size(); i++) {
@@ -664,15 +688,15 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
-
+
/*
* Build ip_address for Heat Template
- * Building Criteria :
+ * Building Criteria :
* {vm-type}_{index}_subint_{network-role}_port_{index}_v6_ip_{index} -- for ipV6
* key = vm-type, networkRoleKey = NetWork-Role
*/
protected void buildVfModuleIpV6AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> ipv6Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv6')].network-ips.network-ip[*]");
addPairToMap(paramsMap, keyPrefix, V6_IP, ipv6Ips);
@@ -681,14 +705,14 @@ public class VnfAdapterVfModuleObjectMapper {
addPairToMap(paramsMap, keyPrefix, V6_IP + UNDERSCORE + i, ipv6Ips.get(i));
}
}
-
+
/*
* Build floatingip_address for Heat Template
- * Building Criteria :
+ * Building Criteria :
* {vm-type}_subint_{network-role}_port_{index}_floating_ip -- for ipV4
*/
protected void buildVfModuleFloatingIpV4HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> floatingV4 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v4[*]");
if (!floatingV4.isEmpty()) {
@@ -697,35 +721,35 @@ public class VnfAdapterVfModuleObjectMapper {
addPairToMap(paramsMap, keyPrefix, FLOATING_IP, floatingV4);
}
-
+
/*
* Build floatingip_address for Heat Template
- * Building Criteria :
+ * Building Criteria :
* {vm-type}_subint_{network-role}_port_{index}_floating_v6_ip -- for ipV6
*/
protected void buildVfModuleFloatingIpV6HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) {
-
+
List<String> floatingV6 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v6[*]");
-
+
if (!floatingV6.isEmpty()) {
floatingV6 = Collections.singletonList(floatingV6.get(0));
}
addPairToMap(paramsMap, keyPrefix, FLOATING_V6_IP, floatingV6);
}
-
+
protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, String value) {
-
+
addPairToMap(paramsMap, keyPrefix, key, Collections.singletonList(value));
}
protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, List<String> value) {
-
+
if (!value.isEmpty()) {
paramsMap.put(keyPrefix + key, Joiner.on(",").join(value));
}
}
-
- private void buildParamsMapFromSdncParams(Map<String,Object> paramsMap, GenericResourceApiParam parametersData) {
+
+ private void buildParamsMapFromSdncParams(Map<String,Object> paramsMap, GenericResourceApiParam parametersData) {
if (parametersData != null) {
List<GenericResourceApiParamParam> paramsList = parametersData.getParam();
if (paramsList != null) {
@@ -736,20 +760,20 @@ public class VnfAdapterVfModuleObjectMapper {
String parameterValue = param.getValue();
paramsMap.put(parameterName, parameterValue);
}
- }
+ }
}
- }
+ }
}
-
+
private Map<String,String> buildNetworkRoleMap(GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology) throws JsonParseException, JsonMappingException, IOException {
- Map<String, String> networkRoleMap = new HashMap<>();
+ Map<String, String> networkRoleMap = new HashMap<>();
GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = vfModuleTopology.getVfModuleAssignments();
- if (vfModuleAssignments != null) {
+ if (vfModuleAssignments != null) {
GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms vms = vfModuleAssignments.getVms();
if (vms != null) {
List<GenericResourceApiVmTopologyData> vmsList = vms.getVm();
if (vmsList != null) {
- for (GenericResourceApiVmTopologyData vm : vmsList){
+ for (GenericResourceApiVmTopologyData vm : vmsList){
GenericResourceApiVmtopologydataVmNetworks vmNetworks = vm.getVmNetworks();
if (vmNetworks != null) {
List<GenericResourceApiVmNetworkData> vmNetworksList = vmNetworks.getVmNetwork();
@@ -771,8 +795,8 @@ public class VnfAdapterVfModuleObjectMapper {
}
return networkRoleMap;
}
-
- public DeleteVfModuleRequest deleteVfModuleRequestMapper(RequestContext requestContext,CloudRegion cloudRegion,
+
+ public DeleteVfModuleRequest deleteVfModuleRequestMapper(RequestContext requestContext,CloudRegion cloudRegion,
ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule) throws IOException {
DeleteVfModuleRequest deleteVfModuleRequest = new DeleteVfModuleRequest();
@@ -787,20 +811,20 @@ public class VnfAdapterVfModuleObjectMapper {
{
deleteVfModuleRequest.setVfModuleStackId(vfModule.getVfModuleName());
}
-
+
deleteVfModuleRequest.setSkipAAI(true);
setIdAndUrl(deleteVfModuleRequest);
- MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance);
+ MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance);
deleteVfModuleRequest.setMsoRequest(msoRequest);
return deleteVfModuleRequest;
}
-
+
protected void setIdAndUrl(DeleteVfModuleRequest deleteVfModuleRequest) throws UnsupportedEncodingException{
String messageId = vnfAdapterObjectMapperUtils.getRandomUuid();
- deleteVfModuleRequest.setMessageId(messageId);
+ deleteVfModuleRequest.setMessageId(messageId);
deleteVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId));
}
-
+
private String convertToString(Object obj) {
String json;
try {
@@ -808,10 +832,10 @@ public class VnfAdapterVfModuleObjectMapper {
} catch (JsonProcessingException e) {
json = "{}";
}
-
+
return json;
}
-
+
private VfModule getBaseVfModule(GenericVnf genericVnf) {
List<VfModule> vfModules = genericVnf.getVfModules();
VfModule baseVfModule = null;
@@ -819,7 +843,7 @@ public class VnfAdapterVfModuleObjectMapper {
for(int i = 0; i < vfModules.size(); i++) {
if (vfModules.get(i).getModelInfoVfModule().getIsBaseBoolean()) {
baseVfModule = vfModules.get(i);
- break;
+ break;
}
}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
index 78d08aa1f1..05af58040a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
@@ -655,4 +655,17 @@ public class AAIUpdateTasksTest extends BaseTaskTest{
aaiUpdateTasks.updateManagementV6AddressVnf(execution);
verify(aaiVnfResources, times(0)).updateObjectVnf(genericVnf);
}
+
+ @Test
+ public void updateOrchestrationStatusVnfConfigureTest() throws Exception {
+ doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.CONFIGURE);
+
+ aaiUpdateTasks.updateOrchestrationStausConfigDeployConfigureVnf(execution);
+ }
+ @Test
+ public void updateOrchestrationStatusVnfConfiguredTest() throws Exception {
+ doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.CONFIGURED);
+
+ aaiUpdateTasks.updateOrchestrationStausConfigDeployConfiguredVnf(execution);
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java
new file mode 100644
index 0000000000..e5aa702dad
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnfTest.java
@@ -0,0 +1,97 @@
+
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+
+package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.when;
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentMatchers;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.infrastructure.aai.tasks.AAIUpdateTasks;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.client.exception.BBObjectNotFoundException;
+
+public class ConfigDeployVnfTest extends BaseTaskTest {
+
+ @InjectMocks
+ private ConfigDeployVnf configDeployVnf = new ConfigDeployVnf();
+ @Mock
+ AAIUpdateTasks aAIUpdateTasks = new AAIUpdateTasks();
+
+
+ private GenericVnf genericVnf;
+ private ServiceInstance serviceInstance;
+ private RequestContext requestContext;
+ private String msoRequestId;
+
+ @Before
+ public void before() throws BBObjectNotFoundException {
+ genericVnf = setGenericVnf();
+ serviceInstance = setServiceInstance();
+ msoRequestId = UUID.randomUUID().toString();
+ requestContext = setRequestContext();
+ requestContext.setMsoRequestId(msoRequestId);
+ gBBInput.setRequestContext(requestContext);
+
+ doThrow(new BpmnError("BPMN Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class));
+ when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))).thenReturn(genericVnf);
+ when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))).thenReturn(serviceInstance);
+ }
+
+
+
+ @Test
+ public void preProcessAbstractCDSProcessingTest() throws Exception {
+
+ configDeployVnf.preProcessAbstractCDSProcessing(execution);
+
+ assertTrue(true);
+ }
+
+ @Test
+ public void updateAAIConfigureTaskTest() throws Exception {
+
+ configDeployVnf.updateAAIConfigure(execution);
+ assertTrue(true);
+ }
+
+ @Test
+ public void updateAAIConfiguredTaskTest() throws Exception {
+ configDeployVnf.updateAAIConfigured(execution);
+ assertTrue(true);
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
index c4e7237511..f655e9aa13 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
@@ -64,6 +64,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
index 0132068fe4..3387b6d87e 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
@@ -63,6 +63,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
index 90326e33eb..8721bdc865 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
@@ -60,6 +60,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
index 2f943a67bc..04f64790c4 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
@@ -62,6 +62,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId4\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
index 4c50ad1187..1b57fcd33c 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
@@ -62,6 +62,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{}"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
index bd06f5f86f..a13740cf80 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json
@@ -63,6 +63,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
index d80c739916..5468e21ee3 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
@@ -29,6 +29,8 @@
"vf_module_name": "vfModuleName",
"vnf_id": "vnfId",
"vnf_name": "vnfName",
- "workload_context": "workloadContext"
+ "workload_context": "workloadContext",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
index 293c6c21ed..dd8e62c0a0 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
@@ -60,6 +60,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
index fd3b0a3d58..d44b1924cc 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
@@ -62,6 +62,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
-} \ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
index dff1ccf7b0..0d103926b9 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
@@ -64,6 +64,8 @@
"vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
"paramOne": "paramOneValue",
"paramTwo": "paramTwoValue",
- "paramThree": "paramThreeValue"
+ "paramThree": "paramThreeValue",
+ "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }",
+ "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }"
}
-} \ No newline at end of file
+}