aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model')
-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;
}