summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-heat-lib/src/main
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2017-10-03 20:04:37 +0300
committervempo <vitaliy.emporopulo@amdocs.com>2017-10-03 20:06:51 +0300
commit33e00cd1d7d580a2fdafad771d54e29bb455cb5d (patch)
tree15f2f1c08313eac8633aaf3935e0df1dcae9a74c /openecomp-be/lib/openecomp-heat-lib/src/main
parent2e4d90a7a3c76deb582df234a1b474daeb37ae30 (diff)
Update group members ids
Issue-Id: SDC-427 Change-Id: If7a476adfac7c56c97e14330e4fddcc6d9f2d293 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-heat-lib/src/main')
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java
index 372c09cffe..df46ef048d 100644
--- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/tree/HeatTreeManager.java
@@ -119,22 +119,19 @@ public class HeatTreeManager {
}
- private void handleHeatContentReference(String filename, HeatStructureTree fileHeatStructureTree,
+ private void handleHeatContentReference(HeatStructureTree fileHeatStructureTree,
GlobalValidationContext globalContext) {
String fileName = fileHeatStructureTree.getFileName();
- InputStream fileContent = this.heatContentMap.getFileContent(fileName);
- if (fileContent == null) {
- return; // file exist in manifest but does not exist in zip
- }
- try {
+
+ try (InputStream fileContent = this.heatContentMap.getFileContent(fileName)) {
HeatOrchestrationTemplate hot =
new YamlUtil().yamlToObject(fileContent, HeatOrchestrationTemplate.class);
- Set<String> nestedSet = HeatTreeManagerUtil.getNestedFiles(filename, hot, globalContext);
+ Set<String> nestedSet = HeatTreeManagerUtil.getNestedFiles(fileName, hot, globalContext);
addHeatNestedFiles(fileHeatStructureTree, nestedSet);
- Set<String> artifactSet = HeatTreeManagerUtil.getArtifactFiles(filename, hot, globalContext);
+ Set<String> artifactSet = HeatTreeManagerUtil.getArtifactFiles(fileName, hot, globalContext);
addHeatArtifactFiles(fileHeatStructureTree, artifactSet);
} catch (Exception ignore) { /* invalid yaml no need to process reference */
logger.debug("",ignore);
@@ -224,7 +221,7 @@ public class HeatTreeManager {
fileHeatStructureTree.setFileName(fileName);
fileHeatStructureTree.setBase(fileData.getBase());
fileHeatStructureTree.setType(type);
- handleHeatContentReference(null, fileHeatStructureTree, null);
+ handleHeatContentReference(fileHeatStructureTree, null);
parentHeatStructureTree.addHeatToHeatList(fileHeatStructureTree);
if (fileData.getData() != null) {
scanTree(fileName, fileData.getData());
@@ -244,6 +241,7 @@ public class HeatTreeManager {
if (fileData.getData() != null) {
scanTree(fileName, fileData.getData());
}
+ handleHeatContentReference(childHeatStructureTree, null);
} else if (FileData.Type.HEAT_VOL.equals(type)) {
//parentHeatStructureTree.addVolumeFileToVolumeList(childHeatStructureTree);
@@ -251,6 +249,7 @@ public class HeatTreeManager {
if (fileData.getData() != null) {
scanTree(fileName, fileData.getData());
}
+ handleHeatContentReference(childHeatStructureTree, null);
} else if (FileData.Type.HEAT_ENV.equals(type)) {
if (parentHeatStructureTree != null && parentHeatStructureTree.getFileName() != null) {
parentHeatStructureTree.setEnv(childHeatStructureTree);