diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2018-10-25 11:56:43 -0700 |
---|---|---|
committer | Marcus G K Williams <marcus.williams@intel.com> | 2018-10-25 12:19:48 -0700 |
commit | 373c057bfa82583f615ea46814ad3cdf9ea8d669 (patch) | |
tree | 1d15303e09ab0632bbdb2710b0df1de441b61952 /adapters/mso-adapter-utils/src | |
parent | 6c2c8a66fade016f74b51bdfea3ba04494530b97 (diff) |
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 <marcus.williams@intel.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java | 25 |
1 files changed, 18 insertions, 7 deletions
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<String> 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); |