summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java19
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java6
2 files changed, 19 insertions, 6 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 4cd1d7dcb0..5670807ddd 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
@@ -83,6 +83,7 @@ import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
+import org.onap.so.db.catalog.beans.OrchTemplateArtifactType;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
@@ -640,9 +641,9 @@ 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);
+ if (vfModule != null && vfModule.getModelInfoVfModule() != null
+ && vfModule.getModelInfoVfModule().getModelUUID() != null) {
+ parameter.setIsHelm(isVfModuleHelm(vfModule.getModelInfoVfModule().getModelUUID()));
}
} else {
logger.debug("Related VNF instance Id not found: {}",
@@ -1479,9 +1480,9 @@ public class BBInputSetup implements JavaDelegate {
}
}
if (vfModule.getModelInfoVfModule() != null
- && vfModule.getModelInfoVfModule().getModelName() != null
- && vfModule.getModelInfoVfModule().getModelName().contains("helm")) {
- gBB.getRequestContext().setIsHelm(true);
+ && vfModule.getModelInfoVfModule().getModelUUID() != null) {
+ gBB.getRequestContext()
+ .setIsHelm(isVfModuleHelm(vfModule.getModelInfoVfModule().getModelUUID()));
}
break;
}
@@ -2163,4 +2164,10 @@ public class BBInputSetup implements JavaDelegate {
}
return customer;
}
+
+ private boolean isVfModuleHelm(String vfModuleId) {
+ org.onap.so.db.catalog.beans.VfModule vfModuleFromDatabase =
+ bbInputSetupUtils.getVfModuleByModelUUID(vfModuleId);
+ return OrchTemplateArtifactType.HELM.equals(vfModuleFromDatabase.getOrchTemplateArtifactType());
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index afd7f6433c..9acb050da7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -6,6 +6,8 @@
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
* ================================================================================
+ * Modifications Copyright (C) 2021 Nokia
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -553,4 +555,8 @@ public class BBInputSetupUtils {
.relatedTo(Types.CONFIGURATIONS.getFragment()).queryParam("configuration-name", configurationName);
return injectionHelper.getAaiClient().getOne(Configurations.class, Configuration.class, uri);
}
+
+ public org.onap.so.db.catalog.beans.VfModule getVfModuleByModelUUID(String modelUUID) {
+ return catalogDbClient.getVfModuleByModelUUID(modelUUID);
+ }
}