aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2020-11-24 14:44:01 -0500
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-06-18 00:00:43 +0000
commit3c9bc7d08acb18d76af794bfe936fed7c917b284 (patch)
tree1a86cc0ba88633f061b2a56bf06766b81a619b18 /bpmn/MSOCommonBPMN/src/main
parentabfaee8128ecc8bfb1fe7562631fb0d765b22d8c (diff)
Add VNF-Macro-Create and VNF-Macro-Delete
These macros enable creation and deletion of a vnf with vfmodules for an existing service instance using building blocks. Also: - No longer force alaCarte=true for these use cases - Fix broken vfModule sorting logic for baseFirst/baseLast - Minor refactoring replacing String literals with constants Issue-ID: SO-3635 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I16975f3561f2d978dede20679927ac3531def900
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java14
1 files changed, 12 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 5cbadd6b75..83d1f5249f 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
@@ -1054,8 +1054,18 @@ public class BBInputSetup implements JavaDelegate {
if (requestDetails.getOwningEntity() != null)
owningEntity = mapperLayer.mapRequestOwningEntity(requestDetails.getOwningEntity());
- Service service =
- bbInputSetupUtils.getCatalogServiceByModelUUID(requestDetails.getModelInfo().getModelVersionId());
+ String modelVersionId = requestDetails.getModelInfo().getModelVersionId();
+
+ if (ModelType.vnf == requestDetails.getModelInfo().getModelType()) {
+ for (RelatedInstanceList relatedInstanceList : requestDetails.getRelatedInstanceList()) {
+ if (ModelType.service == relatedInstanceList.getRelatedInstance().getModelInfo().getModelType()) {
+ modelVersionId = relatedInstanceList.getRelatedInstance().getModelInfo().getModelVersionId();
+ break;
+ }
+ }
+ }
+
+ Service service = bbInputSetupUtils.getCatalogServiceByModelUUID(modelVersionId);
if (service == null) {
service = bbInputSetupUtils.getCatalogServiceByModelVersionAndModelInvariantUUID(
requestDetails.getModelInfo().getModelVersion(),