aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java')
-rw-r--r--src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java b/src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java
index 6fbb1f1..d285aca 100644
--- a/src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java
+++ b/src/test/java/org/onap/aai/babel/csar/vnfcatalog/SdcToscaHelper.java
@@ -32,7 +32,7 @@ public class SdcToscaHelper {
/**
* Create the test SubstitutionMappings.
- *
+ *
* @return the new Substitution Mappings
*/
public SubstitutionMappings buildMappings() {
@@ -81,28 +81,32 @@ public class SdcToscaHelper {
/**
* Create a new NodeTemplate and add it to the list (for populating the Substitution Mappings).
+ *
+ * @return the new NodeTemplate
*/
- public void addNodeTemplate() {
+ public NodeTemplate addNodeTemplate() {
String name = "node name";
String type = "tosca.nodes.custom";
- LinkedHashMap<String, Object> nodeTemplate = new LinkedHashMap<>();
- nodeTemplate.put("type", type);
- nodeTemplate.put("properties", null);
+ LinkedHashMap<String, Object> ntMap = new LinkedHashMap<>();
+ ntMap.put("type", type);
+ ntMap.put("properties", null);
- LinkedHashMap<String, Object> ntnodeTemplates = buildCustomTypeDefinitions(name, nodeTemplate);
+ LinkedHashMap<String, Object> ntnodeTemplates = buildCustomTypeDefinitions(name, ntMap);
ntnodeTemplates.put("derived_from", null);
ntnodeTemplates.put("properties", getImagesDefProps());
LinkedHashMap<String, Object> typeInfo = buildNodeTemplateTypeInfo(getImagesDefProps());
LinkedHashMap<String, Object> customDefs = buildCustomTypeDefinitions(type, typeInfo);
- smnodetemplates.add(new NodeTemplate(name, ntnodeTemplates, customDefs, null, null));
+ NodeTemplate nodeTemplate = new NodeTemplate(name, ntnodeTemplates, customDefs, null, null);
+ smnodetemplates.add(nodeTemplate);
+ return nodeTemplate;
}
/**
* Simulate the creation of a NodeTemplate by the SDC TOSCA parser. Populate the properties of the NodeTemplate with
* the supplied images.
- *
+ *
* @param images
* the value of the images property
*/