aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java/org/onap
diff options
context:
space:
mode:
authorsunilb <sb00577584@techmahindra.com>2020-04-16 20:34:26 +0530
committersunilb <sb00577584@techmahindra.com>2020-04-16 20:34:26 +0530
commit029043e9b129a865afcaad03dc138071379340c8 (patch)
tree5b109670e2666ec05dc911a8e5211318a5584053 /bpmn/MSOCommonBPMN/src/main/java/org/onap
parentb0f5ac59c297f81b7f17c1f367e64257ef7be2d2 (diff)
Adding Generic VNF information in ControllerExeuctionBB flow
Issue-ID: SO-2806 Signed-off-by: sunilb <sb00577584@techmahindra.com> Change-Id: I3d34159004f398cd3d44a67468be26668dd67e17
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/onap')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index e774899f74..01a0c3aeea 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -107,6 +107,7 @@ public class BBInputSetup implements JavaDelegate {
private static final String NETWORK_COLLECTION = "NetworkCollection";
private static final String PREPROV = "PREPROV";
private static final String CREATEVOLUME = "CreateVolume";
+ private static final String CONTROLLER = "Controller";
@Autowired
private BBInputSetupUtils bbInputSetupUtils;
@@ -1386,7 +1387,8 @@ public class BBInputSetup implements JavaDelegate {
cloudRegion = mapperLayer.mapCloudRegion(cloudConfiguration, aaiCloudRegion);
}
gBB.setCloudRegion(cloudRegion);
- if (bbName.contains(VNF)) {
+ if (bbName.contains(VNF) || (bbName.contains(CONTROLLER)
+ && (VNF).equalsIgnoreCase(executeBB.getBuildingBlock().getBpmnScope()))) {
for (GenericVnf genericVnf : serviceInstance.getVnfs()) {
if (lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID) != null
&& genericVnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
@@ -1398,7 +1400,8 @@ public class BBInputSetup implements JavaDelegate {
this.mapCatalogVnf(genericVnf, modelInfo, service);
}
}
- } else if (bbName.contains(VF_MODULE)) {
+ } else if (bbName.contains(VF_MODULE) || (bbName.contains(CONTROLLER)
+ && (VF_MODULE).equalsIgnoreCase(executeBB.getBuildingBlock().getBpmnScope()))) {
for (GenericVnf vnf : serviceInstance.getVnfs()) {
for (VfModule vfModule : vnf.getVfModules()) {
if (lookupKeyMap.get(ResourceKey.VF_MODULE_ID) != null
@@ -1502,7 +1505,8 @@ public class BBInputSetup implements JavaDelegate {
BBInputSetupParameter parameter =
new BBInputSetupParameter.Builder().setRequestId(executeBB.getRequestId()).setService(service)
.setBbName(bbName).setServiceInstance(serviceInstance).setLookupKeyMap(lookupKeyMap).build();
- if (bbName.contains(VNF)) {
+ if (bbName.contains(VNF) || (bbName.contains(CONTROLLER)
+ && (VNF).equalsIgnoreCase(executeBB.getBuildingBlock().getBpmnScope()))) {
vnfs = findVnfsByKey(key, resources, vnfs);
String vnfId = lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID);
// This stores the vnf id in request db to be retrieved later when
@@ -1530,7 +1534,8 @@ public class BBInputSetup implements JavaDelegate {
resources.getPnfs().stream()
.filter(pnfs -> Objects.equals(key, pnfs.getModelInfo().getModelCustomizationId())).findFirst()
.ifPresent(pnfs -> BBInputSetupPnf.populatePnfToServiceInstance(pnfs, pnfId, serviceInstance));
- } else if (bbName.contains(VF_MODULE) || bbName.contains(VOLUME_GROUP)) {
+ } else if (bbName.contains(VF_MODULE) || bbName.contains(VOLUME_GROUP) || (bbName.contains(CONTROLLER)
+ && (VF_MODULE).equalsIgnoreCase(executeBB.getBuildingBlock().getBpmnScope()))) {
Pair<Vnfs, VfModules> vnfsAndVfModules = getVfModulesAndItsVnfsByKey(key, resources);
if (vnfsAndVfModules != null) {
vfModules = vnfsAndVfModules.getValue1();