summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnf-adapter
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-02-09 14:13:46 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-09 14:13:46 +0000
commit174a6b06cfc117d16b050ca6c443c4d54fe38742 (patch)
treeda773148dec714f8c8c13ad08fa8fcc9b41b2922 /adapters/mso-vnf-adapter
parentb93c38178cb7776cdc755f407ce4c6afb9825827 (diff)
parent21f91d2c2f857c09f64a67292df2afcd680e6a15 (diff)
Merge "add junit for MsoHeatEnvironmentEntry"
Diffstat (limited to 'adapters/mso-vnf-adapter')
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index be6e752c0e..7fe09be2b6 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -1199,9 +1199,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (heatEnvironmentString != null && heatEnvironmentString.contains ("parameters:")) {
//LOGGER.debug ("Have an Environment argument with a parameters: section - will bypass checking for valid params - but will still check for aliases");
LOGGER.debug("Enhanced environment checking enabled - 1604");
- StringBuilder sb = new StringBuilder(heatEnvironmentString);
- //LOGGER.debug("About to create MHEE with " + sb);
- mhee = new MsoHeatEnvironmentEntry(sb);
+ mhee = MsoHeatEnvironmentEntry.create(heatEnvironmentString);
StringBuilder sb2 = new StringBuilder("\nHeat Template Parameters:\n");
for (HeatTemplateParam parm : heatTemplate.getParameters()) {
sb2.append("\t" + parm.getParamName() + ", required=" + parm.isRequired());
@@ -1210,7 +1208,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
sb2.append("Environment says it's not valid! " + mhee.getErrorString());
} else {
sb2.append("\nEnvironment:");
- sb2.append(mhee.toFullString());
+ sb2.append(mhee);
}
LOGGER.debug(sb2.toString());
} else {
@@ -1291,7 +1289,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// and it causes problems with json that has arrays
String newEnvironmentString = null;
if (mhee != null) {
- newEnvironmentString = mhee.getRawEntry().toString();
+ newEnvironmentString = mhee.getRawEntry();
}
// "Fix" the template if it has CR/LF (getting this from Oracle)
@@ -1902,10 +1900,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
MsoHeatEnvironmentEntry mhee = null;
if (heatEnvironmentString != null && heatEnvironmentString.toLowerCase ().contains ("parameters:")) {
LOGGER.debug("Enhanced environment checking enabled - 1604");
- haveEnvironmentParameters = true;
- StringBuilder sb = new StringBuilder(heatEnvironmentString);
- //LOGGER.debug("About to create MHEE with " + sb);
- mhee = new MsoHeatEnvironmentEntry(sb);
+ mhee = MsoHeatEnvironmentEntry.create(heatEnvironmentString);
StringBuilder sb2 = new StringBuilder("\nHeat Template Parameters:\n");
for (HeatTemplateParam parm : heatTemplate.getParameters()) {
sb2.append("\t" + parm.getParamName() + ", required=" + parm.isRequired());
@@ -1914,7 +1909,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
sb2.append("Environment says it's not valid! " + mhee.getErrorString());
} else {
sb2.append("\nEnvironment:");
- sb2.append(mhee.toFullString());
+ sb2.append(mhee);
}
LOGGER.debug(sb2.toString());
} else {
@@ -2039,7 +2034,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// Just submit the envt entry as received from the database
String newEnvironmentString = null;
if (mhee != null) {
- newEnvironmentString = mhee.getRawEntry().toString();
+ newEnvironmentString = mhee.getRawEntry();
}
// Remove any extraneous parameters (don't throw an error)