From 373c057bfa82583f615ea46814ad3cdf9ea8d669 Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Thu, 25 Oct 2018 11:56:43 -0700 Subject: Resolve vf_module_id setting bug Do not remove vf_module_id and vnf_id from parameters in HeatUtils. Issue-ID: SO-1165 Change-Id: I6f00350a6f7dc419a8be9b90b28188228949cb43 Signed-off-by: Marcus G K Williams --- .../so/openstack/utils/MsoMulticloudUtils.java | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'adapters/mso-adapter-utils/src/main/java/org') diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java index 076e03b6b3..8f71af4dfe 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java @@ -76,7 +76,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin{ public static final String VF_MODULE_ID = "vf_module_id"; public static final String TEMPLATE_TYPE = "template_type"; public static final List MULTICLOUD_INPUTS = - Arrays.asList(OOF_DIRECTIVES, SDNC_DIRECTIVES, GENERIC_VNF_ID, VF_MODULE_ID, TEMPLATE_TYPE); + Arrays.asList(OOF_DIRECTIVES, SDNC_DIRECTIVES, TEMPLATE_TYPE); private static final Logger logger = LoggerFactory.getLogger(MsoMulticloudUtils.class); @@ -157,18 +157,29 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin{ for (String key: MULTICLOUD_INPUTS) { if (!stackInputs.isEmpty() && stackInputs.containsKey(key)) { - if ( key == OOF_DIRECTIVES) {oofDirectives = (String) stackInputs.get(key);} - if ( key == SDNC_DIRECTIVES) {sdncDirectives = (String) stackInputs.get(key);} - if ( key == GENERIC_VNF_ID) {genericVnfId = (String) stackInputs.get(key);} - if ( key == VF_MODULE_ID) {vfModuleId = (String) stackInputs.get(key);} - if ( key == TEMPLATE_TYPE) {templateType = (String) stackInputs.get(key);} - if (logger.isDebugEnabled()) { + if (key == OOF_DIRECTIVES) { + oofDirectives = (String) stackInputs.get(key); + } + if (key == SDNC_DIRECTIVES) { + sdncDirectives = (String) stackInputs.get(key); + } + if (key == TEMPLATE_TYPE) { + templateType = (String) stackInputs.get(key); + } + if (logger.isDebugEnabled()) { logger.debug(String.format("Found %s: %s", key, stackInputs.get(key))); } stackInputs.remove(key); } } + if (!stackInputs.isEmpty() && stackInputs.containsKey("VF_MODULE_ID")){ + vfModuleId = (String) stackInputs.get("VF_MODULE_ID"); + } + if (!stackInputs.isEmpty() && stackInputs.containsKey("GENERIC_VNF_ID")){ + genericVnfId = (String) stackInputs.get("GENERIC_VNF_ID"); + } + // create the multicloud payload CreateStackParam stack = createStackParam(stackName, heatTemplate, stackInputs, timeoutMinutes, environment, files, heatFiles); -- cgit 1.2.3-korg