aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2021-08-13 14:52:41 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-13 14:52:41 +0000
commit07f292919103fb1fa505944639a163578694f839 (patch)
tree18172ea80234e8906d209e2413ea71722ca843a9 /bpmn/MSOCommonBPMN/src/main
parent27c3d83a8b8c70aa923896fd655e739f2b013c3b (diff)
parent30106b39d2ac1bc206134cfcb8fc73eb1f29b923 (diff)
Merge "Add new endpoint and macro for service upgrade"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java11
1 files changed, 9 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 569f6b1c77..d39da5ee37 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
@@ -1249,7 +1249,8 @@ public class BBInputSetup implements JavaDelegate {
|| requestAction.equalsIgnoreCase("activateInstance")
|| requestAction.equalsIgnoreCase("activateFabricConfiguration")
|| requestAction.equalsIgnoreCase("recreateInstance")
- || requestAction.equalsIgnoreCase("replaceInstance")) {
+ || requestAction.equalsIgnoreCase("replaceInstance")
+ || requestAction.equalsIgnoreCase("upgradeInstance")) {
return getGBBMacroExistingService(executeBB, lookupKeyMap, bbName, requestAction,
requestDetails.getCloudConfiguration());
}
@@ -1429,7 +1430,13 @@ public class BBInputSetup implements JavaDelegate {
if (serviceInstanceId != null) {
aaiServiceInstance = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId);
if (aaiServiceInstance != null) {
- service = bbInputSetupUtils.getCatalogServiceByModelUUID(aaiServiceInstance.getModelVersionId());
+ String modelVersionId = aaiServiceInstance.getModelVersionId();
+ if ("upgradeInstance".equalsIgnoreCase(requestAction)) {
+ modelVersionId = requestDetails.getModelInfo().getModelVersionId();
+ }
+
+ service = bbInputSetupUtils.getCatalogServiceByModelUUID(modelVersionId);
+
if (service == null) {
String message = String.format(
"Related service instance model not found in MSO CatalogDB: model-version-id=%s",