summaryrefslogtreecommitdiffstats
path: root/test-apis-ci/src
diff options
context:
space:
mode:
Diffstat (limited to 'test-apis-ci/src')
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java27
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java2
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaTopologyTemplateDefinition.java4
3 files changed, 22 insertions, 11 deletions
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
index a2683eafc8..c9064a41eb 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
@@ -30,9 +30,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import org.openecomp.sdc.be.model.PropertyDefinition;
-import org.openecomp.sdc.be.model.Resource;
-import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaDefinition;
import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaTopologyTemplateDefinition;
import org.openecomp.sdc.ci.tests.utils.ToscaParserUtils;
@@ -54,6 +51,11 @@ public class AndreyTest {
public static void main(String[] args) throws Exception {
ToscaDefinition toscaMainAmdocsDefinition, toscaMainVfDefinition, toscaMainServiceDefinition;
File filesFolder = new File("C:/Users/al714h/Downloads/Design/");
+ File genericFilesFolder = new File("C:/Git_work/sdc/catalog-be/src/main/resources/import/tosca/heat-types/");
+ File genericVF = new File ("/Generic_VF/Generic_VF.yml");
+ File genericVFC = new File ("/Generic_VFC/Generic_VFC.yml");
+ File genericPNF = new File ("/Generic_PNF/Generic_PNF.yml");
+ File genericService = new File ("/Generic_Service/Generic_Service.yml");
File amdocsCsarFileName = new File("/77e6b842669f441db20a83489da3f4be.csar");
File VfCsarFileName = new File("/resource-Civfonboarded2016012VmxAv301072E2e1424cb9d-csar.csar");
File serviceCsarFileName = new File("/service-Ciservicefeba0521131d-csar.csar");
@@ -68,16 +70,19 @@ public class AndreyTest {
toscaMainAmdocsDefinition = ToscaParserUtils.parseToscaMainYamlToJavaObjectByCsarLocation(new File(filesFolder.getPath() + amdocsCsarFileName));
toscaMainVfDefinition = ToscaParserUtils.parseToscaMainYamlToJavaObjectByCsarLocation(new File(filesFolder.getPath() + VfCsarFileName));
toscaMainServiceDefinition = ToscaParserUtils.parseToscaMainYamlToJavaObjectByCsarLocation(new File(filesFolder.getPath() + serviceCsarFileName));
- Resource resource = AtomicOperationUtils.getResourceObjectByNameAndVersion(UserRoleEnum.DESIGNER, "Generic_VF", "1.0");
- ToscaTopologyTemplateDefinition topology_template = toscaMainAmdocsDefinition.getTopology_template();
- Map<String, Object> newInput = new HashMap<String, Object>();
- for (PropertyDefinition property : resource.getProperties()) {
- newInput.put(property.getLabel(),property);
- }
- topology_template.setInputs(newInput);
+// Resource resource = AtomicOperationUtils.getResourceObjectByNameAndVersion(UserRoleEnum.DESIGNER, "Generic_VF", "1.0");
+ ToscaTopologyTemplateDefinition topologyTemplate = toscaMainAmdocsDefinition.getTopology_template();
+// FileHandling.parseYamlFileToMapByPattern("","");
+// Map<String, Object> newInput = new HashMap<String, Object>();
+// for (PropertyDefinition property : resource.getProperties()) {
+// newInput.put(property.getName(),property);
+// }
- List<PropertyDefinition> properties = resource.getProperties();
+// topologyTemplate.addInputs(newInput);
+//
+//
+// List<PropertyDefinition> properties = resource.getProperties();
// File path = new File("C:/Data/FileToParse/Definitions/resource-Civfonboarded2016006VvmVvm301607E2100a9b04-template.yml");
// File csarPath = new File("C:/Data/D2.0/TOSCA_Ex/Nested.csar");
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java
index 18d7d7d97b..9f1d544738 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java
@@ -6,4 +6,6 @@ public interface ToscaParameterConstants {
public static final String TOSCA_META_PATH = "TOSCA-Metadata/TOSCA.meta";
public static final String HEAT_META_PATH = "Artifacts/HEAT.meta";
public static final String IMPORT_STRUCTURE = "importStructure";
+ public static final String NODE_TYPES = "node_types";
+ public static final String PROPERTIES = "properties";
}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaTopologyTemplateDefinition.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaTopologyTemplateDefinition.java
index 539c9b4d63..66672b1d07 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaTopologyTemplateDefinition.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaTopologyTemplateDefinition.java
@@ -68,6 +68,10 @@ public class ToscaTopologyTemplateDefinition {
this.inputs = inputs;
}
+ public void addInputs(Map<String, Object> inputs) {
+ this.inputs.putAll(inputs);
+ }
+
public Map<String, ToscaNodeTemplatesTopologyTemplateDefinition> getNode_templates() {
return node_templates;
}