summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorKalkere Ramesh, Sharan (sk720x) <sk720x@att.com>2020-08-26 04:36:07 -0400
committerKalkere Ramesh, Sharan (sk720x) <sk720x@att.com>2020-09-01 12:39:45 -0400
commit3f4981493008ccf8eeb23f2aac5c2fcf40a0be49 (patch)
tree29ad80fd8c5e277cebceceb09e14a7d2b2d7e831 /bpmn/MSOCommonBPMN/src/main
parent395ebf29b5541bbbe3864f9638973afec95abe05 (diff)
Bpmn to cnf adapter implementation
BPMN changes related to CNF Adapter Change-Id: I4c984b9508076381bb7b3d159955fb6bf724eca8 Issue-ID: SO-3199 Signed-off-by: Kalkere Ramesh, Sharan <sk720x@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java15
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupParameter.java21
3 files changed, 44 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
index 0193469d93..12abec0b77 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java
@@ -57,6 +57,16 @@ public class RequestContext implements Serializable {
private List<Map<String, String>> configurationParameters = new ArrayList<>();
@JsonProperty("application-id")
private String applicationId;
+ @JsonProperty("is-helm")
+ private Boolean isHelm;
+
+ public Boolean getIsHelm() {
+ return isHelm;
+ }
+
+ public void setIsHelm(Boolean isHelm) {
+ this.isHelm = isHelm;
+ }
public String getServiceURI() {
return serviceURI;
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 009686d0fc..989bba0a6e 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
@@ -193,6 +193,12 @@ public class BBInputSetup implements JavaDelegate {
execution.setVariable(GBB_INPUT_VAR_NAME, outputBB);
execution.setVariable(LOOKUP_KEY_MAP_VAR_NAME, lookupKeyMap);
+ if (outputBB.getRequestContext().getIsHelm()) {
+ execution.setVariable("isHelm", true);
+ } else {
+ execution.setVariable("isHelm", false);
+ }
+
BuildingBlockExecution gBuildingBlockExecution = new DelegateExecutionImpl(execution);
execution.setVariable("gBuildingBlockExecution", gBuildingBlockExecution);
execution.setVariable("RetryCount", 1);
@@ -431,7 +437,8 @@ public class BBInputSetup implements JavaDelegate {
protected void mapCatalogInstanceGroup(InstanceGroup instanceGroup, ModelInfo modelInfo, Service service) {
// @TODO: this will populate the instanceGroup model info.
- // Dependent on MSO-5821 653458 US - MSO - Enhance Catalog DB Schema & Adapter to support VNF Groups
+ // Dependent on MSO-5821 653458 US - MSO - Enhance Catalog DB Schema & Adapter
+ // to support VNF Groups
}
protected void populateConfiguration(BBInputSetupParameter parameter) {
@@ -613,6 +620,10 @@ public class BBInputSetup implements JavaDelegate {
parameter.getServiceModel().getCurrentService(), vnfModelCustomizationUUID);
}
}
+ if (vfModule.getModelInfoVfModule() != null && vfModule.getModelInfoVfModule().getModelName() != null
+ && vfModule.getModelInfoVfModule().getModelName().contains("helm")) {
+ parameter.setIsHelm(true);
+ }
} else {
logger.debug("Related VNF instance Id not found: {}",
parameter.getLookupKeyMap().get(ResourceKey.GENERIC_VNF_ID));
@@ -1018,7 +1029,6 @@ public class BBInputSetup implements JavaDelegate {
if (requestDetails.getOwningEntity() != null)
owningEntity = mapperLayer.mapRequestOwningEntity(requestDetails.getOwningEntity());
-
Service service =
bbInputSetupUtils.getCatalogServiceByModelUUID(requestDetails.getModelInfo().getModelVersionId());
if (service == null) {
@@ -1094,6 +1104,7 @@ public class BBInputSetup implements JavaDelegate {
RequestContext requestContext = mapperLayer.mapRequestContext(parameter.getRequestDetails());
requestContext.setAction(parameter.getRequestAction());
requestContext.setMsoRequestId(parameter.getExecuteBB().getRequestId());
+ requestContext.setIsHelm(parameter.getIsHelm());
org.onap.aai.domain.yang.CloudRegion aaiCloudRegion =
bbInputSetupUtils.getCloudRegion(parameter.getRequestDetails().getCloudConfiguration());
CloudRegion cloudRegion =
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupParameter.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupParameter.java
index 36ac0969ee..1290f2aeef 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupParameter.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupParameter.java
@@ -45,6 +45,7 @@ public class BBInputSetupParameter {
private String applicationId;
private boolean isReplace;
private ServiceModel serviceModel;
+ private boolean isHelm;
private BBInputSetupParameter(Builder builder) {
this.cloudConfiguration = builder.cloudConfiguration;
@@ -74,6 +75,7 @@ public class BBInputSetupParameter {
this.applicationId = builder.applicationId;
this.isReplace = builder.isReplace;
this.serviceModel = builder.serviceModel;
+ this.isHelm = builder.isHelm;
}
@@ -331,6 +333,15 @@ public class BBInputSetupParameter {
this.serviceModel = serviceModel;
}
+ protected boolean getIsHelm() {
+ return isHelm;
+ }
+
+
+ protected void setIsHelm(boolean isHelm) {
+ this.isHelm = isHelm;
+ }
+
public static class Builder {
private CloudConfiguration cloudConfiguration;
private ConfigurationResourceKeys configurationResourceKeys;
@@ -359,6 +370,7 @@ public class BBInputSetupParameter {
private String applicationId;
private boolean isReplace;
private ServiceModel serviceModel;
+ private boolean isHelm;
public Builder setCloudConfiguration(CloudConfiguration cloudConfiguration) {
this.cloudConfiguration = cloudConfiguration;
@@ -495,6 +507,15 @@ public class BBInputSetupParameter {
return this;
}
+ protected boolean getIsHelm() {
+ return isHelm;
+ }
+
+
+ protected void setIsHelm(boolean isHelm) {
+ this.isHelm = isHelm;
+ }
+
public BBInputSetupParameter build() {
return new BBInputSetupParameter(this);
}