From 22a25ae0b0690c5b26f949cd0d5bc7079cf05d2a Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Wed, 28 Mar 2018 16:26:11 -0700 Subject: Bug Fix - OOF api updates processing flavor-label Additional API interactions were added to OOF response post API freeze that enable core HPA functionality. This patch updates the processsing of the API reponse to process additional flavor parameters. Issue-ID: SO-408 Change-Id: I1656a7ba955ab41c57b7a3e07a3d0cc38b16e2fa Signed-off-by: Marcus G K Williams --- .../bpmn/infrastructure/scripts/DoCreateVfModule.groovy | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'bpmn/MSOInfrastructureBPMN/src') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy index b9319466d9..95747d5a0b 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy @@ -18,7 +18,9 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.mso.bpmn.infrastructure.scripts; +package org.openecomp.mso.bpmn.infrastructure.scripts + +import org.openecomp.mso.bpmn.core.domain.CloudFlavor import java.util.Map import java.util.Currency.CurrencyNameGetter @@ -174,6 +176,12 @@ public class DoCreateVfModule extends VfModuleBase { execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId) rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId) logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled) + //flavorList + ArrayList flavorList = execution.getVariable(cloudSiteId + "_flavorList") + if (flavorList != null) { + execution.setVariable("DCVFM_flavorList", flavorList) + logDebug("flavorList is: " + flavorList, isDebugLogEnabled) + } //source - HARDCODED def source = "VID" execution.setVariable("DCVFM_source", source) @@ -927,6 +935,8 @@ public class DoCreateVfModule extends VfModuleBase { def serviceId = execution.getVariable("DCVFM_serviceId") //serviceInstanceId def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId") + //flavorList + ArrayList flavorList = execution.getVariable("DCVFM_flavorList") //backoutOnFailure def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure") //volumeGroupId @@ -962,6 +972,10 @@ public class DoCreateVfModule extends VfModuleBase { } Map vnfParamsMap = execution.getVariable("DCVFM_vnfParamsMap") + // Add flavorLabel List to vnfParamsMap + flavorList.each { cloudFlavor -> + vnfParamsMap.put("label_" + cloudFlavor.getFlavorLabel(), cloudFlavor.getFlavor()) + } String vfModuleParams = "" //Get SDNC Response Data for VF Module Topology String vfModuleSdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse') -- cgit 1.2.3-korg