From c0cd58244635c610c604066e9542058b310a706d Mon Sep 17 00:00:00 2001 From: Sithara Nambiar Date: Tue, 29 Sep 2020 23:10:17 +0530 Subject: sdc changes for identifying helm package as a vfm Issue-ID: REQ-341 Signed-off-by: Sithara Nambiar Change-Id: Ide4736655c01dd25dae5afe1207a292a6bcd6951 --- .../sdc/heat/datatypes/structure/HeatStructureTree.java | 9 +++++++++ .../org/openecomp/sdc/heat/services/tree/HeatTreeManager.java | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'openecomp-be/lib/openecomp-heat-lib/src/main/java') diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java index 8d1b5912df..a65db6f2ea 100644 --- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java +++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/structure/HeatStructureTree.java @@ -50,6 +50,7 @@ public class HeatStructureTree implements Comparable { private Set nested; private Set other; private Set artifacts; + private Set helm; public HeatStructureTree() { } @@ -165,6 +166,14 @@ public class HeatStructureTree implements Comparable { this.other.add(other); } + public void addToHelmList(HeatStructureTree helm){ + if (this.helm == null) { + this.helm = new TreeSet<>(); + } + + this.helm.add(helm); + } + /** * Find item in set by name boolean. * 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 4ac09fbddd..b441fc8660 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 @@ -251,7 +251,10 @@ public class HeatTreeManager { } parentHeatStructureTree.getOther().add(childHeatStructureTree); } - } else { + } else if (FileData.Type.HELM.equals(type)) { + parentHeatStructureTree.addToHelmList(childHeatStructureTree); + } + else { artifact = new Artifact(fileName, type); if (!artifactRef.keySet().contains(fileName)) { artifactRef.put(fileName, artifact); -- cgit 1.2.3-korg