aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src
diff options
context:
space:
mode:
authorDmitry Puzikov <dmitry.puzikov@tieto.com>2020-01-14 15:01:20 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-01-29 14:56:33 +0000
commit22b57cf9313f0b21a1dca090088b811eec8cca6a (patch)
treec13bf50660892cd4a35037e434d27ea1b99e4fe2 /openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src
parentabc10d923a2520e7233f3681a8c5811516908891 (diff)
Implement policy element convertion during onboarding VSP
Implement absent policy convertion. Add test data for policies section convertion and explicit test for checking if policies been converted. Change-Id: I7d431a22922e1f9da0fbf0de4654995c3da42fcb Issue-ID: SDC-2727 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src')
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/ServiceTemplateReaderService.java22
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/datatypes/Constants.java73
2 files changed, 49 insertions, 46 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/ServiceTemplateReaderService.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/ServiceTemplateReaderService.java
index 3b861e425d..8a97957be9 100644
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/ServiceTemplateReaderService.java
+++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/ServiceTemplateReaderService.java
@@ -26,23 +26,25 @@ import java.util.Map;
public interface ServiceTemplateReaderService {
- Map<String, Object> readServiceTemplate(byte[] serivceTemplateContent);
+ Map<String, Object> readServiceTemplate(byte[] serivceTemplateContent);
- Object getMetadata();
+ Object getMetadata();
- Object getToscaVersion();
+ Object getToscaVersion();
- Map<String, Object> getNodeTypes();
+ Map<String, Object> getNodeTypes();
- Object getTopologyTemplate();
+ Object getTopologyTemplate();
- Map<String, Object> getNodeTemplates();
+ Map<String, Object> getNodeTemplates();
- Map<String, Object> getInputs();
+ Map<String, Object> getInputs();
- Map<String, Object> getOutputs();
+ Map<String, Object> getOutputs();
- Map<String, Object> getSubstitutionMappings();
+ Map<String, Object> getSubstitutionMappings();
- List<Object> getImports();
+ List<Object> getImports();
+
+ Map<String, Object> getPolicies();
}
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/datatypes/Constants.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/datatypes/Constants.java
index 90ce3f6f6b..18e6a49aa5 100644
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/datatypes/Constants.java
+++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-api/src/main/java/org/openecomp/core/converter/datatypes/Constants.java
@@ -19,44 +19,45 @@ package org.openecomp.core.converter.datatypes;
import java.io.File;
public class Constants {
- public static final String mainStName = "MainServiceTemplate.yaml";
- public static final String globalStName = "GlobalSubstitutionTypesServiceTemplate.yaml";
- public static final String manifestFileName = "MainServiceTemplate.mf";
- public static final String definitionsDir = "Definitions/";
- public static final String metadataFile = "TOSCA-Metadata/TOSCA.meta";
+ public static final String mainStName = "MainServiceTemplate.yaml";
+ public static final String globalStName = "GlobalSubstitutionTypesServiceTemplate.yaml";
+ public static final String manifestFileName = "MainServiceTemplate.mf";
+ public static final String definitionsDir = "Definitions/";
+ public static final String metadataFile = "TOSCA-Metadata/TOSCA.meta";
- public static final String definitionVersion = "tosca_definitions_version";
- private static final String DEFAULT_NAMESPACE = "tosca_default_namespace";
- private static final String TEMPLATE_NAME = "template_name";
- public static final String topologyTemplate = "topology_template";
- private static final String TEMPLATE_AUTHOR = "template_author";
- private static final String TEMPLATE_VERSION = "template_version";
- private static final String DESCRIPTION = "description";
- private static final String IMPORTS = "imports";
- private static final String DSL_DEFINITIONS = "dsl_definitions";
- public static final String nodeType = "node_type";
- public static final String nodeTypes = "node_types";
- private static final String RELATIONSHIP_TYPES = "relationship_types";
- private static final String RELATIONSHIP_TEMPLATES = "relationship_templates";
- private static final String CAPABILITY_TYPES = "capability_types";
- private static final String ARTIFACT_TYPES = "artifact_types";
- private static final String DATA_TYPES = "data_types";
- private static final String INTERFACE_TYPES = "interface_types";
- private static final String POLICY_TYPES = "policy_types";
- private static final String GROUP_TYPES = "group_types";
- private static final String REPOSITORIES = "repositories";
- public static final String metadata = "metadata";
- public static final String nodeTemplates = "node_templates";
- public static final String inputs = "inputs";
- public static final String outputs = "outputs";
- public static final String substitutionMappings = "substitution_mappings";
- public static final String capabilities = "capabilities";
- public static final String requirements = "requirements";
+ public static final String definitionVersion = "tosca_definitions_version";
+ private static final String DEFAULT_NAMESPACE = "tosca_default_namespace";
+ private static final String TEMPLATE_NAME = "template_name";
+ public static final String topologyTemplate = "topology_template";
+ private static final String TEMPLATE_AUTHOR = "template_author";
+ private static final String TEMPLATE_VERSION = "template_version";
+ private static final String DESCRIPTION = "description";
+ private static final String IMPORTS = "imports";
+ private static final String DSL_DEFINITIONS = "dsl_definitions";
+ public static final String nodeType = "node_type";
+ public static final String nodeTypes = "node_types";
+ private static final String RELATIONSHIP_TYPES = "relationship_types";
+ private static final String RELATIONSHIP_TEMPLATES = "relationship_templates";
+ private static final String CAPABILITY_TYPES = "capability_types";
+ private static final String ARTIFACT_TYPES = "artifact_types";
+ private static final String DATA_TYPES = "data_types";
+ private static final String INTERFACE_TYPES = "interface_types";
+ private static final String POLICY_TYPES = "policy_types";
+ private static final String GROUP_TYPES = "group_types";
+ private static final String REPOSITORIES = "repositories";
+ public static final String metadata = "metadata";
+ public static final String nodeTemplates = "node_templates";
+ public static final String inputs = "inputs";
+ public static final String outputs = "outputs";
+ public static final String substitutionMappings = "substitution_mappings";
+ public static final String capabilities = "capabilities";
+ public static final String requirements = "requirements";
+ public static final String POLICIES = "policies";
- public static final String openecompHeatIndex = "openecomp_heat_index";
- public static final String ONAP_INDEX = "onap_index";
- public static final String globalSubstitution = "GlobalSubstitutionTypes";
+ public static final String openecompHeatIndex = "openecomp_heat_index";
+ public static final String ONAP_INDEX = "onap_index";
+ public static final String globalSubstitution = "GlobalSubstitutionTypes";
- public static final String externalFilesFolder = "External" + File.separator;
+ public static final String externalFilesFolder = "External" + File.separator;
}