diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2018-03-28 16:26:11 -0700 |
---|---|---|
committer | Marcus Williams <marcus.williams@intel.com> | 2018-04-09 16:20:39 +0000 |
commit | 22a25ae0b0690c5b26f949cd0d5bc7079cf05d2a (patch) | |
tree | 91b69438d2cfd386105021ed6413105489ae7aef /bpmn/MSOInfrastructureBPMN/src/main/groovy/org | |
parent | 955768f7bf4520fb8b9120121251f9537b260db6 (diff) |
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 <marcus.williams@intel.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy/org')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVfModule.groovy | 16 |
1 files changed, 15 insertions, 1 deletions
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<CloudFlavor> 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<CloudFlavor> flavorList = execution.getVariable("DCVFM_flavorList") //backoutOnFailure def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure") //volumeGroupId @@ -962,6 +972,10 @@ public class DoCreateVfModule extends VfModuleBase { } Map<String, String> 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') |