summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-08-10 12:08:45 +0300
committerMichael Lando <ml636r@att.com>2017-08-10 12:08:45 +0300
commit46f9fd57f24428f6a6fd0d290b0463e188975231 (patch)
tree7805037b80cbabf61bafc719e2d63b0dfff8f751 /catalog-model/src/main
parent7f7925e39cf2f428061d161bc4ffe67cad80c76e (diff)
[SDC] code sync
Change-Id: Ia33a7874802b8ac2f49aed9199e109ea509e950e Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/CsarInfo.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/CsarInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/CsarInfo.java
index 575cc68f7f..9d231a7d27 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/CsarInfo.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/CsarInfo.java
@@ -5,21 +5,28 @@ import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
+import org.yaml.snakeyaml.Yaml;
+
public class CsarInfo {
String vfResourceName;
User modifier;
String csarUUID;
Map<String, byte[]> csar;
+ String mainTemplateContent;
+ Map<String, Object> mappedToscaMainTemplate;
Map<String, String> createdNodesToscaResourceNames;
Queue<String> cvfcToCreateQueue;
boolean isUpdate;
Map<String, Resource> createdNodes;
- public CsarInfo(String vfResourceName, User modifier, String csarUUID, Map<String, byte[]> csar, boolean isUpdate){
+ @SuppressWarnings("unchecked")
+ public CsarInfo(String vfResourceName, User modifier, String csarUUID, Map<String, byte[]> csar, String mainTemplateContent, boolean isUpdate){
this.vfResourceName = vfResourceName;
this.modifier = modifier;
this.csarUUID = csarUUID;
this.csar = csar;
+ this.mainTemplateContent = mainTemplateContent;
+ this.mappedToscaMainTemplate = (Map<String, Object>) new Yaml().load(mainTemplateContent);
this.createdNodesToscaResourceNames = new HashMap<>();
this.cvfcToCreateQueue = new PriorityQueue<>();
this.isUpdate = isUpdate;
@@ -58,6 +65,14 @@ public class CsarInfo {
this.csar = csar;
}
+ public String getMainTemplateContent() {
+ return mainTemplateContent;
+ }
+
+ public Map<String, Object> getMappedToscaMainTemplate() {
+ return mappedToscaMainTemplate;
+ }
+
public Map<String, String> getCreatedNodesToscaResourceNames() {
return createdNodesToscaResourceNames;
}