aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorSagarS <sagar.shetty@est.tech>2022-06-07 15:26:45 +0100
committerSagarS <sagar.shetty@est.tech>2022-06-07 16:24:01 +0100
commitcc6009334c69b0856dad1b95755ef560fbeab174 (patch)
tree325e2839805512110de6efff7f045b83c0725c3a /bpmn/MSOCommonBPMN
parenta26443597d3c617dda67228cbecd77808a04a18d (diff)
[SO] CNF Updates
Change-Id: I85ca8e675ca408d33ede87703d97c0ffd212f316 Signed-off-by: SagarS <sagar.shetty@est.tech> Issue-ID: SO-3905
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java19
1 files changed, 17 insertions, 2 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 6d5eb63b0d..a5c23681e2 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
@@ -232,6 +232,7 @@ public class BBInputSetup implements JavaDelegate {
String requestId = executeBB.getRequestId();
this.populateLookupKeyMapWithIds(executeBB.getWorkflowResourceIds(), lookupKeyMap);
RequestDetails requestDetails = executeBB.getRequestDetails();
+ logger.debug("Resource ID, vnfType, requestAction: {},{},{}", resourceId, vnfType, requestAction);
if (requestDetails == null) {
requestDetails = bbInputSetupUtils.getRequestDetails(requestId);
}
@@ -273,6 +274,7 @@ public class BBInputSetup implements JavaDelegate {
ServiceModel serviceModel = new ServiceModel();
Service service = null;
Service newService = null;
+ logger.debug("getGBBALaCarteNonService: {}", bbName);
boolean isReplace = false;
if (serviceInstanceId != null) {
aaiServiceInstance = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId);
@@ -397,6 +399,7 @@ public class BBInputSetup implements JavaDelegate {
parameter.setPlatform(parameter.getRequestDetails().getPlatform());
parameter.setLineOfBusiness(parameter.getRequestDetails().getLineOfBusiness());
String applicationId = "";
+ logger.debug("populateObjectsOnAssignAndCreateFlows: {}", modelType);
if (parameter.getRequestDetails().getRequestInfo().getApplicationId() != null) {
applicationId = parameter.getRequestDetails().getRequestInfo().getApplicationId();
parameter.setApplicationId(applicationId);
@@ -405,7 +408,7 @@ public class BBInputSetup implements JavaDelegate {
if (modelType.equals(ModelType.network)) {
parameter.getLookupKeyMap().put(ResourceKey.NETWORK_ID, parameter.getResourceId());
this.populateL3Network(parameter);
- } else if (modelType.equals(ModelType.vnf)) {
+ } else if (modelType.equals(ModelType.vnf) || modelType.equals(ModelType.cnf)) {
parameter.getLookupKeyMap().put(ResourceKey.GENERIC_VNF_ID, parameter.getResourceId());
this.populateGenericVnf(parameter);
} else if (modelType.equals(ModelType.volumeGroup) || (modelType.equals(ModelType.vfModule)
@@ -892,7 +895,8 @@ public class BBInputSetup implements JavaDelegate {
break;
}
}
- if (vnf == null && parameter.getBbName().equalsIgnoreCase(AssignFlows.VNF.toString())) {
+ if ((vnf == null && parameter.getBbName().equalsIgnoreCase(AssignFlows.VNF.toString()))
+ || (parameter.getRequestDetails() != null && this.isCnf(parameter.getRequestDetails()))) {
vnf = createGenericVnf(parameter.getLookupKeyMap(), parameter.getInstanceName(), parameter.getPlatform(),
parameter.getLineOfBusiness(), parameter.getResourceId(), generatedVnfType,
parameter.getInstanceParams(), parameter.getProductFamilyId(), parameter.getApplicationId());
@@ -909,6 +913,17 @@ public class BBInputSetup implements JavaDelegate {
}
}
+ private boolean isCnf(final RequestDetails requestDetails) {
+ logger.debug("Inside isCNF");
+ if (requestDetails.getModelInfo() != null) {
+ logger.debug("Inside isCNF {}", requestDetails);
+ return ModelType.cnf.equals(requestDetails.getModelInfo().getModelType());
+ }
+
+ logger.debug("Inside isCNF returning false:{}", requestDetails);
+ return false;
+ }
+
protected boolean instanceGroupInList(GenericVnf vnf, String instanceGroupId) {
for (InstanceGroup instanceGroup : vnf.getInstanceGroups()) {
if (instanceGroup.getId() != null && instanceGroup.getId().equalsIgnoreCase(instanceGroupId)) {