aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-12-13 18:12:54 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-13 18:12:54 +0000
commitd04057383159718b40dabc2a278c60c7813bb852 (patch)
treee1f27243d4d2a5211b79fe425502c566354c0952 /bpmn/MSOCommonBPMN/src/main
parent38818ae1af8d5b474477f5c65d7f0bb6e6d6a404 (diff)
parenta0431290fa7b9365ac878353853ef79ac3e1353f (diff)
Merge "add application id support to so"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java11
-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.java17
3 files changed, 33 insertions, 5 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java
index ebf722ef74..0bce305f1d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java
@@ -144,6 +144,8 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> {
private String blueprintName;
@JsonProperty("CDS_BLUEPRINT_VERSION")
private String blueprintVersion;
+ @JsonProperty("application-id")
+ private String applicationId;
public String getBlueprintName() {
@@ -530,6 +532,15 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> {
this.callHoming = callHoming;
}
+
+ public String getApplicationId() {
+ return applicationId;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
@Override
public boolean equals(final Object other) {
if (!(other instanceof GenericVnf)) {
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 632e61b85c..0193469d93 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
@@ -55,6 +55,8 @@ public class RequestContext implements Serializable {
private RequestParameters requestParameters;
@JsonProperty("configurationParameters")
private List<Map<String, String>> configurationParameters = new ArrayList<>();
+ @JsonProperty("application-id")
+ private String applicationId;
public String getServiceURI() {
return serviceURI;
@@ -143,4 +145,12 @@ public class RequestContext implements Serializable {
public void setConfigurationParameters(List<Map<String, String>> configurationParameters) {
this.configurationParameters = configurationParameters;
}
+
+ public String getApplicationId() {
+ return applicationId;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
}
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 951c4ccf32..7e982369bb 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
@@ -367,6 +367,10 @@ public class BBInputSetup implements JavaDelegate {
org.onap.so.serviceinstancebeans.Platform platform = requestDetails.getPlatform();
org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = requestDetails.getLineOfBusiness();
+ String applicationId = "";
+ if (requestDetails.getRequestInfo().getApplicationId() != null) {
+ applicationId = requestDetails.getRequestInfo().getApplicationId();
+ }
if (modelType.equals(ModelType.network)) {
lookupKeyMap.put(ResourceKey.NETWORK_ID, resourceId);
@@ -375,7 +379,8 @@ public class BBInputSetup implements JavaDelegate {
} else if (modelType.equals(ModelType.vnf)) {
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, resourceId);
this.populateGenericVnf(requestId, modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
- serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null, productFamilyId);
+ serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null, productFamilyId,
+ applicationId);
} else if (modelType.equals(ModelType.volumeGroup)) {
lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, resourceId);
this.populateVolumeGroup(requestId, modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
@@ -754,7 +759,7 @@ public class BBInputSetup implements JavaDelegate {
org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap,
RelatedInstanceList[] relatedInstanceList, String resourceId, String vnfType,
- List<Map<String, String>> instanceParams, String productFamilyId) {
+ List<Map<String, String>> instanceParams, String productFamilyId, String applicationId) {
GenericVnf vnf = null;
ModelInfo instanceGroupModelInfo = null;
String instanceGroupId = null;
@@ -783,7 +788,7 @@ public class BBInputSetup implements JavaDelegate {
}
if (vnf == null && bbName.equalsIgnoreCase(AssignFlows.VNF.toString())) {
vnf = createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, resourceId, generatedVnfType,
- instanceParams, productFamilyId);
+ instanceParams, productFamilyId, applicationId);
serviceInstance.getVnfs().add(vnf);
mapVnfcCollectionInstanceGroup(vnf, modelInfo, service);
}
@@ -837,7 +842,7 @@ public class BBInputSetup implements JavaDelegate {
protected GenericVnf createGenericVnf(Map<ResourceKey, String> lookupKeyMap, String instanceName,
org.onap.so.serviceinstancebeans.Platform platform,
org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, String vnfId, String vnfType,
- List<Map<String, String>> instanceParams, String productFamilyId) {
+ List<Map<String, String>> instanceParams, String productFamilyId, String applicationId) {
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, vnfId);
GenericVnf genericVnf = new GenericVnf();
genericVnf.setVnfId(vnfId);
@@ -846,6 +851,7 @@ public class BBInputSetup implements JavaDelegate {
genericVnf.setVnfType(vnfType);
genericVnf.setProvStatus(PREPROV);
genericVnf.setServiceId(productFamilyId);
+ genericVnf.setApplicationId(applicationId);
if (platform != null) {
genericVnf.setPlatform(this.mapperLayer.mapRequestPlatform(platform));
}
@@ -1443,9 +1449,10 @@ public class BBInputSetup implements JavaDelegate {
this.bbInputSetupUtils.updateInfraActiveRequestVnfId(request, vnfId);
}
String productFamilyId = requestDetails.getRequestInfo().getProductFamilyId();
+ String applicationId = "";
this.populateGenericVnf(executeBB.getRequestId(), vnfs.getModelInfo(), vnfs.getInstanceName(),
vnfs.getPlatform(), vnfs.getLineOfBusiness(), service, bbName, serviceInstance, lookupKeyMap, null,
- vnfId, vnfType, vnfs.getInstanceParams(), productFamilyId);
+ vnfId, vnfType, vnfs.getInstanceParams(), productFamilyId, applicationId);
} else if (bbName.contains(VF_MODULE) || bbName.contains(VOLUME_GROUP)) {
Pair<Vnfs, VfModules> vnfsAndVfModules = getVfModulesAndItsVnfsByKey(key, resources);
if (vnfsAndVfModules != null) {